Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
ogre_tools::PointCloud Class Reference

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

#include <point_cloud.h>

List of all members.

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_BILLBOARDS, RM_BILLBOARD_SPHERES, RM_BILLBOARDS_COMMON_FACING,
  RM_BOXES
}

Public Member Functions

virtual void _notifyAttached (Ogre::Node *parent, bool isTagPoint=false)
virtual void _notifyCurrentCamera (Ogre::Camera *camera)
virtual void _updateRenderQueue (Ogre::RenderQueue *queue)
void addPoints (Point *points, uint32_t num_points)
 Add points to this point cloud.
void clear ()
 Clear all the points.
virtual const
Ogre::AxisAlignedBox & 
getBoundingBox () const
virtual float getBoundingRadius () const
virtual const Ogre::String & getMovableType () const
virtual void getWorldTransforms (Ogre::Matrix4 *xform) const
 PointCloud ()
void popPoints (uint32_t num_points)
 Remove a number of points from this point cloud.
void setAlpha (float alpha)
void setColorByIndex (bool set)
void setCommonDirection (const Ogre::Vector3 &vec)
 See Ogre::BillboardSet::setCommonDirection.
void setCommonUpVector (const Ogre::Vector3 &vec)
 See Ogre::BillboardSet::setCommonUpVector.
void setDimensions (float width, float height, float depth)
 Set the dimensions of the billboards used to render each point.
void setHighlightColor (float r, float g, float b)
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.
 ~PointCloud ()

Private Types

typedef std::vector< PointV_Point

Private Member Functions

PointCloudRenderablePtr getOrCreateRenderable ()
uint32_t getVerticesPerPoint ()
void regenerateAll ()
void shrinkRenderables ()

Private Attributes

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

Static Private Attributes

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

Detailed Description

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)

Definition at line 96 of file point_cloud.h.


Member Typedef Documentation

Definition at line 193 of file point_cloud.h.


Member Enumeration Documentation

Enumerator:
RM_POINTS 
RM_BILLBOARDS 
RM_BILLBOARD_SPHERES 
RM_BILLBOARDS_COMMON_FACING 
RM_BOXES 

Definition at line 99 of file point_cloud.h.


Constructor & Destructor Documentation

Definition at line 132 of file point_cloud.cpp.

Definition at line 167 of file point_cloud.cpp.


Member Function Documentation

void ogre_tools::PointCloud::_notifyAttached ( Ogre::Node *  parent,
bool  isTagPoint = false 
) [virtual]

Definition at line 658 of file point_cloud.cpp.

void ogre_tools::PointCloud::_notifyCurrentCamera ( Ogre::Camera *  camera) [virtual]

Definition at line 643 of file point_cloud.cpp.

void ogre_tools::PointCloud::_updateRenderQueue ( Ogre::RenderQueue *  queue) [virtual]

Definition at line 648 of file point_cloud.cpp.

void ogre_tools::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 411 of file point_cloud.cpp.

Clear all the points.

Definition at line 191 of file point_cloud.cpp.

const Ogre::AxisAlignedBox & ogre_tools::PointCloud::getBoundingBox ( void  ) const [virtual]

Definition at line 176 of file point_cloud.cpp.

float ogre_tools::PointCloud::getBoundingRadius ( void  ) const [virtual]

Definition at line 181 of file point_cloud.cpp.

virtual const Ogre::String& ogre_tools::PointCloud::getMovableType ( void  ) const [inline, virtual]

Definition at line 172 of file point_cloud.h.

PointCloudRenderablePtr ogre_tools::PointCloud::getOrCreateRenderable ( ) [private]

Definition at line 711 of file point_cloud.cpp.

Definition at line 663 of file point_cloud.cpp.

void ogre_tools::PointCloud::getWorldTransforms ( Ogre::Matrix4 *  xform) const [virtual]

Definition at line 186 of file point_cloud.cpp.

void ogre_tools::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 575 of file point_cloud.cpp.

Definition at line 211 of file point_cloud.cpp.

void ogre_tools::PointCloud::setAlpha ( float  alpha)

Definition at line 381 of file point_cloud.cpp.

Definition at line 227 of file point_cloud.cpp.

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

See Ogre::BillboardSet::setCommonDirection.

Definition at line 339 of file point_cloud.cpp.

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

See Ogre::BillboardSet::setCommonUpVector.

Definition at line 351 of file point_cloud.cpp.

void ogre_tools::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 323 of file point_cloud.cpp.

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

Definition at line 234 of file point_cloud.cpp.

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

Definition at line 698 of file point_cloud.cpp.

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

Definition at line 246 of file point_cloud.cpp.

Definition at line 626 of file point_cloud.cpp.


Member Data Documentation

Definition at line 210 of file point_cloud.h.

Definition at line 207 of file point_cloud.h.

Ogre::MaterialPtr ogre_tools::PointCloud::billboard_material_ [private]

Definition at line 205 of file point_cloud.h.

Definition at line 206 of file point_cloud.h.

Ogre::AxisAlignedBox ogre_tools::PointCloud::bounding_box_ [private]

The bounding box of this point cloud.

Definition at line 190 of file point_cloud.h.

The bounding radius of this point cloud.

Definition at line 191 of file point_cloud.h.

Ogre::MaterialPtr ogre_tools::PointCloud::box_material_ [private]

Definition at line 208 of file point_cloud.h.

Definition at line 212 of file point_cloud.h.

See Ogre::BillboardSet::setCommonDirection.

Definition at line 201 of file point_cloud.h.

See Ogre::BillboardSet::setCommonUpVector.

Definition at line 202 of file point_cloud.h.

Ogre::MaterialPtr ogre_tools::PointCloud::current_material_ [private]

Definition at line 209 of file point_cloud.h.

Definition at line 216 of file point_cloud.h.

depth

Definition at line 200 of file point_cloud.h.

height

Definition at line 199 of file point_cloud.h.

Ogre::ColourValue ogre_tools::PointCloud::pick_color_ [private]

Definition at line 217 of file point_cloud.h.

The number of points currently in points_.

Definition at line 195 of file point_cloud.h.

Ogre::MaterialPtr ogre_tools::PointCloud::point_material_ [private]

Definition at line 204 of file point_cloud.h.

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

Definition at line 194 of file point_cloud.h.

Definition at line 197 of file point_cloud.h.

V_PointCloudRenderable ogre_tools::PointCloud::renderables_ [private]

Definition at line 214 of file point_cloud.h.

Ogre::String ogre_tools::PointCloud::sm_Type = "PointCloud" [static, private]

The "renderable type" used by Ogre.

Definition at line 219 of file point_cloud.h.

width

Definition at line 198 of file point_cloud.h.


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


ogre_tools_qt
Author(s): Josh Faust
autogenerated on Fri Dec 6 2013 20:56:43