Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
rviz::PointCloud Class Reference

A visual representation of a set of points. More...

#include <point_cloud.h>

Inheritance diagram for rviz::PointCloud:
Inheritance graph
[legend]

Classes

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

Public Types

enum  RenderMode {
  RM_POINTS, RM_SQUARES, RM_FLAT_SQUARES, RM_SPHERES,
  RM_TILES, RM_BOXES
}
 

Public Member Functions

void _notifyAttached (Ogre::Node *parent, bool isTagPoint=false) override
 
void _updateRenderQueue (Ogre::RenderQueue *queue) override
 
void addPoints (Point *points, uint32_t num_points)
 Add points to this point cloud. More...
 
void clear ()
 Clear all the points. More...
 
const Ogre::AxisAlignedBox & getBoundingBox () const override
 
float getBoundingRadius () const override
 
const Ogre::String & getMovableType () const override
 
virtual unsigned short getNumWorldTransforms () const
 
virtual void getWorldTransforms (Ogre::Matrix4 *xform) const
 
 PointCloud ()
 
void popPoints (uint32_t num_points)
 Remove a number of points from this point cloud. More...
 
void setAlpha (float alpha, bool per_point_alpha=false)
 
void setAutoSize (bool auto_size)
 
void setColorByIndex (bool set)
 
void setCommonDirection (const Ogre::Vector3 &vec)
 See Ogre::BillboardSet::setCommonDirection. More...
 
void setCommonUpVector (const Ogre::Vector3 &vec)
 See Ogre::BillboardSet::setCommonUpVector. More...
 
void setDimensions (float width, float height, float depth)
 Set the dimensions of the billboards used to render each point. More...
 
void setHighlightColor (float r, float g, float b)
 
virtual void setName (const std::string &name)
 
void setPickColor (const Ogre::ColourValue &color)
 
void setRenderMode (RenderMode mode)
 Set what type of rendering primitives should be used, currently points, billboards and boxes are supported. More...
 
void visitRenderables (Ogre::Renderable::Visitor *visitor, bool debugRenderables) override
 
 ~PointCloud () override
 

Private Types

typedef std::vector< PointV_Point
 

Private Member Functions

PointCloudRenderablePtr createRenderable (int num_points)
 
uint32_t getVerticesPerPoint ()
 
void regenerateAll ()
 
void shrinkRenderables ()
 

Private Attributes

float alpha_
 
Ogre::AxisAlignedBox bounding_box_
 The bounding box of this point cloud. More...
 
float bounding_radius_
 The bounding radius of this point cloud. More...
 
Ogre::MaterialPtr box_material_
 
bool color_by_index_
 
Ogre::Vector3 common_direction_
 See Ogre::BillboardSet::setCommonDirection. More...
 
Ogre::Vector3 common_up_vector_
 See Ogre::BillboardSet::setCommonUpVector. More...
 
Ogre::MaterialPtr current_material_
 
bool current_mode_supports_geometry_shader_
 
float depth_
 depth More...
 
Ogre::MaterialPtr flat_square_material_
 
float height_
 height More...
 
Ogre::ColourValue pick_color_
 
uint32_t point_count_
 The number of points currently in points_. More...
 
Ogre::MaterialPtr point_material_
 
V_Point points_
 The list of points we're displaying. Allocates to a high-water-mark. More...
 
RenderMode render_mode_
 
V_PointCloudRenderable renderables_
 
Ogre::MaterialPtr sphere_material_
 
Ogre::MaterialPtr square_material_
 
Ogre::MaterialPtr tile_material_
 
float width_
 width More...
 

Static Private Attributes

static Ogre::String sm_Type = "PointCloud"
 The "renderable type" used by Ogre. More...
 

Detailed Description

A visual representation of a set of points.

Displays a set of points using vertex and geometry shaders. 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)

Definition at line 108 of file point_cloud.h.

Member Typedef Documentation

◆ V_Point

typedef std::vector<Point> rviz::PointCloud::V_Point
private

Definition at line 222 of file point_cloud.h.

Member Enumeration Documentation

◆ RenderMode

Enumerator
RM_POINTS 
RM_SQUARES 
RM_FLAT_SQUARES 
RM_SPHERES 
RM_TILES 
RM_BOXES 

Definition at line 111 of file point_cloud.h.

Constructor & Destructor Documentation

