Spinnaker SDK C++
4.2.0.46
 
 

 
Loading...
Searching...
No Matches

Classes

class  PointCloud
 The PointCloud object class. More...
 

Functions

 PointCloud ()
 Create an PointCloud object.
 
 ~PointCloud ()
 Destroy the PointCloud object.
 
PointCloudoperator= (const PointCloud &otherPointCloud)
 Assignment operator.
 
void AddPoint (const Stereo3DPoint point)
 Adds a point to the point cloud.
 
Stereo3DPoint GetPoint (const unsigned int index) const
 Returns the Stereo3DPoint at the specified index.
 
size_t GetNumPoints () const
 Returns the number of points in the point cloud.
 
void SavePointCloudAsPly (const std::string &) const
 The function writes the point cloud data to the specified file in PLY format.
 
void LoadPointCloudFromPly (const std::string &filename)
 The function reads the file and parses the data into a vector of 3D points.
 
void PrintPoints (unsigned int numPointsToPrint) const
 The function prints a number of points from the point cloud to the console.
 
PointCloudData * GetPointCloudData () const
 

Friends

class PointCloudImpl
 

Detailed Description

Function Documentation

◆ AddPoint()

void AddPoint ( const Stereo3DPoint  point)
virtual

Adds a point to the point cloud.

Parameters
[in]pointThe point to be added.

Implements IPointCloud.

◆ GetNumPoints()

size_t GetNumPoints ( ) const
virtual

Returns the number of points in the point cloud.

Returns
The number of points in the point cloud.

Implements IPointCloud.

◆ GetPoint()

Stereo3DPoint GetPoint ( const unsigned int  index) const
virtual

Returns the Stereo3DPoint at the specified index.

Returns
Stereo3DPoint object

Implements IPointCloud.

◆ GetPointCloudData()

PointCloudData * GetPointCloudData ( ) const
protectedvirtual

Implements IPointCloud.

◆ LoadPointCloudFromPly()

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

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.

Loads a point cloud from a PLY file.

Parameters
[in]filenameThe path to the PLY file to be loaded.
See also
SavePointCloudAsPly()

Implements IPointCloud.

◆ operator=()

PointCloud & operator= ( const PointCloud otherPointCloud)

Assignment operator.

◆ PointCloud()

Create an PointCloud object.

◆ PrintPoints()

void PrintPoints ( unsigned int  numPointsToPrint) const
virtual

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.

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

Parameters
[in]numPointsToPrintThe number of points to print.

Implements IPointCloud.

◆ SavePointCloudAsPly()

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

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.

Saves the point cloud to a PLY file.

Parameters
[in]filenameThe path to the PLY file to be saved.
See also
LoadPointCloudFromPly()

Implements IPointCloud.

Examples
StereoAcquisition.cpp, and StereoAcquisition_QuickSpin.cpp.

◆ ~PointCloud()

~PointCloud ( )

Destroy the PointCloud object.

Friends

◆ PointCloudImpl

friend class PointCloudImpl
friend