CGAL 5.1 - 3D Generalized Barycentric Coordinates
|
#include <CGAL/Barycentric_coordinates_3/Mean_value_coordinates_3.h>
3D mean value coordinates.
This class implements 3D mean value coordinates ( [1], [3] ), 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 . |
GeomTraits | a model of BarycentricTraits_3 |
VertexToPointMap | a property map with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_3 as value type. The default is property_map_selector<TriangleMesh, CGAL::vertex_point_t> . |
Types | |
typedef GeomTraits::FT | FT |
Number type. | |
typedef GeomTraits::Point_3 | Point_3 |
Point type. | |
typedef GeomTraits::Vector_3 | Vector_3 |
Vector type. | |
Initialization | |
Mean_value_coordinates_3 (const TriangleMesh &triangle_mesh, const Computation_policy_3 policy, const VertexToPointMap vertex_to_point_map, const GeomTraits traits=GeomTraits()) | |
initializes all internal data structures. More... | |
Access | |
template<typename OutIterator > | |
OutIterator | operator() (const Point_3 &query, OutIterator c_begin) |
computes 3D mean value coordinates. More... | |
CGAL::Barycentric_coordinates::Mean_value_coordinates_3< TriangleMesh, GeomTraits, VertexToPointMap >::Mean_value_coordinates_3 | ( | const TriangleMesh & | triangle_mesh, |
const Computation_policy_3 | policy, | ||
const VertexToPointMap | vertex_to_point_map, | ||
const GeomTraits | traits = GeomTraits() |
||
) |
initializes all internal data structures.
This class implements the behavior of mean value coordinates for 3D query points.
triangle_mesh | an instance of TriangleMesh , which must be a simplicial polyhedron |
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_to_point_map | an instance of VertexToPointMap that maps a vertex from triangle_mesh to Point_3 ; the default initialization is provided |
OutIterator CGAL::Barycentric_coordinates::Mean_value_coordinates_3< TriangleMesh, GeomTraits, VertexToPointMap >::operator() | ( | const Point_3 & | query, |
OutIterator | c_begin | ||
) |
computes 3D mean value coordinates.
This function fills c_begin
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 to the number of vertices.
After the coordinates \(b_i\) with \(i = 1\dots n\) are computed, where \(n\) is the number of vertices, the query point \(q\) can be obtained as \(q = \sum_{i = 1}^{n}b_ip_i\), where \(p_i\) are the polyhedron vertices.
OutIterator | a model of OutputIterator that accepts values of type FT |
query | a query point |
c_begin | the beginning of the destination range with the computed coordinates |