A visual representation of a set of points. More...
#include <point_cloud.h>
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 | |
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. More... | |
void | clear () |
Clear all the points. More... | |
virtual const Ogre::AxisAlignedBox & | getBoundingBox () const |
virtual float | getBoundingRadius () const |
virtual const Ogre::String & | getMovableType () const |
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... | |
~PointCloud () | |
Private Types | |
typedef std::vector< Point > | V_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... | |
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 98 of file point_cloud.h.
|
private |
Definition at line 206 of file point_cloud.h.
Enumerator | |
---|---|
RM_POINTS | |
RM_SQUARES | |
RM_FLAT_SQUARES | |
RM_SPHERES | |
RM_TILES | |
RM_BOXES |
Definition at line 101 of file point_cloud.h.
rviz::PointCloud::PointCloud | ( | ) |
Definition at line 132 of file point_cloud.cpp.
rviz::PointCloud::~PointCloud | ( | ) |
Definition at line 177 of file point_cloud.cpp.
|
virtual |
Definition at line 706 of file point_cloud.cpp.
|
virtual |
Definition at line 691 of file point_cloud.cpp.
|
virtual |
Definition at line 696 of file point_cloud.cpp.
void rviz::PointCloud::addPoints | ( | Point * | points, |
uint32_t | num_points | ||
) |
Add points to this point cloud.
points | An array of Point structures |
num_points | The number of points in the array |
Definition at line 446 of file point_cloud.cpp.
void rviz::PointCloud::clear | ( | ) |
Clear all the points.
Definition at line 211 of file point_cloud.cpp.
|
private |
Definition at line 765 of file point_cloud.cpp.
|
virtual |
Definition at line 196 of file point_cloud.cpp.
|
virtual |
Definition at line 201 of file point_cloud.cpp.
|
inlinevirtual |
Definition at line 182 of file point_cloud.h.
|
inlinevirtual |
Definition at line 186 of file point_cloud.h.
|
private |
Definition at line 711 of file point_cloud.cpp.
|
virtual |
Definition at line 206 of file point_cloud.cpp.
void rviz::PointCloud::popPoints | ( | uint32_t | num_points | ) |
Remove a number of points from this point cloud.
num_points | The number of points to pop |
Definition at line 624 of file point_cloud.cpp.
|
private |
Definition at line 231 of file point_cloud.cpp.
void rviz::PointCloud::setAlpha | ( | float | alpha, |
bool | per_point_alpha = false |
||
) |
set alpha blending
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. |
Definition at line 414 of file point_cloud.cpp.
void rviz::PointCloud::setAutoSize | ( | bool | auto_size | ) |
Definition at line 362 of file point_cloud.cpp.
void rviz::PointCloud::setColorByIndex | ( | bool | set | ) |
Definition at line 247 of file point_cloud.cpp.
void rviz::PointCloud::setCommonDirection | ( | const Ogre::Vector3 & | vec | ) |
See Ogre::BillboardSet::setCommonDirection.
Definition at line 372 of file point_cloud.cpp.
void rviz::PointCloud::setCommonUpVector | ( | const Ogre::Vector3 & | vec | ) |
See Ogre::BillboardSet::setCommonUpVector.
Definition at line 384 of file point_cloud.cpp.
void rviz::PointCloud::setDimensions | ( | float | width, |
float | height, | ||
float | depth | ||
) |
Set the dimensions of the billboards used to render each point.
width | Width |
height | Height |
Definition at line 346 of file point_cloud.cpp.
void rviz::PointCloud::setHighlightColor | ( | float | r, |
float | g, | ||
float | b | ||
) |
Definition at line 253 of file point_cloud.cpp.
|
inlinevirtual |
Definition at line 194 of file point_cloud.h.
void rviz::PointCloud::setPickColor | ( | const Ogre::ColourValue & | color | ) |
Definition at line 751 of file point_cloud.cpp.
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 265 of file point_cloud.cpp.
|
private |
Definition at line 674 of file point_cloud.cpp.
|
private |
Definition at line 224 of file point_cloud.h.
|
private |
The bounding box of this point cloud.
Definition at line 203 of file point_cloud.h.
|
private |
The bounding radius of this point cloud.
Definition at line 204 of file point_cloud.h.
|
private |
Definition at line 222 of file point_cloud.h.
|
private |
Definition at line 226 of file point_cloud.h.
|
private |
See Ogre::BillboardSet::setCommonDirection.
Definition at line 214 of file point_cloud.h.
|
private |
See Ogre::BillboardSet::setCommonUpVector.
Definition at line 215 of file point_cloud.h.
|
private |
Definition at line 223 of file point_cloud.h.
|
private |
Definition at line 230 of file point_cloud.h.
|
private |
depth
Definition at line 213 of file point_cloud.h.
|
private |
Definition at line 219 of file point_cloud.h.
|
private |
height
Definition at line 212 of file point_cloud.h.
|
private |
Definition at line 231 of file point_cloud.h.
|
private |
The number of points currently in points_.
Definition at line 208 of file point_cloud.h.
|
private |
Definition at line 217 of file point_cloud.h.
|
private |
The list of points we're displaying. Allocates to a high-water-mark.
Definition at line 207 of file point_cloud.h.
|
private |
Definition at line 210 of file point_cloud.h.
|
private |
Definition at line 228 of file point_cloud.h.
|
staticprivate |
The "renderable type" used by Ogre.
Definition at line 233 of file point_cloud.h.
|
private |
Definition at line 220 of file point_cloud.h.
|
private |
Definition at line 218 of file point_cloud.h.
|
private |
Definition at line 221 of file point_cloud.h.
|
private |
width
Definition at line 211 of file point_cloud.h.