Computes surface intersections.
More...
#include <geogram/mesh/mesh_surface_intersection.h>
|
| MeshSurfaceIntersection (Mesh &M) |
|
void | intersect () |
|
void | remove_external_shell () |
|
void | remove_internal_shells () |
|
void | set_verbose (bool x) |
| Display information while computing the intersection. Default is unset.
|
|
void | set_delaunay (bool x) |
| If set, compute constrained Delaunay triangulation in the intersected triangles. If there are intersections in coplanar facets, it guarantees uniqueness of their triangulation. Default is set.
|
|
void | set_approx_incircle (bool x) |
| If set, then Delaunay mode uses approximated incircle predicate (else it uses exact arithmetics). Default is unset.
|
|
void | set_approx_radial_sort (bool x) |
| If set, do not use exact geometry for ordering triangles around radial edge. Default is unset.
|
|
void | set_detect_intersecting_neighbors (bool x) |
| detect and compute intersections between facets that share a facet or an edge. Set to false if input is a set of conformal meshes. Default is set.
|
|
void | set_radial_sort (bool x) |
| Specifies whether surfaces should be duplicated and radial edges sorted in order to create the volumetric partition yielded by the intersection.
|
|
void | set_normalize (bool x) |
| Specifies whether coordinates should be normalized during computation. If set, original coordinates are restored at the end of intersect().
|
|
void | save_exact (const std::string &filename) |
|
Computes surface intersections.
New vertices are stored with exact coordinates
Definition at line 64 of file mesh_surface_intersection.h.
◆ alpha2()
◆ alpha3()
◆ alpha3_facet()
◆ exact_vertex()
vec3HE GEO::MeshSurfaceIntersection::exact_vertex |
( |
index_t |
v | ) |
const |
|
protected |
Gets the exact point associated with a vertex.
If the vertex has explicit exact coordinates associated with it, they are returned, else an exact vec3HE is constructed from the double-precision coordinates stored in the mesh
- Parameters
-
[in] | v | a vertex of the mesh |
- Returns
- the exact coordinates of this vertex, as a vector in homogeneous coordinates stored as expansions
◆ find_or_create_exact_vertex()
index_t GEO::MeshSurfaceIntersection::find_or_create_exact_vertex |
( |
const vec3HE & |
p | ) |
|
|
protected |
Finds or creates a vertex in the mesh, by exact coordinates.
If there is already a vertex with coordinates p
, then the existing vertex is returned, else a new vertex is constructed. Note that only the vertices created by find_or_create_vertex() can be returned as existing vertices. Mesh vertices stored as double- precision coordinates are not retreived by this function.
- Parameters
-
[in] | p | the exact coordinates of a point |
- Returns
- the index of a mesh vertex with
p
as coordinates
◆ halfedge_vertex()
◆ intersect()
void GEO::MeshSurfaceIntersection::intersect |
( |
| ) |
|
A facet attribute of type index_t named "operand_bit" can indicate for each facet to which operand of a n-ary boolean operation it corresponds to (the same facet might belong to several operands). It is taken into account by the two variants of mesh_classify_intersections()
◆ lock()
void GEO::MeshSurfaceIntersection::lock |
( |
| ) |
|
|
inlineprotected |
Acquires a lock on this mesh.
A single thread can have the lock. When multiple threads want the lock, the ones that do not have it keep waiting until the one that owns the lock calls unlock(). All threads that modify the target mesh should call this function
- See also
- unlock()
Definition at line 161 of file mesh_surface_intersection.h.
◆ radial_sort()
Sorts a range of halfedges in radial order.
- Parameters
-
[in] | b,e | iterators in a vector of halfedge indices |
- Return values
-
true | if everything went well |
false | if two triangles are coplanar with same normal orientation |
◆ readonly_mesh()
const Mesh & GEO::MeshSurfaceIntersection::readonly_mesh |
( |
| ) |
const |
|
inlineprotected |
Gets a copy of the initial mesh passed to the constructor.
It is used by the multithreaded mesh intersection algorithm. Each thread needs to both access the initial geometry and create new vertices and triangles in the target mesh. Creating new mesh elements can reallocate the internal vectors of the mesh, and change the address of the elements. This should not occur while another thread is reading the mesh. Copying the initial geometry in another mesh prevents this type of problems.
- Returns
- a const reference to the mesh that was copied from the one passed to the constructor
Definition at line 225 of file mesh_surface_intersection.h.
◆ save_radial()
void GEO::MeshSurfaceIntersection::save_radial |
( |
const std::string & |
name, |
|
|
vector< index_t >::iterator |
b, |
|
|
vector< index_t >::iterator |
e |
|
) |
| |
|
inlineprotected |
◆ save_triangle()
void GEO::MeshSurfaceIntersection::save_triangle |
( |
const std::string & |
name, |
|
|
index_t |
h |
|
) |
| |
|
inlineprotected |
◆ set_approx_incircle()
void GEO::MeshSurfaceIntersection::set_approx_incircle |
( |
bool |
x | ) |
|
|
inline |
◆ set_approx_radial_sort()
void GEO::MeshSurfaceIntersection::set_approx_radial_sort |
( |
bool |
x | ) |
|
|
inline |
If set, do not use exact geometry for ordering triangles around radial edge. Default is unset.
Definition at line 114 of file mesh_surface_intersection.h.
◆ set_delaunay()
void GEO::MeshSurfaceIntersection::set_delaunay |
( |
bool |
x | ) |
|
|
inline |
If set, compute constrained Delaunay triangulation in the intersected triangles. If there are intersections in coplanar facets, it guarantees uniqueness of their triangulation. Default is set.
Definition at line 98 of file mesh_surface_intersection.h.
◆ set_detect_intersecting_neighbors()
void GEO::MeshSurfaceIntersection::set_detect_intersecting_neighbors |
( |
bool |
x | ) |
|
|
inline |
detect and compute intersections between facets that share a facet or an edge. Set to false if input is a set of conformal meshes. Default is set.
Definition at line 123 of file mesh_surface_intersection.h.
◆ set_normalize()
void GEO::MeshSurfaceIntersection::set_normalize |
( |
bool |
x | ) |
|
|
inline |
Specifies whether coordinates should be normalized during computation. If set, original coordinates are restored at the end of intersect().
- Parameters
-
[in] | x | true if coordinates should be normalized. Default is set. |
Definition at line 145 of file mesh_surface_intersection.h.
◆ set_radial_sort()
void GEO::MeshSurfaceIntersection::set_radial_sort |
( |
bool |
x | ) |
|
|
inline |
Specifies whether surfaces should be duplicated and radial edges sorted in order to create the volumetric partition yielded by the intersection.
- Parameters
-
[in] | x | true if radial edges should be sorted. Default is set |
Definition at line 134 of file mesh_surface_intersection.h.
◆ set_verbose()
void GEO::MeshSurfaceIntersection::set_verbose |
( |
bool |
x | ) |
|
|
inline |
◆ sew2()
◆ sew3()
◆ target_mesh() [1/2]
Mesh & GEO::MeshSurfaceIntersection::target_mesh |
( |
| ) |
|
|
inlineprotected |
Gets the target mesh.
- Returns
- a modifiable reference to the mesh that was passed to the constructor
Definition at line 200 of file mesh_surface_intersection.h.
◆ target_mesh() [2/2]
const Mesh & GEO::MeshSurfaceIntersection::target_mesh |
( |
| ) |
const |
|
inlineprotected |
Gets the target mesh.
- Returns
- a const reference to the mesh that was passed to the constructor
Definition at line 209 of file mesh_surface_intersection.h.
◆ unlock()
void GEO::MeshSurfaceIntersection::unlock |
( |
| ) |
|
|
inlineprotected |
◆ MeshInTriangle
◆ approx_incircle_
bool GEO::MeshSurfaceIntersection::approx_incircle_ |
|
protected |
◆ delaunay_
bool GEO::MeshSurfaceIntersection::delaunay_ |
|
protected |
◆ detect_intersecting_neighbors_
bool GEO::MeshSurfaceIntersection::detect_intersecting_neighbors_ |
|
protected |
◆ exact_point_to_vertex_
◆ facet_corner_alpha3_
◆ facet_corner_degenerate_
Attribute<bool> GEO::MeshSurfaceIntersection::facet_corner_degenerate_ |
|
protected |
◆ lock_
◆ mesh_
Mesh& GEO::MeshSurfaceIntersection::mesh_ |
|
protected |
◆ mesh_copy_
Mesh GEO::MeshSurfaceIntersection::mesh_copy_ |
|
protected |
◆ normalize_
bool GEO::MeshSurfaceIntersection::normalize_ |
|
protected |
◆ normalize_center_
vec3 GEO::MeshSurfaceIntersection::normalize_center_ |
|
protected |
◆ normalize_radius_
double GEO::MeshSurfaceIntersection::normalize_radius_ |
|
protected |
◆ radial_sort_
RadialSort GEO::MeshSurfaceIntersection::radial_sort_ |
|
protected |
◆ use_radial_sort_
bool GEO::MeshSurfaceIntersection::use_radial_sort_ |
|
protected |
◆ verbose_
bool GEO::MeshSurfaceIntersection::verbose_ |
|
protected |
◆ vertex_to_exact_point_
Attribute<const vec3HE*> GEO::MeshSurfaceIntersection::vertex_to_exact_point_ |
|
protected |
The documentation for this class was generated from the following file: