Skip to content

Class Argos::PointCloud

ClassList > Argos > PointCloud

A collection of 3D points forming an unorganised point cloud. More...

  • #include <PointCloud.h>

Public Functions

Type Name
PointCloud () = default
Default constructor — creates an empty point cloud.
PointCloud (const std::vector< Vector3D< double > > & points)
Construct a point cloud from an existing list of points.
void addPoint (const Vector3D< double > & p)
Append a single point.
void clear ()
Remove all points.
bool empty () const
Whether the cloud contains no points.
const std::vector< Vector3D< double > > & getPoints () const
Const access to all points.
void print (std::ostream & os=std::cout) const
Print a human-readable summary to a stream.
void reserve (std::size_t n)
Pre-allocate storage for n points.
void saveAsObj (std::ostream & filename) const
Export the points as a Wavefront OBJ file (vertices only).
std::size_t size () const
Number of points in the cloud.

Detailed Description

Provides basic storage, iteration, and OBJ export capabilities. Commonly used as the output of surface sampling algorithms and as input to surface reconstruction.

Public Functions Documentation

function PointCloud [1/2]

Default constructor — creates an empty point cloud.

Argos::PointCloud::PointCloud () = default


function PointCloud [2/2]

Construct a point cloud from an existing list of points.

inline explicit Argos::PointCloud::PointCloud (
    const std::vector< Vector3D < double > > & points
) 

Parameters:

  • points The 3D points to store.

function addPoint

Append a single point.

inline void Argos::PointCloud::addPoint (
    const  Vector3D < double > & p
) 

Parameters:

  • p The point to add.

function clear

Remove all points.

inline void Argos::PointCloud::clear () 


function empty

Whether the cloud contains no points.

inline bool Argos::PointCloud::empty () const


function getPoints

Const access to all points.

inline const std::vector< Vector3D < double > > & Argos::PointCloud::getPoints () const


function print

Print a human-readable summary to a stream.

inline void Argos::PointCloud::print (
    std::ostream & os=std::cout
) const

Parameters:

  • os Output stream (defaults to std::cout).

function reserve

Pre-allocate storage for n points.

inline void Argos::PointCloud::reserve (
    std::size_t n
) 

Parameters:

  • n Capacity to reserve.

function saveAsObj

Export the points as a Wavefront OBJ file (vertices only).

inline void Argos::PointCloud::saveAsObj (
    std::ostream & filename
) const

Parameters:

  • filename Output stream to write the OBJ data to.

function size

Number of points in the cloud.

inline std::size_t Argos::PointCloud::size () const



The documentation for this class was generated from the following file include/point_cloud/PointCloud.h