Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
Ogre::DynamicLines Class Reference

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

Inheritance diagram for Ogre::DynamicLines:
Ogre::DynamicRenderable

Public Member Functions

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

Protected Member Functions

virtual void createVertexDeclaration () override
 Implementation DynamicRenderable, creates a simple vertex-only decl. More...
 
virtual void fillHardwareBuffers () override
 Implementation DynamicRenderable, pushes point list out to hardware memory. More...
 
- Protected Member Functions inherited from Ogre::DynamicRenderable
void prepareHardwareBuffers (size_t vertexCount, size_t indexCount)
 Prepares the hardware buffers for the requested vertex and index counts. More...
 

Private Types

typedef RenderOperation::OperationType OperationType
 

Private Attributes

bool mDirty
 
std::vector< Vector3 > mPoints
 

Additional Inherited Members

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

Member Typedef Documentation

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

Constructor & Destructor Documentation

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

Constructor - see setOperationType() for description of argument.

Ogre::DynamicLines::~DynamicLines ( )
virtual

Member Function Documentation

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

Add a point to the point list.

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

Add a point to the point list.

void Ogre::DynamicLines::clear ( )

Remove all points from the point list.

void Ogre::DynamicLines::createVertexDeclaration ( )
overrideprotectedvirtual

Implementation DynamicRenderable, creates a simple vertex-only decl.

Implements Ogre::DynamicRenderable.

void Ogre::DynamicLines::fillHardwareBuffers ( )
overrideprotectedvirtual

Implementation DynamicRenderable, pushes point list out to hardware memory.

Implements Ogre::DynamicRenderable.

unsigned short Ogre::DynamicLines::getNumPoints ( void  ) const

Return the total number of points in the point list.

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

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

void Ogre::DynamicLines::setOperationType ( OperationType  opType)

Set the type of operation to draw with.

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

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

void Ogre::DynamicLines::update ( )

Call this to update the hardware buffer after making changes.

Member Data Documentation

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

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