CGAL 6.2 - 3D Generalized Barycentric Coordinates
Loading...
Searching...
No Matches
CGAL::Barycentric_coordinates Namespace Reference

The namespace Barycentric_coordinates contains implementations of all generalized barycentric coordinates: 2D, 3D, related enumerations, etc. More...

Classes

class  BarycentricCoordinates_2
 
class  BarycentricTraits_2
 
class  BarycentricTraits_3
 A concept that describes the set of requirements of the template parameter GeomTraits used to parameterize all classes and functions with 3D barycentric coordinates from the namespace CGAL::Barycentric_coordinates. The concept BarycentricTraits_3 extends the concept BarycentricTraits_2 and adds the requirements for 3D objects. More...
 
class  Delaunay_domain_2
 
class  Discrete_harmonic_2
 
class  Discrete_harmonic_coordinates_2
 
class  Discrete_harmonic_coordinates_3
 computes 3D discrete harmonic coordinates with respect to a closed convex triangle mesh. More...
 
class  DiscretizedDomain_2
 
class  Generalized_barycentric_coordinates_2
 
class  Harmonic_coordinates_2
 
class  Mean_value_2
 
class  Mean_value_coordinates_2
 
class  Mean_value_coordinates_3
 computes 3D mean value barycentric coordinates with respect to a closed triangle mesh. More...
 
class  Segment_coordinates_2
 
class  Triangle_coordinates_2
 
class  Wachspress_2
 
class  Wachspress_coordinates_2
 
class  Wachspress_coordinates_3
 computes 3D Wachspress coordinates with respect to a closed convex triangle mesh. More...
 

Functions

template<typename TriangleMesh , typename CoordinateRange , typename VertexPointMap , typename GeomTraits = typename CGAL::Kernel_traits<typename boost::property_traits<VertexPointMap>::value_type>::type>
boost::property_traits< VertexPointMap >::value_type apply_barycentric_coordinates (const TriangleMesh &tmesh, const CoordinateRange &coordinates, VertexPointMap vpm)
 computes a point location from barycentric coordinates with respect to a triangle mesh.
 
template<typename PointRange , typename CoordinateRange , typename GeomTraits = typename boost::range_value<PointRange>::type>
boost::range_value< PointRange >::type apply_barycentric_coordinates (const PointRange &points, const CoordinateRange &coordinates)
 computes a point location from barycentric coordinates with respect to a set of points.
 
template<typename TriangleMesh , typename OutputIterator , typename GeomTraits , typename VertexPointMap >
std::pair< OutputIterator, bool > boundary_coordinates_3 (const TriangleMesh &tmesh, const typename GeomTraits::Point_3 &query, OutputIterator oi, const GeomTraits &traits, const VertexPointMap vertex_point_map)
 computes boundary barycentric coordinates with respect to a closed convex triangle mesh.
 
template<typename TriangleMesh , typename Point_3 , typename OutputIterator , typename VertexPointMap = typename boost::property_map<TriangleMesh, CGAL::vertex_point_t>::const_type>
std::pair< OutputIterator, bool > boundary_coordinates_3 (const TriangleMesh &tmesh, const Point_3 &query, OutputIterator oi, const VertexPointMap vertex_point_map)
 computes boundary barycentric coordinates with respect to a closed convex triangle mesh.
 
template<typename Point_3 , typename TriangleMesh , typename OutputIterator >
OutputIterator discrete_harmonic_coordinates_3 (const TriangleMesh &tmesh, const Point_3 &query, OutputIterator oi, const Computation_policy_3 policy=Computation_policy_3::FAST)
 computes 3D discrete harmonic coordinates with respect to a closed convex triangle mesh.
 
template<typename Point_3 , typename TriangleMesh , typename OutputIterator >
OutputIterator mean_value_coordinates_3 (const TriangleMesh &tmesh, const Point_3 &query, OutputIterator oi, const Computation_policy_3 policy=Computation_policy_3::FAST_WITH_EDGE_CASES)
 computes 3D mean value barycentric coordinates with respect to a closed triangle mesh.
 
template<typename OutputIterator , typename GeomTraits >
OutputIterator tetrahedron_coordinates (const typename GeomTraits::Point_3 &p0, const typename GeomTraits::Point_3 &p1, const typename GeomTraits::Point_3 &p2, const typename GeomTraits::Point_3 &p3, const typename GeomTraits::Point_3 &query, OutputIterator oi, const GeomTraits &traits)
 computes barycentric coordinates with respect to a tetrahedron.
 
template<typename GeomTraits >
std::array< typename GeomTraits::FT, 4 > tetrahedron_coordinates (const typename GeomTraits::Point_3 &p0, const typename GeomTraits::Point_3 &p1, const typename GeomTraits::Point_3 &p2, const typename GeomTraits::Point_3 &p3, const typename GeomTraits::Point_3 &query, const GeomTraits &traits)
 computes barycentric coordinates with respect to a tetrahedron.
 
template<typename Point_3 , typename TriangleMesh , typename OutputIterator >
OutputIterator wachspress_coordinates_3 (const TriangleMesh &tmesh, const Point_3 &query, OutputIterator oi, const Computation_policy_3 policy=Computation_policy_3::FAST)
 computes 3D Wachspress coordinates with respect to a closed convex triangle mesh.
 

Computation Policies

enum class  Computation_policy_3 { FAST = 0 , FAST_WITH_EDGE_CASES = 1 }
 Computation_policy_3 provides a way to choose an asymptotic time complexity of the algorithm and its precision for computing 3D barycentric weights and coordinates. More...
 

Definition

The namespace Barycentric_coordinates contains implementations of all generalized barycentric coordinates: 2D, 3D, related enumerations, etc.

Enumeration Type Documentation

◆ Computation_policy_3

Computation_policy_3 provides a way to choose an asymptotic time complexity of the algorithm and its precision for computing 3D barycentric weights and coordinates.

Enumerator
FAST 

Computation has a linear time complexity with respect to the number of face vertices, but may suffer imprecisions near the face boundary.

No extra checks are carried out.

FAST_WITH_EDGE_CASES 

Computation has a linear time complexity with respect to the number of face vertices, but may suffer imprecisions near the face boundary.

In addition, we check a position of the query point with respect to the face and use different computation strategies for different positions.

Examples
Barycentric_coordinates_3/discrete_harmonic_coordinates_3.cpp, Barycentric_coordinates_3/mean_value_coordinates_3.cpp, and Barycentric_coordinates_3/wachspress_coordinates_3.cpp.