Tinman  1.0
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
DynamicLines Class Reference

#include <physicsdebugdrawer.h>

Inheritance diagram for DynamicLines:
Inheritance graph
[legend]
Collaboration diagram for DynamicLines:
Collaboration graph
[legend]

Public Member Functions

 DynamicLines (OperationType opType=Ogre::RenderOperation::OT_LINE_STRIP)
 Constructor - see setOperationType() for description of argument. More...
 
virtual ~DynamicLines ()
 
void addPoint (const Ogre::Vector3 &p)
 Add a point to the point list. More...
 
void addPoint (Ogre::Real x, Ogre::Real y, Ogre::Real z)
 Add a point to the point list. More...
 
void setPoint (unsigned short index, const Ogre::Vector3 &value)
 Change the location of an existing point in the point list. More...
 
const Ogre::Vector3 & getPoint (unsigned short index) const
 Return the location of an existing point in the point list. More...
 
unsigned short getNumPoints (void) const
 Return the total number of points in the point list. More...
 
void clear ()
 Remove all points from the point list. More...
 
void update ()
 Call this to update the hardware buffer after making changes. More...
 
void setOperationType (OperationType opType)
 
OperationType getOperationType () const
 
- Public Member Functions inherited from DynamicRenderable
 DynamicRenderable ()
 Constructor. More...
 
virtual ~DynamicRenderable ()
 Virtual destructor. More...
 
void initialize (Ogre::RenderOperation::OperationType operationType, bool useIndices)
 
virtual Ogre::Real getBoundingRadius (void) const
 Implementation of SimpleRenderable. More...
 
virtual Ogre::Real getSquaredViewDepth (const Ogre::Camera *cam) const
 Implementation of SimpleRenderable. More...
 

Protected Member Functions

virtual void createVertexDeclaration ()
 Implementation DynamicRenderable, creates a simple vertex-only decl. More...
 
virtual void fillHardwareBuffers ()
 Implementation DynamicRenderable, pushes point list out to hardware memory. More...
 
- Protected Member Functions inherited from DynamicRenderable
void prepareHardwareBuffers (size_t vertexCount, size_t indexCount)
 

Private Types

typedef Ogre::RenderOperation::OperationType OperationType
 

Private Attributes

std::vector< Ogre::Vector3 > mPoints
 
bool mDirty
 

Additional Inherited Members

- Protected Attributes inherited from DynamicRenderable
size_t mVertexBufferCapacity
 Maximum capacity of the currently allocated vertex buffer. More...
 
size_t mIndexBufferCapacity
 Maximum capacity of the currently allocated index buffer. More...
 

Member Typedef Documentation

typedef Ogre::RenderOperation::OperationType DynamicLines::OperationType
private

Constructor & Destructor Documentation

DynamicLines::DynamicLines ( OperationType  opType = Ogre::RenderOperation::OT_LINE_STRIP)

Constructor - see setOperationType() for description of argument.

DynamicLines::~DynamicLines ( )
virtual

Member Function Documentation

void DynamicLines::addPoint ( const Ogre::Vector3 &  p)

Add a point to the point list.

void DynamicLines::addPoint ( Ogre::Real  x,
Ogre::Real  y,
Ogre::Real  z 
)

Add a point to the point list.

void DynamicLines::clear ( )

Remove all points from the point list.

void DynamicLines::createVertexDeclaration ( )
protectedvirtual

Implementation DynamicRenderable, creates a simple vertex-only decl.

Implements DynamicRenderable.

void DynamicLines::fillHardwareBuffers ( )
protectedvirtual

Implementation DynamicRenderable, pushes point list out to hardware memory.

Implements DynamicRenderable.

unsigned short DynamicLines::getNumPoints ( void  ) const

Return the total number of points in the point list.

Ogre::RenderOperation::OperationType DynamicLines::getOperationType ( ) const
const Ogre::Vector3 & DynamicLines::getPoint ( unsigned short  index) const

Return the location of an existing point in the point list.

void DynamicLines::setOperationType ( OperationType  opType)

Set the type of operation to draw with.

Parameters
opTypeCan be one of
  • Ogre::RenderOperation::OT_LINE_STRIP
  • Ogre::RenderOperation::OT_LINE_LIST
  • Ogre::RenderOperation::OT_POINT_LIST
  • Ogre::RenderOperation::OT_TRIANGLE_LIST
  • Ogre::RenderOperation::OT_TRIANGLE_STRIP
  • Ogre::RenderOperation::OT_TRIANGLE_FAN The default is OT_LINE_STRIP.
void DynamicLines::setPoint ( unsigned short  index,
const Ogre::Vector3 &  value 
)

Change the location of an existing point in the point list.

void DynamicLines::update ( )

Call this to update the hardware buffer after making changes.

Member Data Documentation

bool DynamicLines::mDirty
private
std::vector<Ogre::Vector3> DynamicLines::mPoints
private

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