Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Private Member Functions | Private Attributes | List of all members
orxonox::DebugDrawer Class Reference

DebugDrawer is a utility to draw debug shapes (lines, triangles, spheres) with Ogre. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/tools/DebugDrawer.h>

Public Member Functions

 DebugDrawer (Ogre::SceneManager *_sceneManager, float _fillAlpha)
 
 ~DebugDrawer ()
 
void build ()
 
void clear ()
 
void drawCircle (const Ogre::Vector3 &centre, const Ogre::Quaternion &rotation, float radius, const Ogre::ColourValue &colour, bool isFilled=false)
 
void drawCone (const Ogre::Vector3 &centre, const Ogre::Quaternion &rotation, float radius, float height, const Ogre::ColourValue &colour, bool isFilled=false)
 
void drawCuboid (const Ogre::Vector3 *vertices, const Ogre::ColourValue &colour, bool isFilled=false)
 
void drawCylinder (const Ogre::Vector3 &centre, const Ogre::Quaternion &rotation, float radius, float height, const Ogre::ColourValue &colour, bool isFilled=false)
 
void drawLine (const Ogre::Vector3 &start, const Ogre::Vector3 &end, const Ogre::ColourValue &colour)
 
void drawQuad (const Ogre::Vector3 *vertices, const Ogre::ColourValue &colour, bool isFilled=false)
 
void drawSphere (const Ogre::Vector3 &centre, const Ogre::Quaternion &rotation, float radius, const Ogre::ColourValue &colour, bool isFilled=false)
 
void drawTetrahedron (const Ogre::Vector3 &centre, float scale, const Ogre::ColourValue &colour, bool isFilled=false)
 
bool getEnabled ()
 
void setEnabled (bool _isEnabled)
 
void setFillAlpha (float alpha)
 
void switchEnabled ()
 

Private Member Functions

void addLineIndices (int index1, int index2)
 
int addLineVertex (const Ogre::Vector3 &vertex, const Ogre::ColourValue &colour)
 
void addQuadIndices (int index1, int index2, int index3, int index4)
 
void addTriangleIndices (int index1, int index2, int index3)
 
int addTriangleVertex (const Ogre::Vector3 &vertex, const Ogre::ColourValue &colour)
 
