CGAL 5.3.2 - 2D and 3D Linear Geometry Kernel

See also
CGAL::barycenter()

Functions

template<typename Kernel >
CGAL::Point_2< KernelCGAL::centroid (const CGAL::Point_2< Kernel > &p, const CGAL::Point_2< Kernel > &q, const CGAL::Point_2< Kernel > &r)
 compute the centroid of the points p, q, and r.
 
template<typename Kernel >
CGAL::Point_2< KernelCGAL::centroid (const CGAL::Point_2< Kernel > &p, const CGAL::Point_2< Kernel > &q, const CGAL::Point_2< Kernel > &r, const CGAL::Point_2< Kernel > &s)
 compute the centroid of the points p, q, r, and s.
 
template<typename Kernel >
CGAL::Point_2< KernelCGAL::centroid (const CGAL::Triangle_2< Kernel > &t)
 compute the centroid of the triangle t.
 
template<typename Kernel >
CGAL::Point_3< KernelCGAL::centroid (const CGAL::Point_3< Kernel > &p, const CGAL::Point_3< Kernel > &q, const CGAL::Point_3< Kernel > &r)
 compute the centroid of the points p, q, and r.
 
template<typename Kernel >
CGAL::Point_3< KernelCGAL::centroid (const CGAL::Point_3< Kernel > &p, const CGAL::Point_3< Kernel > &q, const CGAL::Point_3< Kernel > &r, const CGAL::Point_3< Kernel > &s)
 compute the centroid of the points p, q, r, and s.
 
template<typename Kernel >
CGAL::Point_3< KernelCGAL::centroid (const CGAL::Triangle_3< Kernel > &t)
 compute the centroid of the triangle t.
 
template<typename Kernel >
CGAL::Point_3< KernelCGAL::centroid (const CGAL::Tetrahedron_3< Kernel > &t)
 compute the centroid of the tetrahedron t.