template<class TriangleMesh, class VertexPointMap = Default, class
Kernel = Default, class AABBTree = Default, class Has_rotation = CGAL::Tag_true>
class CGAL::Rigid_triangle_mesh_collision_detection< TriangleMesh, VertexPointMap, Kernel, AABBTree, Has_rotation >
This class provides methods to perform some intersection tests between triangle meshes that undergo affine transformations (rotation, translation, and scaling).
Meshes are added to an internal set and are referenced using an id assigned when added to the set. Note that the exact predicate framework applies on the meshes after having applied the transformation to the coordinates of the points of the vertices of each mesh.
- Template Parameters
-
|
|
| Rigid_triangle_mesh_collision_detection (const Rigid_triangle_mesh_collision_detection &)=default |
| |
|
| Rigid_triangle_mesh_collision_detection (Rigid_triangle_mesh_collision_detection &&other) |
| | move constructor
|
| |
|
Rigid_triangle_mesh_collision_detection & | operator= (Rigid_triangle_mesh_collision_detection &other)=default |
| |
|
Rigid_triangle_mesh_collision_detection & | operator= (Rigid_triangle_mesh_collision_detection &&other) |
| | move assignment operator
|
| |
| template<class NamedParameters = parameters::Default_named_parameters> |
| std::size_t | add_mesh (const TriangleMesh &tm, const NamedParameters &np=parameters::default_values()) |
| | adds mesh tm to the set of meshes to be considered for intersection.
|
| |
| template<class NamedParameters = parameters::Default_named_parameters> |
| std::size_t | add_mesh (const AABB_tree &tree, const TriangleMesh &tm, const NamedParameters &np=parameters::default_values()) |
| | adds an instance of a triangulated surface mesh using an external tree of its faces.
|
| |
|
void | set_transformation (std::size_t mesh_id, const Aff_transformation_3< K > &aff_trans) |
| | sets the transformation associated to a mesh identified by its id in the set.
|
| |
| template<class MeshIdRange > |
| std::vector< std::size_t > | get_all_intersections (std::size_t mesh_id, const MeshIdRange &ids) const |
| | returns a vector of the ids of meshes within ids that have at least a face intersecting a face of the mesh with id mesh_id.
|
| |
|
std::vector< std::size_t > | get_all_intersections (std::size_t mesh_id) const |
| | returns a vector of the ids of meshes in the set that have at least a face intersecting a face of the mesh with id mesh_id
|
| |
| template<class MeshIdRange > |
| std::vector< std::pair< std::size_t, bool > > | get_all_intersections_and_inclusions (std::size_t mesh_id, const MeshIdRange &ids) const |
| | returns a vector of the ids of meshes within ids that are intersecting with the mesh with id mesh_id, considering volume inclusions for closed meshes.
|
| |
| std::vector< std::pair< std::size_t, bool > > | get_all_intersections_and_inclusions (std::size_t mesh_id) const |
| | returns a vector of the ids of meshes in the set that are intersecting with the mesh with id mesh_id, considering volume inclusions for closed meshes.
|
| |
template<class TriangleMesh , class VertexPointMap = Default, class
Kernel = Default, class AABBTree = Default, class Has_rotation = CGAL::Tag_true>
template<class MeshIdRange >
returns a vector of the ids of meshes within ids that are intersecting with the mesh with id mesh_id, considering volume inclusions for closed meshes.
More precisely, if at least one face of a mesh with id i intersects a face of the mesh with id mesh_id, the pair (i, false) is put in the output vector. If there is no face intersection, but at least one of the meshes with ids i and mesh_id is closed, and at least one connected component is included in the bounded volume defined by a closed mesh then the pair (i, true) is put in the output vector (independently of mesh i or mesh_id being the one including the other). The inclusion test is done using Side_of_triangle_mesh, in particular surface orientation is ignored and only the nesting level of connected components defines a bounded volume. If a mesh has some self-intersection the inclusion test may return incorrect results. If mesh_id is in ids it is not reported.
- Template Parameters
-
| MeshIdRange | a range of ids convertible to std::size_t. |
- Note
- If a mesh is made of several connected components and at least one component is not closed, then no inclusion test will be made even if some components are closed.