void buildCircle (const Ogre::Matrix4 &transform, float radius, int segmentsCount, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildCone (const Ogre::Vector3 &centre, const Ogre::Quaternion &rotation, float radius, int segmentsCount, float height, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildCuboid (const Ogre::Vector3 *vertices, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildCylinder (const Ogre::Vector3 &centre, const Ogre::Quaternion &rotation, float radius, int segmentsCount, float height, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildFilledCircle (const Ogre::Matrix4 &transform, float radius, int segmentsCount, const Ogre::ColourValue &colour, bool up, float alpha=1.0f)
 
void buildFilledCone (const Ogre::Vector3 &centre, const Ogre::Quaternion &rotation, float radius, int segmentsCount, float height, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildFilledCuboid (const Ogre::Vector3 *vertices, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildFilledCylinder (const Ogre::Vector3 &centre, const Ogre::Quaternion &rotation, float radius, int segmentsCount, float height, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildFilledQuad (const Ogre::Vector3 *vertices, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildFilledTetrahedron (const Ogre::Vector3 &centre, float scale, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildFilledTriangle (const Ogre::Vector3 *vertices, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildLine (const Ogre::Vector3 &start, const Ogre::Vector3 &end, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildQuad (const Ogre::Vector3 *vertices, const Ogre::ColourValue &colour, float alpha=1.0f)
 
void buildTetrahedron (const Ogre::Vector3 &centre, float scale, const Ogre::ColourValue &colour, float alpha=1.0f)
 
const IcoSpheregetIcoSphere (float radius) const
 
void initialise ()
 
void shutdown ()
 

Private Attributes

float fillAlpha
 
IcoSphere icoSphere0
 
IcoSphere icoSphere1
 
IcoSphere icoSphere2
 
IcoSphere icoSphere3
 
IcoSphere icoSphere4
 
bool isEnabled
 
std::list< int > lineIndices
 
int linesIndex
 
std::list< VertexPairlineVertices
 
Ogre::ManualObject * manualObject
 
Ogre::SceneManager * sceneManager
 
std::list< int > triangleIndices
 
int trianglesIndex
 
std::list< VertexPairtriangleVertices
 

Detailed Description

DebugDrawer is a utility to draw debug shapes (lines, triangles, spheres) with Ogre.

This utility is e.g. used by orxonox::BulletDebugDrawer to visualize collision shapes and other physical entities.

Constructor & Destructor Documentation

orxonox::DebugDrawer::DebugDrawer ( Ogre::SceneManager *  _sceneManager,
float  _fillAlpha 
)
orxonox::DebugDrawer::~DebugDrawer ( )

Member Function Documentation

void orxonox::DebugDrawer::addLineIndices ( int  index1,
int  index2 
)
private
int orxonox::DebugDrawer::addLineVertex ( const Ogre::Vector3 &  vertex,
const Ogre::ColourValue &  colour 
)
private
void orxonox::DebugDrawer::addQuadIndices ( int  index1,
int  index2,
int  index3,
int  index4 
)
private
void orxonox::DebugDrawer::addTriangleIndices ( int  index1,
int  index2,
int  index3 
)
private
int orxonox::DebugDrawer::addTriangleVertex ( const Ogre::Vector3 &  vertex,
const Ogre::ColourValue &  colour 
)
private
void orxonox::DebugDrawer::build ( )
void orxonox::DebugDrawer::buildCircle ( const Ogre::Matrix4 &  transform,
float  radius,
int  segmentsCount,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildCone ( const Ogre::Vector3 &  centre,
const Ogre::Quaternion &  rotation,
float  radius,
int  segmentsCount,
float  height,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildCuboid ( const Ogre::Vector3 *  vertices,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildCylinder ( const Ogre::Vector3 &  centre,
const Ogre::Quaternion &  rotation,
float  radius,
int  segmentsCount,
float  height,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildFilledCircle ( const Ogre::Matrix4 &  transform,
float  radius,
int  segmentsCount,
const Ogre::ColourValue &  colour,
bool  up,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildFilledCone ( const Ogre::Vector3 &  centre,
const Ogre::Quaternion &  rotation,
float  radius,
int  segmentsCount,
float  height,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildFilledCuboid ( const Ogre::Vector3 *  vertices,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildFilledCylinder ( const Ogre::Vector3 &  centre,
const Ogre::Quaternion &  rotation,
float  radius,
int  segmentsCount,
float  height,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildFilledQuad ( const Ogre::Vector3 *  vertices,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildFilledTetrahedron ( const Ogre::Vector3 &  centre,
float  scale,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildFilledTriangle ( const Ogre::Vector3 *  vertices,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildLine ( const Ogre::Vector3 &  start,
const Ogre::Vector3 &  end,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildQuad ( const Ogre::Vector3 *  vertices,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::buildTetrahedron ( const Ogre::Vector3 &  centre,
float  scale,
const Ogre::ColourValue &  colour,
float  alpha = 1.0f 
)
private
void orxonox::DebugDrawer::clear ( )
void orxonox::DebugDrawer::drawCircle ( const Ogre::Vector3 &  centre,
const Ogre::Quaternion &  rotation,
float  radius,
const Ogre::ColourValue &  colour,
bool  isFilled = false 
)
void orxonox::DebugDrawer::drawCone ( const Ogre::Vector3 &  centre,
const Ogre::Quaternion &  rotation,
float  radius,
float  height,
const Ogre::ColourValue &  colour,
bool  isFilled = false 
)
void orxonox::DebugDrawer::drawCuboid ( const Ogre::Vector3 *  vertices,
const Ogre::ColourValue &  colour,
bool  isFilled = false 
)
void orxonox::DebugDrawer::drawCylinder ( const Ogre::Vector3 &  centre,
const Ogre::Quaternion &  rotation,
float  radius,
float  height,
const Ogre::ColourValue &  colour,
bool  isFilled = false 
)
void orxonox::DebugDrawer::drawLine ( const Ogre::Vector3 &  start,
const Ogre::Vector3 &  end,
const Ogre::ColourValue &  colour 
)
void orxonox::DebugDrawer::drawQuad ( const Ogre::Vector3 *  vertices,
const Ogre::ColourValue &  colour,
bool  isFilled = false 
)
void orxonox::DebugDrawer::drawSphere ( const Ogre::Vector3 &  centre,
const Ogre::Quaternion &  rotation,
float  radius,
const Ogre::ColourValue &  colour,
bool  isFilled = false 
)
void orxonox::DebugDrawer::drawTetrahedron ( const Ogre::Vector3 &  centre,
float  scale,
const Ogre::ColourValue &  colour,
bool  isFilled = false 
)
bool orxonox::DebugDrawer::getEnabled ( )
inline
const IcoSphere & orxonox::DebugDrawer::getIcoSphere ( float  radius) const
private
void orxonox::DebugDrawer::initialise ( )
private
void orxonox::DebugDrawer::setEnabled ( bool  _isEnabled)
inline
void orxonox::DebugDrawer::setFillAlpha ( float  alpha)
inline
void orxonox::DebugDrawer::shutdown ( )
private
void orxonox::DebugDrawer::switchEnabled ( )
inline

Member Data Documentation

float orxonox::DebugDrawer::fillAlpha
private
IcoSphere orxonox::DebugDrawer::icoSphere0
private
IcoSphere orxonox::DebugDrawer::icoSphere1
private
IcoSphere orxonox::DebugDrawer::icoSphere2
private
IcoSphere orxonox::DebugDrawer::icoSphere3
private
IcoSphere orxonox::DebugDrawer::icoSphere4
private
bool orxonox::DebugDrawer::isEnabled
private
std::list<int> orxonox::DebugDrawer::lineIndices
private
int orxonox::DebugDrawer::linesIndex
private
std::list<VertexPair> orxonox::DebugDrawer::lineVertices
private
Ogre::ManualObject* orxonox::DebugDrawer::manualObject
private
Ogre::SceneManager* orxonox::DebugDrawer::sceneManager
private
std::list<int> orxonox::DebugDrawer::triangleIndices
private
int orxonox::DebugDrawer::trianglesIndex
private
std::list<VertexPair> orxonox::DebugDrawer::triangleVertices
private

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