◆ PointCloud()

rviz::PointCloud::PointCloud ( )

Definition at line 92 of file point_cloud.cpp.

◆ ~PointCloud()

rviz::PointCloud::~PointCloud ( )
override

Definition at line 137 of file point_cloud.cpp.

Member Function Documentation

◆ _notifyAttached()

void rviz::PointCloud::_notifyAttached ( Ogre::Node *  parent,
bool  isTagPoint = false 
)
override

Definition at line 658 of file point_cloud.cpp.

◆ _updateRenderQueue()

void rviz::PointCloud::_updateRenderQueue ( Ogre::RenderQueue *  queue)
override

Definition at line 648 of file point_cloud.cpp.

◆ addPoints()

void rviz::PointCloud::addPoints ( Point points,
uint32_t  num_points 
)

Add points to this point cloud.

Parameters
pointsAn array of Point structures
num_pointsThe number of points in the array

Definition at line 400 of file point_cloud.cpp.

◆ clear()

void rviz::PointCloud::clear ( )

Clear all the points.

Definition at line 164 of file point_cloud.cpp.

◆ createRenderable()

PointCloudRenderablePtr rviz::PointCloud::createRenderable ( int  num_points)
private

Definition at line 717 of file point_cloud.cpp.

◆ getBoundingBox()

const Ogre::AxisAlignedBox & rviz::PointCloud::getBoundingBox ( ) const
override

Definition at line 149 of file point_cloud.cpp.

◆ getBoundingRadius()

float rviz::PointCloud::getBoundingRadius ( ) const
override

Definition at line 154 of file point_cloud.cpp.

◆ getMovableType()

const Ogre::String& rviz::PointCloud::getMovableType ( ) const
inlineoverride

Definition at line 193 of file point_cloud.h.

◆ getNumWorldTransforms()

virtual unsigned short rviz::PointCloud::getNumWorldTransforms ( ) const
inlinevirtual

Definition at line 200 of file point_cloud.h.

◆ getVerticesPerPoint()

uint32_t rviz::PointCloud::getVerticesPerPoint ( )
private

Definition at line 663 of file point_cloud.cpp.

◆ getWorldTransforms()

void rviz::PointCloud::getWorldTransforms ( Ogre::Matrix4 *  xform) const
virtual

Definition at line 159 of file point_cloud.cpp.

◆ popPoints()

void rviz::PointCloud::popPoints ( uint32_t  num_points)

Remove a number of points from this point cloud.

Parameters
num_pointsThe number of points to pop

Definition at line 581 of file point_cloud.cpp.

◆ regenerateAll()

void rviz::PointCloud::regenerateAll ( )
private

Definition at line 184 of file point_cloud.cpp.

◆ setAlpha()

void rviz::PointCloud::setAlpha ( float  alpha,
bool  per_point_alpha = false 
)

set alpha blending

Parameters
alphaglobal alpha value
per_point_alphaindicates that each point will have an individual alpha value. if true, enables alpha blending regardless of the global alpha.

Definition at line 368 of file point_cloud.cpp.

◆ setAutoSize()

void rviz::PointCloud::setAutoSize ( bool  auto_size)

Definition at line 316 of file point_cloud.cpp.

◆ setColorByIndex()

void rviz::PointCloud::setColorByIndex ( bool  set)

Definition at line 200 of file point_cloud.cpp.

◆ setCommonDirection()

void rviz::PointCloud::setCommonDirection ( const Ogre::Vector3 &  vec)

See Ogre::BillboardSet::setCommonDirection.

Definition at line 326 of file point_cloud.cpp.

◆ setCommonUpVector()

void rviz::PointCloud::setCommonUpVector ( const Ogre::Vector3 &  vec)

See Ogre::BillboardSet::setCommonUpVector.

Definition at line 338 of file point_cloud.cpp.

◆ setDimensions()

void rviz::PointCloud::setDimensions ( float  width,
float  height,
float  depth 
)

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

Parameters
widthWidth
heightHeight
Note
width/height are only applicable to billboards and boxes, depth is only applicable to boxes

Definition at line 300 of file point_cloud.cpp.

◆ setHighlightColor()

void rviz::PointCloud::setHighlightColor ( float  r,
float  g,
float  b 
)

Definition at line 206 of file point_cloud.cpp.

◆ setName()

