PointCloud Class Reference

#include <RobotAPI/components/ArViz/Client/elements/PointCloud.h>

+ Inheritance diagram for PointCloud:

Public Member Functions

PointCloud & addPoint (ColoredPoint const &p)
 
template<class PointT>
PointCloud & addPoint (const PointT &p)
 Add a point with its "natural" color.
 
template<class PointT>
PointCloud & addPoint (const PointT &p, bool colorByLabel)
 Add a colored or labeled point.
 
template<class PointT>
PointCloud & addPoint (const PointT &p, Color color)
 Add a point in the given color.
 
PointCloud & addPoint (float x, float y, float z)
 
template<typename ColorCoeff = int>
PointCloud & addPoint (float x, float y, float z, ColorCoeff r, ColorCoeff g, ColorCoeff b, ColorCoeff a=255)
 
PointCloud & addPoint (float x, float y, float z, const data::Color &color)
 
PointCloud & addPoint (float x, float y, float z, const simox::Color &color)
 
PointCloud & addPoint (float x, float y, float z, std::size_t id, int alpha=255)
 
PointCloud & addPointUnchecked (ColoredPoint const &p)
 
PointCloud & checkFinite (bool enabled=true)
 Enable or disable checking whether points are finite when adding them (disabled by default).
 
PointCloud & clear ()
 
 ElementOps (std::string const &id)
 
template<class PointCloudT>
PointCloud & pointCloud (const PointCloudT &cloud)
 Draw a point cloud.
 
template<class PointCloudT>
PointCloud & pointCloud (const PointCloudT &cloud, bool colorByLabel)
 Draw a point cloud.
 
template<class PointCloudT>
PointCloud & pointCloud (const PointCloudT &cloud, Color color)
 Draw a unicolored point cloud with given color.
 
template<class PointCloudT, class ColorFuncT>
PointCloud & pointCloud (const PointCloudT &cloud, const ColorFuncT &colorFunc)
 Draw a colored point cloud with custom colors.
 
template<class PointCloudT>
PointCloud & pointCloud (const PointCloudT &cloud, const std::vector< int > &indices)
 Draw a point cloud with given indices.
 
template<class PointCloudT>
PointCloud & pointCloud (const PointCloudT &cloud, const std::vector< int > &indices, bool colorByLabel)
 Draw a point cloud with given indices.
 
template<class PointCloudT>
PointCloud & pointCloud (const PointCloudT &cloud, const std::vector< int > &indices, Color color)
 Draw a unicolored point cloud with given color and indices.
 
template<class PointCloudT, class ColorFuncT>
PointCloud & pointCloud (const PointCloudT &cloud, const std::vector< int > &indices, const ColorFuncT &colorFunc)
 Draw a colored point cloud with custom colors and given indices.
 
template<class PointCloudT, class ScalarFuncT>
PointCloud & pointCloud (const PointCloudT &pointCloud, const simox::ColorMap &colorMap, const ScalarFuncT &scalarFunc)
 Draw a colored point cloud with using a color map.
 
template<class PointCloudT, class ScalarFuncT>
PointCloud & pointCloud (const PointCloudT &pointCloud, const std::vector< int > &indices, const simox::ColorMap &colorMap, const ScalarFuncT &scalarFunc)
 Draw a colored point cloud with using a color map and given indices.
 
PointCloud & points (std::vector< ColoredPoint > const &ps)
 
PointCloud & pointSizeInPixels (float s)
 
template<class PointCloudT, class PointFunc>
PointCloud & setPointCloud (const PointCloudT &cloud, const PointFunc &pointFunc, bool clear=true)
 Set the point cloud from a pcl::PointCloud.
 
template<class PointCloudT, class PointFunc>
PointCloud & setPointCloud (const PointCloudT &cloud, const std::vector< int > &indices, const PointFunc &pointFunc, bool clear=true)
 Set the point cloud from a pcl::PointCloud.
 
PointCloud & transparency (float t)
 
- Public Member Functions inherited from ElementOps< PointCloud, data::ElementPointCloud >
PointCloud & color (Color color)
 
