30 #ifndef OGRE_TOOLS_OGRE_POINT_CLOUD_H 31 #define OGRE_TOOLS_OGRE_POINT_CLOUD_H 33 #include <OgreSimpleRenderable.h> 34 #include <OgreMovableObject.h> 35 #include <OgreString.h> 36 #include <OgreAxisAlignedBox.h> 37 #include <OgreVector3.h> 38 #include <OgreMaterial.h> 39 #include <OgreColourValue.h> 41 #include <OgreHardwareBufferManager.h> 42 #include <OgreSharedPtr.h> 48 #include <boost/shared_ptr.hpp> 72 Ogre::HardwareVertexBufferSharedPtr getBuffer();
74 virtual Ogre::Real getBoundingRadius(
void)
const;
75 virtual Ogre::Real getSquaredViewDepth(
const Ogre::Camera* cam)
const;
76 virtual void _notifyCurrentCamera(Ogre::Camera* camera);
78 virtual void getWorldTransforms(Ogre::Matrix4* xform)
const;
79 virtual const Ogre::LightList& getLights()
const;
125 inline void setColor(
float r,
float g,
float b,
float a=1.0)
127 color=Ogre::ColourValue(r, g, b, a);
140 void addPoints(
Point* points, uint32_t num_points );
146 void popPoints( uint32_t num_points );
158 void setDimensions(
float width,
float height,
float depth );
164 void setAutoSize(
bool auto_size);
167 void setCommonDirection(
const Ogre::Vector3& vec );
169 void setCommonUpVector(
const Ogre::Vector3& vec );
175 void setAlpha(
float alpha,
bool per_point_alpha =
false );
177 void setPickColor(
const Ogre::ColourValue& color);
178 void setColorByIndex(
bool set);
180 void setHighlightColor(
float r,
float g,
float b );
183 virtual const Ogre::AxisAlignedBox& getBoundingBox()
const;
184 virtual float getBoundingRadius()
const;
185 virtual void getWorldTransforms( Ogre::Matrix4* xform )
const;
187 virtual void _updateRenderQueue( Ogre::RenderQueue* queue );
188 virtual void _notifyCurrentCamera( Ogre::Camera* camera );
189 virtual void _notifyAttached(Ogre::Node *parent,
bool isTagPoint=
false);
190 #if (OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 6) 191 virtual void visitRenderables(Ogre::Renderable::Visitor* visitor,
bool debugRenderables);
194 virtual void setName (
const std::string& name ) { mName = name; }
198 uint32_t getVerticesPerPoint();
199 PointCloudRenderablePtr createRenderable(
int num_points );
200 void regenerateAll();
201 void shrinkRenderables();
virtual void setName(const std::string &name)
Ogre::MaterialPtr current_material_
Ogre::MaterialPtr sphere_material_
std::vector< Point > V_Point
Ogre::MaterialPtr material_
uint32_t point_count_
The number of points currently in points_.
Ogre::AxisAlignedBox bounding_box_
The bounding box of this point cloud.
Ogre::MaterialPtr flat_square_material_
boost::shared_ptr< PointCloudRenderable > PointCloudRenderablePtr
V_Point points_
The list of points we're displaying. Allocates to a high-water-mark.
Ogre::MaterialPtr square_material_
Ogre::Vector3 common_direction_
See Ogre::BillboardSet::setCommonDirection.
bool current_mode_supports_geometry_shader_
Ogre::MaterialPtr tile_material_
Representation of a point, with x/y/z position and r/g/b color.
Ogre::RenderOperation * getRenderOperation()
std::vector< PointCloudRenderablePtr > V_PointCloudRenderable
Ogre::MaterialPtr box_material_
float bounding_radius_
The bounding radius of this point cloud.
Ogre::ColourValue pick_color_
virtual unsigned short getNumWorldTransforms() const
A visual representation of a set of points.
V_PointCloudRenderable renderables_
Ogre::MaterialPtr point_material_
Ogre::Vector3 common_up_vector_
See Ogre::BillboardSet::setCommonUpVector.
static Ogre::String sm_Type
The "renderable type" used by Ogre.
virtual unsigned short getNumWorldTransforms() const
void setColor(float r, float g, float b, float a=1.0)
virtual const Ogre::String & getMovableType() const