This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpp | |
// "called" is an object (functor) of the class "callback_for_boxes" | |
class callback_for_boxes { | |
public: | |
std::vector<size_t> *_id_vector_a, *_id_vector_b; | |
NA_Vector *_neighbors_a, *_neighbors_b; | |
callback_for_boxes(std::vector<size_t> &id_vector_a, | |
std::vector<size_t> &id_vector_b, NA_Vector &neighbors_a, | |
NA_Vector &neighbors_b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// "called" is an object (functor) of the class "callback_for_boxes" | |
class callback_for_boxes { | |
public: | |
std::vector<size_t> *_id_vector_a, *_id_vector_b; | |
NA_Vector *_neighbors_a, *_neighbors_b; | |
callback_for_boxes(std::vector<size_t> &id_vector_a, | |
std::vector<size_t> &id_vector_b, NA_Vector &neighbors_a, | |
NA_Vector &neighbors_b) | |
: _id_vector_a(&id_vector_a), _id_vector_b(&id_vector_b), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get cells bounding boxes. | |
for (const auto &cell_ite : input_cells) { | |
const Tetrahedron tetra( | |
cell_ite->vertex(0)->point(), cell_ite->vertex(1)->point(), | |
cell_ite->vertex(2)->point(), cell_ite->vertex(3)->point()); | |
boxes.push_back(Box(std::move(tetra.bbox()), cell_ite)); | |
} | |
// Get the intersections | |
CGAL::box_self_intersection_d(boxes.begin(), boxes.end(), called); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////// | |
// Get cells bounding boxes. | |
for (const auto &cell_ite : input_cells) { | |
const Tetrahedron tetra( | |
cell_ite->vertex(0)->point(), cell_ite->vertex(1)->point(), | |
cell_ite->vertex(2)->point(), cell_ite->vertex(3)->point()); | |
boxes.push_back(Box(std::move(tetra.bbox()), cell_ite)); | |
} |
NewerOlder