/* ************************************************************************* * * Set up a EdgeOverlap oject using the given boxes and offset * ************************************************************************* */ std::shared_ptr<hier::BoxOverlap> OuteredgeGeometry::setUpOverlap( const hier::BoxContainer& boxes, const hier::Transformation& transformation) const { const tbox::Dimension& dim(transformation.getOffset().getDim()); std::vector<hier::BoxContainer> dst_boxes(dim.getValue()); for (hier::BoxContainer::const_iterator b = boxes.begin(); b != boxes.end(); ++b) { for (int d = 0; d < dim.getValue(); ++d) { hier::Box edge_box(EdgeGeometry::toEdgeBox(*b, d)); dst_boxes[d].pushBack(edge_box); } } // Create the edge overlap data object using the boxes and transformation return std::make_shared<EdgeOverlap>(dst_boxes, transformation); }
/* ************************************************************************* * * Set up a FaceOverlap oject using the given boxes and offset * ************************************************************************* */ boost::shared_ptr<hier::BoxOverlap> OuterfaceGeometry::setUpOverlap( const hier::BoxContainer& boxes, const hier::Transformation& transformation) const { const tbox::Dimension& dim(transformation.getOffset().getDim()); std::vector<hier::BoxContainer> dst_boxes(dim.getValue()); for (hier::BoxContainer::const_iterator b = boxes.begin(); b != boxes.end(); ++b) { for (tbox::Dimension::dir_t d = 0; d < dim.getValue(); ++d) { hier::Box face_box(FaceGeometry::toFaceBox(*b, d)); dst_boxes[d].pushBack(face_box); } } // Create the face overlap data object using the boxes and source shift return boost::make_shared<FaceOverlap>(dst_boxes, transformation); }