Exemplo n.º 1
0
ZIntCuboidFaceArray ZIntCuboidArray::getSideBorderFace() const
{
  ZIntCuboidFaceArray borderFaceArray = getBorderFace();

  ZIntCuboidFaceArray sideBorderFaceArray;
  for (ZIntCuboidFaceArray::const_iterator iter = borderFaceArray.begin();
       iter != borderFaceArray.end(); ++iter) {
    const ZIntCuboidFace &face = *iter;
    if (face.getAxis() != NeuTube::Z_AXIS) {
      sideBorderFaceArray.append(face);
    }
  }

  return sideBorderFaceArray;
}
Exemplo n.º 2
0
ZIntCuboidFaceArray ZIntCuboidFace::cropBy(
    const ZIntCuboidFaceArray &faceArray) const
{
  ZIntCuboidFaceArray result;
  result.appendValid(*this);

  for (ZIntCuboidFaceArray::const_iterator iter = faceArray.begin();
       iter != faceArray.end(); ++iter) {
    const ZIntCuboidFace &face = *iter;
    result = result.cropBy(face);
    if (result.empty()) { //No need to continue on empty face
      break;
    }
  }

  return result;
}