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
TriangleMesh
a model of HalfedgeListGraph and FaceListGraph
VertexPointMap
a model of ReadablePropertyMap with the vertex descriptor of TriangleMesh as key type, and a point from a CGAL Kernel as value type. Default is the internal point property map of TriangleMesh if it exists.
Kernel
a model of CGAL Kernel. Default is the kernel of the value type of VertexPointMap retrieved using Kernel_traits.
AABBTree
an AABB_tree that can containing faces of TriangleMesh. Default is using AABB_traits with AABB_face_graph_triangle_primitive as primitive type.
Has_rotation
tag indicating whether the transformations applied to meshes may contain rotations (Tag_true) or if only translations and scalings are applied (Tag_false). Some optimizations are switch on in case there are no rotations.
Public Types
typedef unspecified_type
AABB_tree
The AABB_tree type representing the triangles of each input mesh.
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.