DynamicLines Class Reference

This Class allows to draw lines or triangles from a set of points. More...

#include <DynamicLines.h>

Inheritance diagram for DynamicLines:

DynamicRenderable 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 createMaterial (Ogre::ColourValue LineColour)
 Modif: Cree un nouveau material pour cette ligne, et lui affecte une couleur.
void setColour (Ogre::ColourValue LineColour)
 Modif: Change la couleur Ambiante de toutes les lignes.
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

Detailed Description

This Class allows to draw lines or triangles from a set of points.


Member Typedef Documentation

typedef Ogre::Camera DynamicLines::Camera [private]
 

typedef Ogre::RenderOperation::OperationType DynamicLines::OperationType [private]
 

typedef Ogre::Quaternion DynamicLines::Quaternion [private]
 

typedef Ogre::Real DynamicLines::Real [private]
 

typedef Ogre::Vector3 DynamicLines::Vector3 [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 Real  x,
Real  y,
Real  z
 

Add a point to the point list.

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

Add a point to the point list.

void DynamicLines::clear  ) 
 

Remove all points from the point list.

void DynamicLines::createMaterial Ogre::ColourValue  LineColour  ) 
 

Modif: Cree un nouveau material pour cette ligne, et lui affecte une couleur.

void DynamicLines::createVertexDeclaration  )  [protected, virtual]
 

Implementation DynamicRenderable, creates a simple vertex-only decl.

Implements DynamicRenderable.

void DynamicLines::fillHardwareBuffers  )  [protected, virtual]
 

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.

RenderOperation::OperationType DynamicLines::getOperationType  )  const
 

const Vector3 & DynamicLines::getPoint unsigned short  index  )  const
 

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

void DynamicLines::setColour Ogre::ColourValue  LineColour  ) 
 

Modif: Change la couleur Ambiante de toutes les lignes.

void DynamicLines::setOperationType OperationType  opType  ) 
 

Set the type of operation to draw with.

Parameters:
opType Can 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 DynamicLines::setPoint unsigned short  index,
const 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<Vector3> DynamicLines::mPoints [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Mar 27 21:33:14 2006 for Long Forgotten Earth by  doxygen 1.4.6-NO