Class PointCloud

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

  • public Ogre::MovableObject

Class Documentation

class PointCloud : public Ogre::MovableObject

A visual representation of a set of points.

Displays a set of points using any number of Ogre BillboardSets. PointCloud is optimized for sets of points that change rapidly, rather than for large clouds that never change.

Most of the functions in PointCloud are not safe to call from any thread but the render thread. Exceptions are clear() and addPoints(), which are safe as long as we are not in the middle of a render (ie. Ogre::Root::renderOneFrame, or Ogre::RenderWindow::update).

Public Types

enum RenderMode

Values:

enumerator RM_POINTS
enumerator RM_SQUARES
enumerator RM_FLAT_SQUARES
enumerator RM_SPHERES
enumerator RM_TILES
enumerator RM_BOXES

Public Functions

RVIZ_RENDERING_PUBLIC PointCloud()
virtual RVIZ_RENDERING_PUBLIC ~PointCloud()
RVIZ_RENDERING_PUBLIC void clear ()

Clear all the points.

RVIZ_RENDERING_PUBLIC void clearAndRemoveAllPoints ()

calls clear() and removes all elements from points_

RVIZ_RENDERING_PUBLIC void addPoints (std::vector< Point >::iterator start_iterator, std::vector< Point >::iterator end_iterator)

Add points to this point cloud.

Parameters:
  • start_iterator – A std::vector::iterator to the start of the point vector to be added

  • end_iterator – A std::vector::iterator to the end of the point vector to be added

RVIZ_RENDERING_PUBLIC void popPoints (uint32_t num_points)

Remove a number of points from this point cloud.

Parameters:

num_points – The number of points to pop

RVIZ_RENDERING_PUBLIC std::vector< Point > getPoints ()
RVIZ_RENDERING_PUBLIC void setRenderMode (RenderMode mode)

Set type of rendering primitive to used; supports points, billboards, spheres and boxes.

RVIZ_RENDERING_PUBLIC void setDimensions (float width, float height, float depth)

Set the dimensions of the billboards used to render each point.

Width/height are only applicable to billboards and boxes, depth is only applicable to boxes.

RVIZ_RENDERING_PUBLIC void setAutoSize (bool auto_size)

If set to true, the size of each point will be multiplied by its z component.

Note

(Used for depth image based point clouds)

Parameters:

auto_size – resize in shaders

RVIZ_RENDERING_PUBLIC void setCommonDirection (const Ogre::Vector3 &vec)

See Ogre::BillboardSet::setCommonDirection.

RVIZ_RENDERING_PUBLIC void setCommonUpVector (const Ogre::Vector3 &vec)

See Ogre::BillboardSet::setCommonUpVector.

RVIZ_RENDERING_PUBLIC void setAlpha (float alpha, bool per_point_alpha=false)

Set alpha blending.

Parameters:
  • alpha – global alpha value

  • per_point_alpha – indicates that each point will have an individual alpha value. If true, enables alpha blending regardless of the global alpha.

RVIZ_RENDERING_PUBLIC void setColor (const Ogre::ColourValue &color)
RVIZ_RENDERING_PUBLIC void setPickColor (const Ogre::ColourValue &color)
RVIZ_RENDERING_PUBLIC void setColorByIndex (bool set)
RVIZ_RENDERING_PUBLIC void setHighlightColor (float r, float g, float b)
inline RVIZ_RENDERING_PUBLIC const Ogre::String & getMovableType () const override
RVIZ_RENDERING_PUBLIC const Ogre::AxisAlignedBox & getBoundingBox () const override
RVIZ_RENDERING_PUBLIC float getBoundingRadius () const override
virtual RVIZ_RENDERING_PUBLIC void getWorldTransforms (Ogre::Matrix4 *xform) const
inline virtual RVIZ_RENDERING_PUBLIC uint16_t getNumWorldTransforms () const
RVIZ_RENDERING_PUBLIC void _updateRenderQueue (Ogre::RenderQueue *queue) override
RVIZ_RENDERING_PUBLIC void _notifyCurrentCamera (Ogre::Camera *camera) override
RVIZ_RENDERING_PUBLIC void _notifyAttached (Ogre::Node *parent, bool isTagPoint=false) override
RVIZ_RENDERING_PUBLIC void visitRenderables (Ogre::Renderable::Visitor *visitor, bool debugRenderables) override
inline virtual RVIZ_RENDERING_PUBLIC void setName (const std::string &name)
RVIZ_RENDERING_PUBLIC PointCloudRenderableQueue getRenderables ()
RVIZ_RENDERING_PUBLIC uint32_t getVerticesPerPoint ()
struct Point

Representation of a point, with x/y/z position and r/g/b color.

Public Functions

inline void setColor(float r, float g, float b, float a = 1.0)

Public Members

Ogre::Vector3 position
Ogre::ColourValue color