Skip to content

Class Argos::CentroidSampler

ClassList > Argos > CentroidSampler

Surface sampler that places one point at the centroid of each face. More...

  • #include <CentroidSampler.h>

Inherits the following classes: Argos::ISurfaceSampler

Public Functions

Type Name
CentroidSampler ()
virtual std::string name () override const
Short identifier of the sampler.
virtual PointCloud sample (const Mesh & mesh) override
Sample one point per face at its centroid.

Public Functions inherited from Argos::ISurfaceSampler

See Argos::ISurfaceSampler

Type Name
virtual std::string name () const = 0
Short identifier of the strategy.
virtual PointCloud sample (const Mesh & mesh) = 0
Sample a point cloud from a mesh.
virtual ~ISurfaceSampler () = default

Detailed Description

For each face in the mesh, the centroid is computed as the average of its vertex positions. The resulting point cloud has exactly one point per face.

Public Functions Documentation

function CentroidSampler

inline explicit Argos::CentroidSampler::CentroidSampler () 

function name

Short identifier of the sampler.

inline virtual std::string Argos::CentroidSampler::name () override const

Returns:

"(CentroidSampler)".

Implements Argos::ISurfaceSampler::name


function sample

Sample one point per face at its centroid.

virtual PointCloud Argos::CentroidSampler::sample (
    const  Mesh & mesh
) override

Parameters:

  • mesh Input mesh.

Returns:

Point cloud with one point per face of mesh.

Implements Argos::ISurfaceSampler::sample



The documentation for this class was generated from the following file include/algos/mesh_to_pointcloud/CentroidSampler.h