Zivid C++ API  1.8.1+6967bc1b-1
Defining the Future of 3D Machine Vision
Public Member Functions | List of all members
Zivid::PointCloud Class Reference

A point cloud with x,y,z, contrast and color data laid out on a 2D grid. More...

#include <Zivid/PointCloud.h>

Public Member Functions

ZIVID_API_EXPORT PointCloud ()
 Construct an empty point cloud More...
 
ZIVID_API_EXPORT PointCloud (size_t rows, size_t cols)
 Allocate an organized point cloud with a given number of rows and columns More...
 
ZIVID_API_EXPORT bool isEmpty () const
 Return whether point cloud is empty More...
 
ZIVID_API_EXPORT size_t width () const
 Return width (number of columns) of point cloud More...
 
ZIVID_API_EXPORT size_t height () const
 Return height (number of rows) of point cloud More...
 
ZIVID_API_EXPORT size_t size () const
 Return number of points in point cloud More...
 
ZIVID_API_EXPORT Pointoperator() (size_t idx)
 Obtain a reference to a point given by a 1D linear index More...
 
const ZIVID_API_EXPORT Pointoperator() (size_t idx) const
 Obtain a constant reference to a point given by a 1D linear index. More...
 
ZIVID_API_EXPORT Pointoperator() (size_t i, size_t j)
 Obtain a reference to a point given by row and column More...
 
const ZIVID_API_EXPORT Pointoperator() (size_t i, size_t j) const
 Obtain a constant reference to a point given by row and column More...
 
ZIVID_API_EXPORT void resize (size_t rows, size_t cols)
 Resize the point cloud to the given number of rows and columns More...
 
ZIVID_API_EXPORT PointdataPtr ()
 Obtain a pointer to the first point in the point cloud More...
 
const ZIVID_API_EXPORT PointdataPtr () const
 Obtain a const pointer to the first point in the point cloud More...
 
ZIVID_API_EXPORT PointCloud clone ()
 Make a deep copy of the point cloud More...
 
ZIVID_API_EXPORT std::string toString () const
 Get string representation of the point cloud More...
 

Detailed Description

A point cloud with x,y,z, contrast and color data laid out on a 2D grid.

Constructor & Destructor Documentation

◆ PointCloud() [1/2]

ZIVID_API_EXPORT Zivid::PointCloud::PointCloud ( )

Construct an empty point cloud

◆ PointCloud() [2/2]

ZIVID_API_EXPORT Zivid::PointCloud::PointCloud ( size_t  rows,
size_t  cols 
)

Allocate an organized point cloud with a given number of rows and columns

Member Function Documentation

◆ clone()

ZIVID_API_EXPORT PointCloud Zivid::PointCloud::clone ( )

Make a deep copy of the point cloud

◆ dataPtr() [1/2]

ZIVID_API_EXPORT Point* Zivid::PointCloud::dataPtr ( )

Obtain a pointer to the first point in the point cloud

◆ dataPtr() [2/2]

const ZIVID_API_EXPORT Point* Zivid::PointCloud::dataPtr ( ) const

Obtain a const pointer to the first point in the point cloud

◆ height()

ZIVID_API_EXPORT size_t Zivid::PointCloud::height ( ) const

Return height (number of rows) of point cloud

◆ isEmpty()

ZIVID_API_EXPORT bool Zivid::PointCloud::isEmpty ( ) const

Return whether point cloud is empty

◆ operator()() [1/4]

ZIVID_API_EXPORT Point& Zivid::PointCloud::operator() ( size_t  i,
size_t  j 
)

Obtain a reference to a point given by row and column

Parameters
iRow
jColumn

◆ operator()() [2/4]

const ZIVID_API_EXPORT Point& Zivid::PointCloud::operator() ( size_t  i,
size_t  j 
) const

Obtain a constant reference to a point given by row and column

Parameters
iRow
jColumn

◆ operator()() [3/4]

ZIVID_API_EXPORT Point& Zivid::PointCloud::operator() ( size_t  idx)

Obtain a reference to a point given by a 1D linear index

Parameters
idxLinear 1D index (from 0 to number of points)

◆ operator()() [4/4]

const ZIVID_API_EXPORT Point& Zivid::PointCloud::operator() ( size_t  idx) const

Obtain a constant reference to a point given by a 1D linear index.

Parameters
idxLinear 1D index (from 0 to number of points)

◆ resize()

ZIVID_API_EXPORT void Zivid::PointCloud::resize ( size_t  rows,
size_t  cols 
)

Resize the point cloud to the given number of rows and columns

◆ size()

ZIVID_API_EXPORT size_t Zivid::PointCloud::size ( ) const

Return number of points in point cloud

◆ toString()

ZIVID_API_EXPORT std::string Zivid::PointCloud::toString ( ) const

Get string representation of the point cloud

Returns
Point cloud info as string

◆ width()

ZIVID_API_EXPORT size_t Zivid::PointCloud::width ( ) const

Return width (number of columns) of point cloud


The documentation for this class was generated from the following file: