OgreHaptics::DebugRenderer Class Reference

The DebugRenderer provides utilities to draw elements used in a haptic scene. More...

#include <OgreHapticsDebugRenderer.h>

List of all members.

Public Member Functions

 DebugRenderer (SceneManager *sceneMgr, int renderMode=0)
 Creates a new DebugRenderer.
virtual ~DebugRenderer ()
 Virtual destructor.
void setRenderMode (int mode)
 Specifies the elements to be rendered by the debug renderer.
void setTouchWorkspaceDisplayEnabled (bool enable)
 Sets whether the rendering of touch workspaces is enabled or not.
void setStylusDisplayEnabled (bool enable)
 Sets whether the rendering of stylusses is enabled or not.
bool isTouchWorkspaceDisplayEnabled (void) const
 Returns whether or not touch workspaces are rendered.
bool isStylusDisplayEnabled (void) const
 Returns whether or nt stylusses are rendered.
void addLine (const Vector3 &start, const Vector3 &end, const ColourValue &colour=ColourValue::White)
 Adds a line between the specified end points that will be drawn the next call.
void addLine (Real startX, Real startY, Real startZ, Real endX, Real endY, Real endZ, const ColourValue &colour=ColourValue::White)
 Adds a line between the specified end points that will be drawn the next call.
void addPoint (const Vector3 &point, const ColourValue &colour=ColourValue::White)
 Adds a point that will be drawn the next call.
void addPoint (Real x, Real y, Real z, const ColourValue &colour=ColourValue::White)
 Adds a point that will be drawn the next call.
void clear (void)
 Clears all objects currently drawn.
