|
CGAL 6.2 - 3D Generalized Barycentric Coordinates
|
#include <CGAL/Barycentric_coordinates_3/Mean_value_coordinates_3.h>
computes 3D mean value barycentric coordinates with respect to a closed triangle mesh.
This class implements 3D mean value coordinates ( [1], [2] ), which can be computed at any point in the space.
Mean value coordinates are well-defined everywhere in the space and are non-negative in the kernel of a star-shaped polyhedron. The coordinates are computed analytically.
| TriangleMesh | must be a model of the concept FaceListGraph. |
| VertexPointMap | a property map with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and GeomTraits::Point_3 as value type. |
| GeomTraits | a model of BarycentricTraits_3. |
Types | |
| using | FT = typename GeomTraits::FT |
| Number type. | |
| using | Point_3 = typename GeomTraits::Point_3 |
| Point type. | |
| using | Vector_3 = typename GeomTraits::Vector_3 |
| Vector type. | |
Initialization | |
| Mean_value_coordinates_3 (const TriangleMesh &tmesh, const Computation_policy_3 policy, const VertexPointMap vertex_point_map, const GeomTraits traits=GeomTraits()) | |
| initializes all internal data structures. | |
Access | |
| template<typename OutputIterator > | |
| OutputIterator | operator() (const Point_3 &query, OutputIterator oi) |
| computes 3D mean value barycentric coordinates with respect to a closed triangle mesh. | |
| CGAL::Barycentric_coordinates::Mean_value_coordinates_3< TriangleMesh, VertexPointMap, GeomTraits >::Mean_value_coordinates_3 | ( | const TriangleMesh & | tmesh, |
| const Computation_policy_3 | policy, | ||
| const VertexPointMap | vertex_point_map, | ||
| const GeomTraits | traits = GeomTraits() |
||
| ) |
initializes all internal data structures.
This class implements the behavior of mean value coordinates for 3D query points.
| tmesh | an instance of TriangleMesh |
| policy | one of the CGAL::Barycentric_coordinates::Computation_policy_3; the default is Computation_policy_3::FAST_WITH_EDGE_CASES |
| traits | a traits class with geometric objects, predicates, and constructions; the default initialization is provided |
| vertex_point_map | an instance of VertexPointMap that maps a vertex from tmesh to Point_3; the default initialization is provided |
tmesh) >= 4. tmesh). tmesh). | OutputIterator CGAL::Barycentric_coordinates::Mean_value_coordinates_3< TriangleMesh, VertexPointMap, GeomTraits >::operator() | ( | const Point_3 & | query, |
| OutputIterator | oi | ||
| ) |
computes 3D mean value barycentric coordinates with respect to a closed triangle mesh.
This function fills oi with 3D mean value coordinates computed at the query point with respect to the vertices of the input polyhedron.
The number of returned coordinates equals the number of vertices of tmesh.
After the coordinates \(b_i\) with \(i = 0\dots n-1\) are computed, where \(n\) is the number of vertices, the query point \(q\) can be obtained as \(q = \sum_{i = 0}^{n-1}b_ip_i\), where \(p_i\) are the polyhedron vertices.
| OutputIterator | a model of OutputIterator that accepts values of type FT |
| query | a query point |
| oi | the beginning of the destination range with the computed coordinates |