virtual void rviz::PointCloud::setName ( const std::string &  name)
inlinevirtual

Definition at line 208 of file point_cloud.h.

◆ setPickColor()

void rviz::PointCloud::setPickColor ( const Ogre::ColourValue &  color)

Definition at line 703 of file point_cloud.cpp.

◆ setRenderMode()

void rviz::PointCloud::setRenderMode ( RenderMode  mode)

Set what type of rendering primitives should be used, currently points, billboards and boxes are supported.

Definition at line 218 of file point_cloud.cpp.

◆ shrinkRenderables()

void rviz::PointCloud::shrinkRenderables ( )
private

Definition at line 631 of file point_cloud.cpp.

◆ visitRenderables()

void rviz::PointCloud::visitRenderables ( Ogre::Renderable::Visitor *  visitor,
bool  debugRenderables 
)
override

Definition at line 741 of file point_cloud.cpp.

Member Data Documentation

◆ alpha_

float rviz::PointCloud::alpha_
private

Definition at line 240 of file point_cloud.h.

◆ bounding_box_

Ogre::AxisAlignedBox rviz::PointCloud::bounding_box_
private

The bounding box of this point cloud.

Definition at line 219 of file point_cloud.h.

◆ bounding_radius_

float rviz::PointCloud::bounding_radius_
private

The bounding radius of this point cloud.

Definition at line 220 of file point_cloud.h.

◆ box_material_

Ogre::MaterialPtr rviz::PointCloud::box_material_
private

Definition at line 238 of file point_cloud.h.

◆ color_by_index_

bool rviz::PointCloud::color_by_index_
private

Definition at line 242 of file point_cloud.h.

◆ common_direction_

Ogre::Vector3 rviz::PointCloud::common_direction_
private

See Ogre::BillboardSet::setCommonDirection.

Definition at line 230 of file point_cloud.h.

◆ common_up_vector_

Ogre::Vector3 rviz::PointCloud::common_up_vector_
private

See Ogre::BillboardSet::setCommonUpVector.

Definition at line 231 of file point_cloud.h.

◆ current_material_

Ogre::MaterialPtr rviz::PointCloud::current_material_
private

Definition at line 239 of file point_cloud.h.

◆ current_mode_supports_geometry_shader_

bool rviz::PointCloud::current_mode_supports_geometry_shader_
private

Definition at line 246 of file point_cloud.h.

◆ depth_

float rviz::PointCloud::depth_
private

depth

Definition at line 229 of file point_cloud.h.

◆ flat_square_material_

Ogre::MaterialPtr rviz::PointCloud::flat_square_material_
private

Definition at line 235 of file point_cloud.h.

◆ height_

float rviz::PointCloud::height_
private

height

Definition at line 228 of file point_cloud.h.

◆ pick_color_

Ogre::ColourValue rviz::PointCloud::pick_color_
private

Definition at line 247 of file point_cloud.h.

◆ point_count_

uint32_t rviz::PointCloud::point_count_
private

The number of points currently in points_.

Definition at line 224 of file point_cloud.h.

◆ point_material_

Ogre::MaterialPtr rviz::PointCloud::point_material_
private

Definition at line 233 of file point_cloud.h.

◆ points_

V_Point rviz::PointCloud::points_
private

The list of points we're displaying. Allocates to a high-water-mark.

Definition at line 223 of file point_cloud.h.

◆ render_mode_

RenderMode rviz::PointCloud::render_mode_
private

Definition at line 226 of file point_cloud.h.

◆ renderables_

V_PointCloudRenderable rviz::PointCloud::renderables_
private

Definition at line 244 of file point_cloud.h.

◆ sm_Type

Ogre::String rviz::PointCloud::sm_Type = "PointCloud"
staticprivate

The "renderable type" used by Ogre.

Definition at line 249 of file point_cloud.h.

◆ sphere_material_

Ogre::MaterialPtr rviz::PointCloud::sphere_material_
private

Definition at line 236 of file point_cloud.h.

◆ square_material_

Ogre::MaterialPtr rviz::PointCloud::square_material_
private

Definition at line 234 of file point_cloud.h.

◆ tile_material_

Ogre::MaterialPtr rviz::PointCloud::tile_material_
private

Definition at line 237 of file point_cloud.h.

◆ width_

float rviz::PointCloud::width_
private

width

Definition at line 227 of file point_cloud.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:04