CGAL 4.12.2 - Polygon Mesh Processing
|
Functions to detect intersections.
Note that those functions will be exact as long as the underlying do-intersect predicates used are exact. In practice, it means that the 3D point type used must come from a CGAL kernel with exact predicates.
Functions | |
template<class PolylineRange > | |
bool | CGAL::Polygon_mesh_processing::do_intersect (const PolylineRange &polylines1, const PolylineRange &polylines2) |
returns true if any segment of any polyline of polylines1 intersects any segment of any polyline of polylines2 , and false otherwise. More... | |
template<class Polyline > | |
bool | CGAL::Polygon_mesh_processing::do_intersect (const Polyline &polyline1, const Polyline &polyline2) |
returns true if any segment of polyline1 intersects any segment of polyline2 , and false otherwise. More... | |
template<class TriangleMesh , class NamedParameters1 , class NamedParameters2 > | |
bool | CGAL::Polygon_mesh_processing::do_intersect (const TriangleMesh &tm1, const TriangleMesh &tm2, const NamedParameters1 &np1, const NamedParameters2 &np2) |
returns true if any face of tm1 intersects any face of tm2 , and false otherwise. More... | |
template<class TriangleMesh , class PolylineRange , class NamedParameters > | |
bool | CGAL::Polygon_mesh_processing::do_intersect (const TriangleMesh &tm, const PolylineRange &polylines, const NamedParameters &np) |
returns true if any face of tm and any segment of any polyline of polylines intersects, and false otherwise. More... | |
template<class TriangleMesh , class Polyline , class NamedParameters > | |
bool | CGAL::Polygon_mesh_processing::do_intersect (const TriangleMesh &tm, const Polyline &polyline, const NamedParameters &np) |
returns true if any face of tm and any segment of polyline intersects, and false otherwise. More... | |
template<class TriangleMeshRange , class OutputIterator , class NamedParameters , class NamedParametersRange > | |
OutputIterator | CGAL::Polygon_mesh_processing::intersecting_meshes (const TriangleMeshRange &range, OutputIterator out, NamedParameters np, NamedParametersRange nps) |
detects and reports all the pairs of meshes intersecting in a range of triangulated surface meshes. More... | |
bool CGAL::Polygon_mesh_processing::do_intersect | ( | const PolylineRange & | polylines1, |
const PolylineRange & | polylines2 | ||
) |
#include <CGAL/Polygon_mesh_processing/intersection.h>
returns true
if any segment of any polyline of polylines1
intersects any segment of any polyline of polylines2
, and false
otherwise.
This function depends on the package Intersecting Sequences of dD Iso-oriented Boxes.
PolylineRange | a RandomAccessRange of RandomAccessRange of points. The point type must be from a 3D point from a CGAL Kernel. A polyline is defined as a sequence of points, each pair of contiguous points defines a segment of the polyline. If the first and last points of the polyline are identical, the polyline is closed. |
polylines1 | the first range of polylines to check for intersections. |
polylines2 | the second range of polylines to check for intersections. |
bool CGAL::Polygon_mesh_processing::do_intersect | ( | const Polyline & | polyline1, |
const Polyline & | polyline2 | ||
) |
#include <CGAL/Polygon_mesh_processing/intersection.h>
returns true
if any segment of polyline1
intersects any segment of polyline2
, and false
otherwise.
This function depends on the package Intersecting Sequences of dD Iso-oriented Boxes.
Polyline | a RandomAccessRange of points. The point type must be from a 3D point type from CGAL Kernel. A polyline is defined as a sequence of points, each pair of contiguous points defines a segment of the polyline. If the first and last points of the polyline are identical, the polyline is closed. |
polyline1 | the first polyline to check for intersections. |
polyline2 | the second polyline to check for intersections. |
bool CGAL::Polygon_mesh_processing::do_intersect | ( | const TriangleMesh & | tm1, |
const TriangleMesh & | tm2, | ||
const NamedParameters1 & | np1, | ||
const NamedParameters2 & | np2 | ||
) |
#include <CGAL/Polygon_mesh_processing/intersection.h>
returns true
if any face of tm1
intersects any face of tm2
, and false
otherwise.
If do_overlap_test_of_bounded_sides
is set to true
, the overlap of bounded sides are tested as well. In that case, the meshes must be closed. This function depends on the package Intersecting Sequences of dD Iso-oriented Boxes.
CGAL::is_triangle_mesh(tm1)
CGAL::is_triangle_mesh(tm2)
!do_overlap_test_of_bounded_sides || CGAL::is_closed(tm1)
!do_overlap_test_of_bounded_sides || CGAL::is_closed(tm2)
TriangleMesh | a model of FaceListGraph |
NamedParameters1 | a sequence of Named Parameters for Polygon Mesh Processing for tm1 |
NamedParameters2 | a sequence of Named Parameters for Polygon Mesh Processing for tm2 |
tm1 | the first triangulated surface mesh to check for intersections |
tm2 | the second triangulated surface mesh to check for intersections |
np1 | optional sequence of Named Parameters for Polygon Mesh Processing for tm1 , among the ones listed below |
np2 | optional sequence of Named Parameters for Polygon Mesh Processing for tm2 , among the ones listed below |
vertex_point_map | the property map with the points associated to the vertices of tm1 (tm2`). The two property map types must be the same. If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available in TriangleMesh |
geom_traits | an instance of a geometric traits class, model of PMPSelfIntersectionTraits |
do_overlap_test_of_bounded_sides | if set to true tests also the overlap of the bounded sides of tm1 and tm2 . If false (default), only the intersection of surface triangles are tested. |
bool CGAL::Polygon_mesh_processing::do_intersect | ( | const TriangleMesh & | tm, |
const PolylineRange & | polylines, | ||
const NamedParameters & | np | ||
) |
#include <CGAL/Polygon_mesh_processing/intersection.h>
returns true
if any face of tm
and any segment of any polyline of polylines
intersects, and false
otherwise.
This function depends on the package Intersecting Sequences of dD Iso-oriented Boxes.
CGAL::is_triangle_mesh(tm)
TriangleMesh | a model of FaceListGraph |
PolylineRange | a RandomAccessRange of RandomAccessRange of points. The point type of the range must be the same as the value type of the vertex point map. A polyline is defined as a sequence of points, each pair of contiguous points defines a segment of the polyline. If the first and last points of the polyline are identical, the polyline is closed. |
NamedParameters | a sequence of Named Parameters for Polygon Mesh Processing |
tm | the triangulated surface mesh to check for intersections |
polylines | the range of polylines to check for intersections. |
np | optional sequence of Named Parameters for Polygon Mesh Processing among the ones listed below |
vertex_point_map | the property map with the points associated to the vertices of tm . If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available in TriangleMesh |
geom_traits | an instance of a geometric traits class, model of PMPSelfIntersectionTraits |
bool CGAL::Polygon_mesh_processing::do_intersect | ( | const TriangleMesh & | tm, |
const Polyline & | polyline, | ||
const NamedParameters & | np | ||
) |
#include <CGAL/Polygon_mesh_processing/intersection.h>
returns true
if any face of tm
and any segment of polyline
intersects, and false
otherwise.
This function depends on the package Intersecting Sequences of dD Iso-oriented Boxes.
CGAL::is_triangle_mesh(tm)
TriangleMesh | a model of FaceListGraph |
Polyline | a RandomAccessRange of points. The point type of the range must be the same as the value type of the vertex point map. A polyline is defined as a sequence of points, each pair of contiguous points defines a segment of the polyline. If the first and last points of the polyline are identical, the polyline is closed. |
NamedParameters | a sequence of Named Parameters for Polygon Mesh Processing |
tm | the triangulated surface mesh to check for intersections |
polyline | the polyline to check for intersections. |
np | optional sequence of Named Parameters for Polygon Mesh Processing among the ones listed below |
vertex_point_map | the property map with the points associated to the vertices of tn . If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available in TriangleMesh |
geom_traits | an instance of a geometric traits class, model of PMPSelfIntersectionTraits |
OutputIterator CGAL::Polygon_mesh_processing::intersecting_meshes | ( | const TriangleMeshRange & | range, |
OutputIterator | out, | ||
NamedParameters | np, | ||
NamedParametersRange | nps | ||
) |
#include <CGAL/Polygon_mesh_processing/intersection.h>
detects and reports all the pairs of meshes intersecting in a range of triangulated surface meshes.
A pair of meshes intersecting is put in the output iterator out
as a std::pair<std::size_t, std::size_t>
, each index refering to the index of the triangle mesh in the input range. If do_overlap_test_of_bounded_sides
is true
, the overlap of bounded sides are tested as well. In that case, the meshes must be closed. This function depends on the package Intersecting Sequences of dD Iso-oriented Boxes.
TriangleMeshRange | a model of RandomAccessRange of triangulated surface meshes model of FaceListGraph . |
OutputIterator | an output iterator in which std::pair<std::size_t, std::size_t> can be put. |
NamedParameters | a sequence of Named Parameters for Polygon Mesh Processing for the algorithm |
NamedParametersRange | a range of named parameters for the meshes. |
range | the range of triangulated surface meshes to be checked for intersections. |
out | output iterator used to collect pairs of intersecting meshes. |
np | an optional sequence named parameters among the one listed below |
geom_traits | an instance of a geometric traits class, model of PMPSelfIntersectionTraits . The default value for geom_traits is CGAL::Kernel_traits<Point>Kernel , where Point is the value type of the vertex point map of the meshes. |
do_overlap_test_of_bounded_sides | if set to true reports also overlap of bounded sides of meshes. If false (default), only the intersection of surface triangles are tested. |
nps | an optional range of vertex_point_map named parameters containing the VertexPointMap of each mesh in range , in the same order. If this parameter is omitted, then an internal property map for CGAL::vertex_point_t should be available for every mesh in the range. All the vertex point maps must be of the same type. |
vertex_point_map | the property map with the points associated to the vertices of a mesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available in the triangle mesh type used in the range |