PointCloud Class Reference

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

+ Inheritance diagram for PointCloud:

Public Member Functions

PointCloudaddPoint (ColoredPoint const &p)
 
template<class PointT>
PointCloudaddPoint (const PointT &p)
 Add a point with its "natural" color.
 
template<class PointT>
PointCloudaddPoint (const PointT &p, bool colorByLabel)
 Add a colored or labeled point.
 
template<class PointT>
PointCloudaddPoint (const PointT &p, Color color)
 Add a point in the given color.
 
PointCloudaddPoint (float x, float y, float z)
 
template<typename ColorCoeff = int>
PointCloudaddPoint (float x, float y, float z, ColorCoeff r, ColorCoeff g, ColorCoeff b, ColorCoeff a=255)
 
PointCloudaddPoint (float x, float y, float z, const data::Color &color)
 
PointCloudaddPoint (float x, float y, float z, const simox::Color &color)
 
PointCloudaddPoint (float x, float y, float z, std::size_t id, int alpha=255)
 
PointCloudaddPointUnchecked (ColoredPoint const &p)
 
PointCloudcheckFinite (bool enabled=true)
 Enable or disable checking whether points are finite when adding them (disabled by default).
 
PointCloudclear ()
 
 ElementOps (std::string const &id)
 
template<class PointCloudT>
PointCloudpointCloud (const PointCloudT &cloud)
 Draw a point cloud.
 
template<class PointCloudT>
PointCloudpointCloud (const PointCloudT &cloud, bool colorByLabel)
 Draw a point cloud.
 
template<class PointCloudT>
PointCloudpointCloud (const PointCloudT &cloud, Color color)
 Draw a unicolored point cloud with given color.
 
template<class PointCloudT, class ColorFuncT>
PointCloudpointCloud (const PointCloudT &cloud, const ColorFuncT &colorFunc)
 Draw a colored point cloud with custom colors.
 
template<class PointCloudT>
PointCloudpointCloud (const PointCloudT &cloud, const std::vector< int > &indices)
 Draw a point cloud with given indices.
 
template<class PointCloudT>
PointCloudpointCloud (const PointCloudT &cloud, const std::vector< int > &indices, bool colorByLabel)
 Draw a point cloud with given indices.
 