PointCloud & color (Ts &&... ts)
 
PointCloud & colorGlasbeyLUT (std::size_t id, int alpha=255)
 
 ElementOps (std::string const &id)
 
PointCloud & enable (InteractionDescription const &interactionDescription)
 
PointCloud & hide ()
 
PointCloud & id (const std::string &id)
 
PointCloud & orientation (Eigen::Matrix3f const &ori)
 
PointCloud & orientation (Eigen::Quaternionf const &ori)
 
PointCloud & orientation (float r, float p, float y)
 
PointCloud & overrideMaterial (bool value)
 
Eigen::Matrix4f pose () const
 
PointCloud & pose (const Eigen::Affine3f &pose)
 
PointCloud & pose (Eigen::Matrix4f const &pose)
 
PointCloud & pose (Eigen::Vector3f const &position, Eigen::Matrix3f const &orientation)
 
PointCloud & pose (Eigen::Vector3f const &position, Eigen::Quaternionf const &orientation)
 
PointCloud & position (Eigen::Vector3f const &pos)
 
PointCloud & position (float x, float y, float z)
 
PointCloud & scale (Eigen::Vector3f scale)
 
PointCloud & scale (float s)
 
PointCloud & scale (float x, float y, float z)
 
PointCloud & show ()
 
PointCloud & transformPose (Eigen::Matrix4f const &p)
 
PointCloud & visible (bool visible)
 

Additional Inherited Members

- Public Attributes inherited from ElementOps< PointCloud, data::ElementPointCloud >
IceInternal::Handle< data::ElementPointCloud > data_
 

Member Function Documentation

◆ addPoint() [1/9]

PointCloud & addPoint ( ColoredPoint const & p)
inline

◆ addPoint() [2/9]

template<class PointT>
PointCloud & addPoint ( const PointT & p)
inline

Add a point with its "natural" color.

If the point has label, the corresponding Glasbey color is used. If the point has r, g, b, a (but no label, its RGBA is used. Otherwise, its color will be grey.

Parameters
pPoint with members x, y, z, optionally label, optionally r, g, b, a.

◆ addPoint() [3/9]

template<class PointT>
PointCloud & addPoint ( const PointT & p,
bool colorByLabel )
inline

Add a colored or labeled point.

Parameters
pPoint with members x, y, z, r, g, b, a, label.
colorByLabelWhether to color the point by label (true) or by its RGBA (false).

◆ addPoint() [4/9]

template<class PointT>
PointCloud & addPoint ( const PointT & p,
Color color )
inline

Add a point in the given color.

◆ addPoint() [5/9]

PointCloud & addPoint ( float x,
float y,
float z )
inline

◆ addPoint() [6/9]

template<typename ColorCoeff = int>
PointCloud & addPoint ( float x,
float y,
float z,
ColorCoeff r,
ColorCoeff g,
ColorCoeff b,
ColorCoeff a = 255 )
inline

◆ addPoint() [7/9]

PointCloud & addPoint ( float x,
float y,
float z,
const data::Color & color )
inline

◆ addPoint() [8/9]

PointCloud & addPoint ( float x,
float y,
float z,
const simox::Color & color )
inline

◆ addPoint() [9/9]

PointCloud & addPoint ( float x,
float y,
float z,
std::size_t id,
int alpha = 255 )
inline

◆ addPointUnchecked()

PointCloud & addPointUnchecked ( ColoredPoint const & p)
inline

◆ checkFinite()

PointCloud & checkFinite ( bool enabled = true)
inline

Enable or disable checking whether points are finite when adding them (disabled by default).

Call this function (with no argument or true) before adding points to enable checking.

Non-finite points can break visualization (e.g. produce a white screen), so enable this if your point cloud may contain non-finite points.

See also
isfinite()

◆ clear()

PointCloud & clear ( )
inline

◆ ElementOps()

ElementOps ( std::string const & id)
inline

◆ pointCloud() [1/10]

template<class PointCloudT>
PointCloud & pointCloud ( const PointCloudT & cloud)
inline

Draw a point cloud.

◆ pointCloud() [2/10]

template<class PointCloudT>
PointCloud & pointCloud ( const PointCloudT & cloud,
bool colorByLabel )
inline

Draw a point cloud.

◆ pointCloud() [3/10]

template<class PointCloudT>
PointCloud & pointCloud ( const PointCloudT & cloud,
Color color )
inline

Draw a unicolored point cloud with given color.

◆ pointCloud() [4/10]

template<class PointCloudT, class ColorFuncT>
PointCloud & pointCloud ( const PointCloudT & cloud,
const ColorFuncT & colorFunc )
inline

Draw a colored point cloud with custom colors.

The color of a point is specified by colorFunc, which must be a callable taking an element of pointCloud and returning its color as viz::Color or simox::Color.

◆ pointCloud() [5/10]

template<class PointCloudT>
PointCloud & pointCloud ( const PointCloudT & cloud,
const std::vector< int > & indices )
inline

Draw a point cloud with given indices.

◆ pointCloud() [6/10]

template<class PointCloudT>
PointCloud & pointCloud ( const PointCloudT & cloud,
const std::vector< int > & indices,
bool colorByLabel )
inline

Draw a point cloud with given indices.

◆ pointCloud() [7/10]

template<class PointCloudT>
PointCloud & pointCloud ( const PointCloudT & cloud,
const std::vector< int > & indices,
Color color )
inline

Draw a unicolored point cloud with given color and indices.

◆ pointCloud() [8/10]

template<class PointCloudT, class ColorFuncT>
PointCloud & pointCloud ( const PointCloudT & cloud,
const std::vector< int > & indices,
const ColorFuncT & colorFunc )
inline

Draw a colored point cloud with custom colors and given indices.

◆ pointCloud() [9/10]

template<class PointCloudT, class ScalarFuncT>
PointCloud & pointCloud ( const PointCloudT & pointCloud,
const simox::ColorMap & colorMap,
const ScalarFuncT & scalarFunc )
inline

Draw a colored point cloud with using a color map.

The color of a point is specified by colorMap and scalarFunc. scalarFunc must be a callable taking an element of pointCloud and returning a scalar value which is passed to colorMap to retrieve the point's color.

◆ pointCloud() [10/10]

template<class PointCloudT, class ScalarFuncT>
PointCloud & pointCloud ( const PointCloudT & pointCloud,
const std::vector< int > & indices,
const simox::ColorMap & colorMap,
const ScalarFuncT & scalarFunc )
inline

Draw a colored point cloud with using a color map and given indices.

◆ points()

PointCloud & points ( std::vector< ColoredPoint > const & ps)
inline

◆ pointSizeInPixels()

PointCloud & pointSizeInPixels ( float s)
inline

◆ setPointCloud() [1/2]

template<class PointCloudT, class PointFunc>
PointCloud & setPointCloud ( const PointCloudT & cloud,
const PointFunc & pointFunc,
bool clear = true )
inline

Set the point cloud from a pcl::PointCloud.

Parameters
cloudThe point cloud.
pointFuncA function processing each point, taking an element of cloud.
checkFiniteEnable or disable checking whether points are finite (enabled by default). Points containing infinity can break visualization (e.g. produce a white screen).
clearWhether to clear the point cloud beforehand (true by default).
Returns
*this

◆ setPointCloud() [2/2]

template<class PointCloudT, class PointFunc>
PointCloud & setPointCloud ( const PointCloudT & cloud,
const std::vector< int > & indices,
const PointFunc & pointFunc,
bool clear = true )
inline

Set the point cloud from a pcl::PointCloud.

Parameters
cloudThe source point cloud.
indicesThe indices to add.
pointFuncA function processing each point, taking an element of each indices and cloud.
checkFiniteEnable or disable checking whether points are finite (enabled by default). Points containing infinity can break visualization (e.g. produce a white screen).
clearWhether to clear the point cloud beforehand (true by default).
Returns
*this

◆ transparency()

PointCloud & transparency ( float t)
inline

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