Skip to content

Group PointCloud_h

Modules > PointCloud_h

Classes

Type Name
class Spinnaker::PointCloud
The PointCloud object class.

Public Functions

Type Name
virtual void AddPoint (const Stereo3DPoint point)
Adds a point to the point cloud.
void Clear ()
virtual size_t GetNumPoints () const
Returns the number of points in the point cloud.
virtual Stereo3DPoint GetPoint (const unsigned int index) const
Returns the Stereo3DPoint at the specified index.
virtual void LoadPointCloudFromPly (const std::string & filename)
Loads a point cloud from a PLY file.
PointCloud ()
Create an PointCloud object.
PointCloud (const PointCloud & other)
virtual void PrintPoints (unsigned int numPointsToPrint) const
Prints a number of points from the point cloud to the console.
virtual void SavePointCloudAsPly (const std::string &) const
Saves the point cloud to a PLY file.
PointCloud & operator= (const PointCloud & otherPointCloud)
~PointCloud ()
Destroy the PointCloud object.

Protected Functions

Type Name
virtual PointCloudData * GetPointCloudData () const

Public Functions Documentation

function AddPoint

Adds a point to the point cloud.

virtual void AddPoint (
    const Stereo3DPoint point
) 

Parameters:

  • point The point to be added.

Implements Spinnaker::IPointCloud::AddPoint


function Clear

void Clear () 

Clears all points from the point cloud.


function GetNumPoints

Returns the number of points in the point cloud.

virtual size_t GetNumPoints () const

Returns:

The number of points in the point cloud.

Implements Spinnaker::IPointCloud::GetNumPoints


function GetPoint

Returns the Stereo3DPoint at the specified index.

virtual Stereo3DPoint GetPoint (
    const unsigned int index
) const

Returns:

Stereo3DPoint object

Implements Spinnaker::IPointCloud::GetPoint


function LoadPointCloudFromPly

Loads a point cloud from a PLY file.

virtual void LoadPointCloudFromPly (
    const std::string & filename
) 

The function reads the file and parses the data into a vector of 3D points. The data is then stored in the class as a vector of Stereo3DPoint objects.

Parameters:

  • filename The path to the PLY file to be loaded.

See also: SavePointCloudAsPly()

Implements Spinnaker::IPointCloud::LoadPointCloudFromPly


function PointCloud

Create an PointCloud object.

PointCloud () 


function PointCloud

PointCloud (
    const PointCloud & other
) 

Copy Constructor


function PrintPoints

Prints a number of points from the point cloud to the console.

virtual void PrintPoints (
    unsigned int numPointsToPrint
) const

The function prints a number of points from the point cloud to the console. The number of points to print is specified by the user. The points are printed in the following format: x, y, z, r, g, b, i, j.

Parameters:

  • numPointsToPrint The number of points to print.

Implements Spinnaker::IPointCloud::PrintPoints


function SavePointCloudAsPly

Saves the point cloud to a PLY file.

virtual void SavePointCloudAsPly (
    const std::string &
) const

The function writes the point cloud data to the specified file in PLY format. The data is written in the order of x, y, z, color (red, green, blue, alpha), image x, image y. The point cloud data is written as a binary file.

Parameters:

  • filename The path to the PLY file to be saved.

See also: LoadPointCloudFromPly()

Implements Spinnaker::IPointCloud::SavePointCloudAsPly


function operator=

PointCloud & operator= (
    const PointCloud & otherPointCloud
) 

Assignment operator.


function ~PointCloud

Destroy the PointCloud object.

~PointCloud () 


Protected Functions Documentation

function GetPointCloudData

virtual PointCloudData * GetPointCloudData () const

Implements Spinnaker::IPointCloud::GetPointCloudData