template<class PointCloudT>
PointCloudpointCloud (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>
PointCloudpointCloud (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>
PointCloudpointCloud (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>
PointCloudpointCloud (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.
 
PointCloudpoints (std::vector< ColoredPoint > const &ps)
 
PointCloudpointSizeInPixels (float s)
 
template<class PointCloudT, class PointFunc>
PointCloudsetPointCloud (const PointCloudT &cloud, const PointFunc &pointFunc, bool clear=true)
 Set the point cloud from a pcl::PointCloud.
 
template<class PointCloudT, class PointFunc>
PointCloudsetPointCloud (const PointCloudT &cloud, const std::vector< int > &indices, const PointFunc &pointFunc, bool clear=true)
 Set the point cloud from a pcl::PointCloud.
 
PointCloudtransparency (float t)
 
- Public Member Functions inherited from ElementOps< PointCloud, data::ElementPointCloud >
PointCloudcolor (Color color)
 
PointCloudcolor (Ts &&... ts)
 
PointCloudcolorGlasbeyLUT (std::size_t id, int alpha=255)
 
 ElementOps (std::string const &id)
 
PointCloudenable (InteractionDescription const &interactionDescription)
 
PointCloudhide ()
 
PointCloudid (const std::string &id)
 
PointCloudorientation (Eigen::Matrix3f const &ori)
 
PointCloudorientation (Eigen::Quaternionf const &ori)
 
PointCloudorientation (float r, float p, float y)
 
PointCloudoverrideMaterial (bool value)
 
Eigen::Matrix4f pose () const
 
PointCloudpose (const Eigen::Affine3f &pose)
 
PointCloudpose (Eigen::Matrix4f const &pose)
 
PointCloudpose (Eigen::Vector3f const &position, Eigen::Matrix3f const &orientation)
 
PointCloudpose (Eigen::Vector3f const &position, Eigen::Quaternionf const &orientation)
 
PointCloudposition (Eigen::Vector3f const &pos)
 
PointCloudposition (float x, float y, float z)
 
PointCloudscale (Eigen::Vector3f scale)
 
PointCloudscale (float s)
 
PointCloudscale (float x, float y, float z)
 
PointCloudshow ()
 
PointCloudtransformPose (Eigen::Matrix4f const &p)
 
PointCloudvisible (bool visible)
 

Additional Inherited Members

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

Detailed Description

Definition at line 19 of file PointCloud.h.

Member Function Documentation

◆ addPoint() [1/9]

PointCloud & addPoint ( ColoredPoint const & p)
inline

Definition at line 81 of file PointCloud.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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.

Definition at line 165 of file PointCloud.h.

+ Here is the call graph for this function:

◆ 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).

Definition at line 189 of file PointCloud.h.

+ Here is the call graph for this function:

◆ addPoint() [4/9]

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

Add a point in the given color.

Definition at line 149 of file PointCloud.h.

+ Here is the call graph for this function:

◆ addPoint() [5/9]

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

Definition at line 131 of file PointCloud.h.

+ Here is the call graph for this function:

◆ 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

Definition at line 119 of file PointCloud.h.

+ Here is the call graph for this function:

◆ addPoint() [7/9]

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

Definition at line 101 of file PointCloud.h.

+ Here is the call graph for this function:

◆ addPoint() [8/9]

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

Definition at line 112 of file PointCloud.h.

+ Here is the call graph for this function:

◆ addPoint() [9/9]

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

Definition at line 137 of file PointCloud.h.

+ Here is the call graph for this function:

◆ addPointUnchecked()

PointCloud & addPointUnchecked ( ColoredPoint const & p)
inline

Definition at line 92 of file PointCloud.h.

+ Here is the caller graph for this function:

◆ 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()

Definition at line 38 of file PointCloud.h.

+ Here is the caller graph for this function:

◆ clear()

PointCloud & clear ( )
inline

Definition at line 62 of file PointCloud.h.

+ Here is the caller graph for this function:

◆ ElementOps()

ElementOps ( std::string const & id)
inline

Definition at line 119 of file ElementOps.h.

◆ pointCloud() [1/10]

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

Draw a point cloud.

Definition at line 206 of file PointCloud.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pointCloud() [2/10]

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

Draw a point cloud.

Definition at line 231 of file PointCloud.h.

+ Here is the call graph for this function:

◆ pointCloud() [3/10]

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

Draw a unicolored point cloud with given color.

Definition at line 222 of file PointCloud.h.

+ Here is the call graph for this function:

◆ 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.

Definition at line 267 of file PointCloud.h.

+ Here is the call graph for this function:

◆ pointCloud() [5/10]

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

Draw a point cloud with given indices.

Definition at line 214 of file PointCloud.h.

+ Here is the call graph for this function:

◆ 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.

Definition at line 240 of file PointCloud.h.

+ Here is the call graph for this function:

◆ 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.

Definition at line 251 of file PointCloud.h.

+ Here is the call graph for this function:

◆ 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.

Definition at line 278 of file PointCloud.h.

+ Here is the call graph for this function:

◆ 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.

Definition at line 297 of file PointCloud.h.

+ Here is the call graph for this function:

◆ 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.

Definition at line 311 of file PointCloud.h.

+ Here is the call graph for this function:

◆ points()

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

Definition at line 69 of file PointCloud.h.

◆ pointSizeInPixels()

PointCloud & pointSizeInPixels ( float s)
inline

Definition at line 53 of file PointCloud.h.

+ Here is the caller graph for this function:

◆ 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

Definition at line 338 of file PointCloud.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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

Definition at line 367 of file PointCloud.h.

+ Here is the call graph for this function:

◆ transparency()

PointCloud & transparency ( float t)
inline

Definition at line 45 of file PointCloud.h.

+ Here is the caller graph for this function:

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