OpenMW
Public Member Functions | Protected Member Functions | Private Types | Private Attributes
BtOgre::DynamicLines Class Reference

#include <BtOgreExtras.h>

List of all members.

Public Member Functions

 DynamicLines (OperationType opType=Ogre::RenderOperation::OT_LINE_STRIP)
 Constructor - see setOperationType() for description of argument.
virtual ~DynamicLines ()
void addPoint (const Ogre::Vector3 &p)
 Add a point to the point list.
void addPoint (Real x, Real y, Real z)
 Add a point to the point list.
void setPoint (unsigned short index, const Vector3 &value)
 Change the location of an existing point in the point list.
const Vector3getPoint (unsigned short index) const
 Return the location of an existing point in the point list.
unsigned short getNumPoints (void) const
 Return the total number of points in the point list.
void clear ()
 Remove all points from the point list.
void update ()
 Call this to update the hardware buffer after making changes.
void setOperationType (OperationType opType)
OperationType getOperationType () const

Protected Member Functions

virtual void createVertexDeclaration ()
 Implementation DynamicRenderable, creates a simple vertex-only decl.
virtual void fillHardwareBuffers ()
 Implementation DynamicRenderable, pushes point list out to hardware memory.

Private Types

typedef Ogre::Vector3 Vector3
typedef Ogre::Quaternion Quaternion
typedef Ogre::Camera Camera
typedef Ogre::Real Real
typedef
Ogre::RenderOperation::OperationType 
OperationType

Private Attributes

std::vector< Vector3mPoints
bool mDirty

Member Typedef Documentation

typedef Ogre::Camera BtOgre::DynamicLines::Camera [private]
typedef Ogre::RenderOperation::OperationType BtOgre::DynamicLines::OperationType [private]
typedef Ogre::Quaternion BtOgre::DynamicLines::Quaternion [private]
typedef Ogre::Real BtOgre::DynamicLines::Real [private]
typedef Ogre::Vector3 BtOgre::DynamicLines::Vector3 [private]

Constructor & Destructor Documentation

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

Constructor - see setOperationType() for description of argument.


Member Function Documentation

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

Add a point to the point list.

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

Add a point to the point list.

Remove all points from the point list.

void BtOgre::DynamicLines::createVertexDeclaration ( ) [protected, virtual]

Implementation DynamicRenderable, creates a simple vertex-only decl.

Implements BtOgre::DynamicRenderable.

void BtOgre::DynamicLines::fillHardwareBuffers ( ) [protected, virtual]

Implementation DynamicRenderable, pushes point list out to hardware memory.

Implements BtOgre::DynamicRenderable.

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

Return the total number of points in the point list.

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

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

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 BtOgre::DynamicLines::setPoint ( unsigned short  index,
const Vector3 value 
)

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

Call this to update the hardware buffer after making changes.


Member Data Documentation

std::vector<Vector3> BtOgre::DynamicLines::mPoints [private]

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