void draw (void)
 Draws all debug objects (e.g.
Real getBoundingRadius (void) const
 Implements Ogre::MovableObject::getBoundingRadius.
const String & getMovableType (void) const
 Implements Ogre::MovableObject::getMovableType.
const AxisAlignedBox & getBoundingBox (void) const
 Implements Ogre::MovableObject::getBoundingBox.
void _updateRenderQueue (RenderQueue *queue)
 Implements Ogre::MovableObject::_updateRenderQueue.
void visitRenderables (Renderable::Visitor *visitor, bool debugRenderables=false)
 Implements Ogre::MovableObject::visitRenderables.
const MaterialPtr & getMaterial (void) const
 Implements Ogre::Renderable::getMaterial.
void getRenderOperation (RenderOperation &op)
 Implements Ogre::Renderable::getRenderOperation.
void getWorldTransforms (Matrix4 *xform) const
 Implements Ogre::Renderable::getWorldTransforms.
Real getSquaredViewDepth (const Camera *cam) const
 Implements Ogre::Renderable::getSquaredViewDepth.
const LightList & getLights (void) const
 Implements Ogre::Renderable::getLights.

Protected Attributes

SceneManager * mSceneMgr
 Pointer to the Ogre::SceneManager to which the objects are added.
SceneNode * mSceneNode
 Pointer to the Ogre::SceneNode to which the renderer will be attached.
bool mIsDrawn
 Are objects drawn?
int mRenderMode
 Bitmask of the objects to display.
RenderOperation mRenderOperation
 The render operation.
MaterialPtr mMaterial
 Pointer to the material to use.
AxisAlignedBox mAABB
 Bounds of all lines drawn.


Detailed Description

The DebugRenderer provides utilities to draw elements used in a haptic scene.

The objects are displayed in a single renderable object using line and point drawing.

Remarks:
All devices are automatically used for drawing debug features to the scene managed by the SceneManager given at the construction time. An Ogre::SceneNode will be added automatically to the root node of the managed graph.

Definition at line 50 of file OgreHapticsDebugRenderer.h.


Constructor & Destructor Documentation

OgreHaptics::DebugRenderer::DebugRenderer ( SceneManager *  sceneMgr,
int  renderMode = 0 
)

Creates a new DebugRenderer.

Parameters:
sceneMgr The SceneManager to which the elements to draw will be added.
renderMode Bitmask specifying the elements to render.
See also:
DebugRenderMode

virtual OgreHaptics::DebugRenderer::~DebugRenderer (  )  [virtual]

Virtual destructor.


Member Function Documentation

void OgreHaptics::DebugRenderer::setRenderMode ( int  mode  ) 

Specifies the elements to be rendered by the debug renderer.

Parameters:
mode Bitmask specifying the elements to render.
See also:
DebugRenderMode

Definition at line 70 of file OgreHapticsDebugRenderer.h.

void OgreHaptics::DebugRenderer::setTouchWorkspaceDisplayEnabled ( bool  enable  ) 

Sets whether the rendering of touch workspaces is enabled or not.

void OgreHaptics::DebugRenderer::setStylusDisplayEnabled ( bool  enable  ) 

Sets whether the rendering of stylusses is enabled or not.

bool OgreHaptics::DebugRenderer::isTouchWorkspaceDisplayEnabled ( void   )  const

Returns whether or not touch workspaces are rendered.

bool OgreHaptics::DebugRenderer::isStylusDisplayEnabled ( void   )  const

Returns whether or nt stylusses are rendered.

void OgreHaptics::DebugRenderer::addLine ( const Vector3 &  start,
const Vector3 &  end,
const ColourValue &  colour = ColourValue::White 
)

Adds a line between the specified end points that will be drawn the next call.

Remarks:
Add lines before calling Debugger::draw
Parameters:
start The start point of the line in world coordinates.
end The end point of the line in world coordinates.
colour The colour in which the line is drawn.

void OgreHaptics::DebugRenderer::addLine ( Real  startX,
Real  startY,
Real  startZ,
Real  endX,
Real  endY,
Real  endZ,
const ColourValue &  colour = ColourValue::White 
)

Adds a line between the specified end points that will be drawn the next call.

Remarks:
Add lines before calling Debugger::draw
Parameters:
startX The x coordinate of the start point of the line in world coordinates.
startY The y coordinate of the start point of the line in world coordinates.
startZ The z coordinate of the start point of the line in world coordinates.
endX The x coordinate of the end point of the line in world coordinates.
endY The y coordinate of the end point of the line in world coordinates.
endZ The z coordinate of the end point of the line in world coordinates.
colour The colour in which the line is drawn.

void OgreHaptics::DebugRenderer::addPoint ( const Vector3 &  point,
const ColourValue &  colour = ColourValue::White 
)

Adds a point that will be drawn the next call.

Remarks:
Add points before calling Debugger::draw
Parameters:
point The point in world coordinates.
colour The colour in which the point is drawn.

void OgreHaptics::DebugRenderer::addPoint ( Real  x,
Real  y,
Real  z,
const ColourValue &  colour = ColourValue::White 
)

Adds a point that will be drawn the next call.

Remarks:
Add points before calling Debugger::draw
Parameters:
x The x coordinate of the point in world coordinates.
y The y coordinate of the point in world coordinates.
z The z coordinate of the point in world coordinates.
colour The colour in which the point is drawn.

void OgreHaptics::DebugRenderer::clear ( void   ) 

Clears all objects currently drawn.

void OgreHaptics::DebugRenderer::draw ( void   ) 

Draws all debug objects (e.g.

touch workspaces, stylusses) of all currently managed devices.

Remarks:
Call DebugRenderer::clear before this to remove the previous drawing. If objects are already drawn this will do nothing.

Real OgreHaptics::DebugRenderer::getBoundingRadius ( void   )  const

Implements Ogre::MovableObject::getBoundingRadius.

const String& OgreHaptics::DebugRenderer::getMovableType ( void   )  const

Implements Ogre::MovableObject::getMovableType.

const AxisAlignedBox& OgreHaptics::DebugRenderer::getBoundingBox ( void   )  const

Implements Ogre::MovableObject::getBoundingBox.

void OgreHaptics::DebugRenderer::_updateRenderQueue ( RenderQueue *  queue  ) 

Implements Ogre::MovableObject::_updateRenderQueue.

void OgreHaptics::DebugRenderer::visitRenderables ( Renderable::Visitor *  visitor,
bool  debugRenderables = false 
)

Implements Ogre::MovableObject::visitRenderables.

const MaterialPtr& OgreHaptics::DebugRenderer::getMaterial ( void   )  const

Implements Ogre::Renderable::getMaterial.

void OgreHaptics::DebugRenderer::getRenderOperation ( RenderOperation &  op  ) 

Implements Ogre::Renderable::getRenderOperation.

void OgreHaptics::DebugRenderer::getWorldTransforms ( Matrix4 *  xform  )  const

Implements Ogre::Renderable::getWorldTransforms.

Real OgreHaptics::DebugRenderer::getSquaredViewDepth ( const Camera *  cam  )  const

Implements Ogre::Renderable::getSquaredViewDepth.

const LightList& OgreHaptics::DebugRenderer::getLights ( void   )  const

Implements Ogre::Renderable::getLights.


Member Data Documentation

SceneManager* OgreHaptics::DebugRenderer::mSceneMgr [protected]

Pointer to the Ogre::SceneManager to which the objects are added.

Definition at line 170 of file OgreHapticsDebugRenderer.h.

Pointer to the Ogre::SceneNode to which the renderer will be attached.

Definition at line 172 of file OgreHapticsDebugRenderer.h.

Are objects drawn?

Definition at line 174 of file OgreHapticsDebugRenderer.h.

Bitmask of the objects to display.

Definition at line 176 of file OgreHapticsDebugRenderer.h.

RenderOperation OgreHaptics::DebugRenderer::mRenderOperation [protected]

The render operation.

Definition at line 178 of file OgreHapticsDebugRenderer.h.

MaterialPtr OgreHaptics::DebugRenderer::mMaterial [protected]

Pointer to the material to use.

Definition at line 180 of file OgreHapticsDebugRenderer.h.

AxisAlignedBox OgreHaptics::DebugRenderer::mAABB [protected]

Bounds of all lines drawn.

Definition at line 182 of file OgreHapticsDebugRenderer.h.


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

Last modified Tue Jan 6 22:31:25 2009