#include <src/orxonox/tools/DynamicLines.h>
Public Member Functions | |
void | addPoint (Real x, Real y, Real z) |
Add a point to the point list. | |
void | addPoint (const Vector3 &p) |
Add a point to the point list. | |
void | clear () |
Remove all points from the point list. | |
DynamicLines (OperationType opType=RenderOperation::OT_LINE_STRIP) | |
Constructor - see setOperationType() for description of argument. | |
unsigned short | getNumPoints (void) const |
Return the total number of points in the point list. | |
OperationType | getOperationType () const |
const Vector3 & | getPoint (unsigned short index) const |
Return the location of an existing point in the point list. | |
void | setOperationType (OperationType opType) |
Set the type of operation to draw with. | |
void | setPoint (unsigned short index, const Vector3 &value) |
Change the location of an existing point in the point list. | |
void | update () |
Call this to update the hardware buffer after making changes. | |
virtual | ~DynamicLines () |
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 RenderOperation::OperationType | OperationType |
Private Attributes | |
bool | mDirty |
std::vector< Vector3 > | mPoints |
typedef RenderOperation::OperationType Ogre::DynamicLines::OperationType [private] |
Ogre::DynamicLines::DynamicLines | ( | OperationType | opType = RenderOperation::OT_LINE_STRIP |
) |
Constructor - see setOperationType() for description of argument.
References Ogre::DynamicRenderable::initialize(), and mDirty.
Ogre::DynamicLines::~DynamicLines | ( | ) | [virtual] |
void Ogre::DynamicLines::addPoint | ( | Real | x, | |
Real | y, | |||
Real | z | |||
) |
void Ogre::DynamicLines::addPoint | ( | const Vector3 & | p | ) |
Add a point to the point list.
References mDirty, and mPoints.
Referenced by orxonox::RadarViewable::addMapEntity().
void Ogre::DynamicLines::clear | ( | void | ) |
void Ogre::DynamicLines::createVertexDeclaration | ( | ) | [protected, virtual] |
Implementation DynamicRenderable, creates a simple vertex-only decl.
Implements Ogre::DynamicRenderable.
References Ogre::POSITION_BINDING.
void Ogre::DynamicLines::fillHardwareBuffers | ( | ) | [protected, virtual] |
Implementation DynamicRenderable, pushes point list out to hardware memory.
Implements Ogre::DynamicRenderable.
References mDirty, mPoints, Ogre::DynamicRenderable::prepareHardwareBuffers(), and orxonox::MT_Type::Vector3.
Referenced by update().
unsigned short Ogre::DynamicLines::getNumPoints | ( | void | ) | const |
RenderOperation::OperationType Ogre::DynamicLines::getOperationType | ( | ) | const |
const Vector3 & Ogre::DynamicLines::getPoint | ( | unsigned short | index | ) | const |
void Ogre::DynamicLines::setOperationType | ( | OperationType | opType | ) |
Set the type of operation to draw with.
opType | Can be one of
|
void Ogre::DynamicLines::setPoint | ( | unsigned short | index, | |
const Vector3 & | value | |||
) |
Change the location of an existing point in the point list.
References mDirty, and mPoints.
Referenced by orxonox::RadarViewable::updateMapPosition().
void Ogre::DynamicLines::update | ( | void | ) |
Call this to update the hardware buffer after making changes.
References fillHardwareBuffers(), and mDirty.
Referenced by orxonox::RadarViewable::updateMapPosition().
bool Ogre::DynamicLines::mDirty [private] |
Referenced by addPoint(), clear(), DynamicLines(), fillHardwareBuffers(), setPoint(), and update().
std::vector<Vector3> Ogre::DynamicLines::mPoints [private] |
Referenced by addPoint(), clear(), fillHardwareBuffers(), getNumPoints(), getPoint(), and setPoint().