Orxonox: Ogre::DynamicLines Class Reference

# Ogre::DynamicLines Class Reference

`#include <src/orxonox/tools/DynamicLines.h>`

Inheritance diagram for Ogre::DynamicLines:

List of all members.

## 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

## 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.

References Ogre::DynamicRenderable::initialize(), and mDirty.

Ogre::DynamicLines::~DynamicLines | ( |  | ) | `[virtual]`

## Member Function Documentation

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

Add a point to the point list.

References mDirty, mPoints, and orxonox::MT_Type::Vector3.

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 |  | ) |

Remove all points from the point list.

References mDirty, and mPoints.

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

Return the total number of points in the point list.

References mPoints.

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.

References mPoints.

void Ogre::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 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().

## Member Data Documentation

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().

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

- src/orxonox/tools/DynamicLines.h
- src/orxonox/tools/DynamicLines.cc