CGAL 5.1 - 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. More...
 
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. More...
 
template<typename Kernel >
CGAL::Point_2< KernelCGAL::centroid (const CGAL::Triangle_2< Kernel > &t)
 compute the centroid of the triangle t. More...
 
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. More...
 
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. More...
 
template<typename Kernel >
CGAL::Point_3< KernelCGAL::centroid (const CGAL::Triangle_3< Kernel > &t)
 compute the centroid of the triangle t. More...
 
template<typename Kernel >
CGAL::Point_3< KernelCGAL::centroid (const CGAL::Tetrahedron_3< Kernel > &t)
 compute the centroid of the tetrahedron t. More...
 

Function Documentation

◆ centroid() [1/7]

template<typename Kernel >
CGAL::Point_2<Kernel> CGAL::centroid ( const CGAL::Point_2< Kernel > &  p,
const CGAL::Point_2< Kernel > &  q,
const CGAL::Point_2< Kernel > &  r 
)

#include <CGAL/Kernel/global_functions.h>

compute the centroid of the points p, q, and r.

◆ centroid() [2/7]

template<typename Kernel >
CGAL::Point_2<Kernel> CGAL::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 
)

#include <CGAL/Kernel/global_functions.h>

compute the centroid of the points p, q, r, and s.

◆ centroid() [3/7]

template<typename Kernel >
CGAL::Point_3<Kernel> CGAL::centroid ( const CGAL::Point_3< Kernel > &  p,
const CGAL::Point_3< Kernel > &  q,
const CGAL::Point_3< Kernel > &  r 
)

#include <CGAL/Kernel/global_functions.h>

compute the centroid of the points p, q, and r.

◆ centroid() [4/7]

template<typename Kernel >
CGAL::Point_3<Kernel> CGAL::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 
)

#include <CGAL/Kernel/global_functions.h>

compute the centroid of the points p, q, r, and s.

◆ centroid() [5/7]

template<typename Kernel >
CGAL::Point_3<Kernel> CGAL::centroid ( const CGAL::Tetrahedron_3< Kernel > &  t)

#include <CGAL/Kernel/global_functions.h>

compute the centroid of the tetrahedron t.

◆ centroid() [6/7]

template<typename Kernel >
CGAL::Point_2<Kernel> CGAL::centroid ( const CGAL::Triangle_2< Kernel > &  t)

#include <CGAL/Kernel/global_functions.h>

compute the centroid of the triangle t.

◆ centroid() [7/7]

template<typename Kernel >
CGAL::Point_3<Kernel> CGAL::centroid ( const CGAL::Triangle_3< Kernel > &  t)

#include <CGAL/Kernel/global_functions.h>

compute the centroid of the triangle t.