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. More...
 
template<class PointT >
PointCloudaddPoint (const PointT &p, bool colorByLabel)
 Add a colored or labeled point. More...
 
template<class PointT >
PointCloudaddPoint (const PointT &p, Color color)
 Add a point in the given color. More...
 
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). More...
 
PointCloudclear ()
 
 ElementOps (std::string const &id)
 
template<class PointCloudT >
PointCloudpointCloud (const PointCloudT &cloud)
 Draw a point cloud. More...
 
template<class PointCloudT >
PointCloudpointCloud (const PointCloudT &cloud, bool colorByLabel)
 Draw a point cloud. More...
 
template<class PointCloudT >
PointCloudpointCloud (const PointCloudT &cloud, Color color)
 Draw a unicolored point cloud with given color. More...
 
template<class PointCloudT , class ColorFuncT >
PointCloudpointCloud (const PointCloudT &cloud, const ColorFuncT &colorFunc)
 Draw a colored point cloud with custom colors. More...
 
template<class PointCloudT >
PointCloudpointCloud (const PointCloudT &cloud, const std::vector< int > &indices)
 Draw a point cloud with given indices. More...
 
template<class PointCloudT >
PointCloudpointCloud (const PointCloudT &cloud, const std::vector< int > &indices, bool colorByLabel)
 Draw a point cloud with given indices. More...
 
template<class PointCloudT >
PointCloudpointCloud (const PointCloudT &cloud, const std::vector< int > &indices, Color color)
 Draw a unicolored point cloud with given color and indices. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 21 of file PointCloud.h.

Member Function Documentation

◆ addPoint() [1/9]

PointCloud& addPoint ( ColoredPoint const &  p)
inline

Definition at line 83 of file PointCloud.h.

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

◆ addPoint() [2/9]

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 154 of file PointCloud.h.

+ Here is the call graph for this function:

◆ addPoint() [3/9]

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 177 of file PointCloud.h.

+ Here is the call graph for this function:

◆ addPoint() [4/9]

PointCloud& addPoint ( const PointT p,
Color  color 
)
inline

Add a point in the given color.

Definition at line 139 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 122 of file PointCloud.h.

+ Here is the call graph for this function:

◆ addPoint() [6/9]

PointCloud& addPoint ( float  x,
float  y,
float  z,
ColorCoeff  r,
ColorCoeff  g,
ColorCoeff  b,
ColorCoeff  a = 255 
)
inline

Definition at line 117 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 111 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 127 of file PointCloud.h.

+ Here is the call graph for this function:

◆ addPointUnchecked()

PointCloud& addPointUnchecked ( ColoredPoint const &  p)
inline

Definition at line 93 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 41 of file PointCloud.h.

+ Here is the caller graph for this function:

◆ clear()

PointCloud& clear ( )
inline

Definition at line 64 of file PointCloud.h.

+ Here is the caller graph for this function:

◆ ElementOps()

ElementOps
inline

Definition at line 111 of file ElementOps.h.

◆ pointCloud() [1/10]

PointCloud& pointCloud ( const PointCloudT cloud)
inline

Draw a point cloud.

Definition at line 194 of file PointCloud.h.

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

◆ pointCloud() [2/10]

PointCloud& pointCloud ( const PointCloudT cloud,
bool  colorByLabel 
)
inline

Draw a point cloud.

Definition at line 225 of file PointCloud.h.

+ Here is the call graph for this function:

◆ pointCloud() [3/10]

PointCloud& pointCloud ( const PointCloudT cloud,
Color  color 
)
inline

Draw a unicolored point cloud with given color.

Definition at line 214 of file PointCloud.h.

+ Here is the call graph for this function:

◆ pointCloud() [4/10]

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 265 of file PointCloud.h.

+ Here is the call graph for this function:

◆ pointCloud() [5/10]

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

Draw a point cloud with given indices.

Definition at line 204 of file PointCloud.h.

+ Here is the call graph for this function:

◆ pointCloud() [6/10]

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

Draw a point cloud with given indices.

Definition at line 235 of file PointCloud.h.

+ Here is the call graph for this function:

◆ pointCloud() [7/10]

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 246 of file PointCloud.h.

+ Here is the call graph for this function:

◆ pointCloud() [8/10]

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 277 of file PointCloud.h.

+ Here is the call graph for this function:

◆ pointCloud() [9/10]

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 295 of file PointCloud.h.

+ Here is the call graph for this function:

◆ pointCloud() [10/10]

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 308 of file PointCloud.h.

+ Here is the call graph for this function:

◆ points()

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

Definition at line 71 of file PointCloud.h.

◆ pointSizeInPixels()

PointCloud& pointSizeInPixels ( float  s)
inline

Definition at line 55 of file PointCloud.h.

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

◆ setPointCloud() [1/2]

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 333 of file PointCloud.h.

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

◆ setPointCloud() [2/2]

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 362 of file PointCloud.h.

+ Here is the call graph for this function:

◆ transparency()

PointCloud& transparency ( float  t)
inline

Definition at line 48 of file PointCloud.h.

+ Here is the caller graph for this function:

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