![]() |
VR-Forces Developer's Guide
|
The abstract base class for the various primitive styles.

Public Member Functions | |
| DtPrimitiveStyle (unsigned int vertexCountPerPrimitive) | |
| virtual | ~DtPrimitiveStyle () |
| virtual void | releaseResources () |
| int | numberOfPrimitives () const |
| virtual void | add (unsigned int *indexToUpdate) |
| virtual void | remove (unsigned int index) |
| virtual void | render (int mode, unsigned int groupCount, bool geocentric, float geocentricAlpha, const double cameraLocation[3], const DtObserverRenderData &observerRenderData, const double positionMatrix[16], const double projectionMatrix[16], const int viewport[4], int offset)=0 |
| virtual void | update (int renderMode) |
| virtual float * | vertexData () const =0 |
| virtual unsigned int | vertexDataSize () const =0 |
| unsigned int | vertexCount () const |
| virtual void | setIsNormalisedScreenCoordinates (bool isNormalisedScreenCoords) |
Vertex Attribute Setters and Getters | |
| virtual void | set3DVertexPosition (unsigned int index, unsigned int vertIndex, float x, float y, float z, float w)=0 |
| virtual void | set3DVertexQuadPositions (unsigned int index, float x, float y, float z, float w)=0 |
| virtual void | get3DVertexPosition (unsigned int index, unsigned int vertex, float &x, float &y, float &z, float &w) const =0 |
| virtual void | set2DVertexPosition (unsigned int index, unsigned int vertIndex, float x, float y)=0 |
| virtual void | get2DVertexPosition (unsigned int index, unsigned int vertIndex, float &x, float &y) const =0 |
| virtual void | set2DOffsetRotation (unsigned int index, unsigned int vertIndex, float angle)=0 |
| virtual void | get2DOffsetRotation (unsigned int index, unsigned int vertIndex, float &angle) const =0 |
| virtual void | setColor (unsigned int index, unsigned int vertIndex, float r, float g, float b, float a)=0 |
| virtual void | getColor (unsigned int index, unsigned int vertIndex, float &r, float &g, float &b, float &a) const =0 |
| virtual void | setUVCoordinates (unsigned int index, unsigned int vertIndex, float u, float v)=0 |
| virtual void | getUVCoordinates (unsigned int index, unsigned int vertIndex, float &u, float &v) const =0 |
| virtual void | projectUVCoordinates (unsigned int index, const DtVector &origin, const DtVector &axisU, const DtVector &axisV, float scale)=0 |
Primitive Attribute Setters and Getters | |
| virtual void | setFillParameters (unsigned int index, unsigned int fullStipplePattern[32]=0)=0 |
| virtual void | getFillParameters (unsigned int index, unsigned int fullStipplePattern[32]=0) const =0 |
| virtual void | setFillPatternFrequency (unsigned int index, float frequency)=0 |
| virtual void | setTextureHandle (unsigned int index, DtTextureInterface *newTextureHandle)=0 |
| virtual DtTextureInterface * | findTextureHandle (unsigned int index) const =0 |
| virtual void | setGroup (unsigned int index, float zFactor)=0 |
| virtual float | group (unsigned int index) const =0 |
| virtual void | setVisible (unsigned int index, bool visible)=0 |
| virtual bool | visible (unsigned int index) const =0 |
Protected Types | |
| typedef std::vector< unsigned int * > | IndexList |
Protected Attributes | |
| DtBufferObject * | myBufferObject |
| unsigned int | myVertexCount |
| IndexList | myProxyIndices |
|
protected |
|
virtual |
DTOR.
|
virtual |
Release all of the rendering resources.
| int makVrv::DtPrimitiveStyle::numberOfPrimitives | ( | ) | const |
Get the number of primitives.
Add an index pointer to keep up to date.
Reimplemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
Remove an index.
Reimplemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Render the primitives.
| viewport[4] | - the viewport position and dimensions (x, y, width, height) |
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
virtual |
Update the style resources.
Reimplemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Sets the 3D position of the vertex.
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Sets the 3D position of the vertex for a quad (index vertIndex 0-4)
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Gets the 3D position of the vertex.
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Sets the 2D position (offset) of the vertex.
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Gets the 2D position (offset) of the vertex.
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Sets the rotation of the vertex's 2D offset.
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Gets the rotation of the vertex's 2D offset.
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Sets the color of the vertex.
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Gets the color of the vertex.
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Sets the UV coordinate.
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Gets the UV coordinate.
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Does uv coordinate projection based on the current vertex positions and the given projection parameters.
| origin | - each vertex position will subtract the origin. |
| axisU | - the X axis to project the position along for the u coordinate. |
| axisV | - the Y axis to project the position along for the v coordinate. |
| scale | - the scale to apply to the final uv coordinates. |
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Sets the fill parameters for the primitive.
| index | the index of the primitive to set the fill param for. |
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Gets the fill parameters for the primitive.
| index | the index of the primitive to get the fill param for. |
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtFlatPrimitiveStyle.
|
pure virtual |
Sets the fill pattern tiling frequency. The frequency needs to be 1 / x where x is a whole number. examples: frequency = 1.0 : the tiled pattern will tile normally frequency = 0.5 : the tiled pattern will appear half as often.
| index | the index of the primitive to set the fill param for. |
| frequency | the frequency to set. |
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtFlatPrimitiveStyle, and makVrv::DtStippledPrimitiveStyle.
|
pure virtual |
Set the texture handle of the texture to be applied to the primitive.
Implemented in makVrv::DtTexturedPrimitiveStyle, makVrv::DtFlatPrimitiveStyle, and makVrv::DtStippledPrimitiveStyle.
|
pure virtual |
Get the texture handle of the texture to be applied to the primitive.
Implemented in makVrv::DtFlatPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtTexturedPrimitiveStyle.
Sets the group for the primitive.
| index | the index of the primitive to set the group for. |
Implemented in makVrv::DtFlatPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtTexturedPrimitiveStyle.
Gets the group for the primitive.
| index | the index of the primitive to get the group for. |
Implemented in makVrv::DtFlatPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtTexturedPrimitiveStyle.
Sets the visible state for the primitive.
| index | the index of the primitive to set the state for. |
Implemented in makVrv::DtFlatPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtTexturedPrimitiveStyle.
Gets the visible state for the primitive.
| index | the index of the primitive to get the state for. |
Implemented in makVrv::DtFlatPrimitiveStyle, makVrv::DtStippledPrimitiveStyle, and makVrv::DtTexturedPrimitiveStyle.
|
pure virtual |
Get the vertex data.
Implemented in makVrv::DtStippledPrimitiveStyle, makVrv::DtFlatPrimitiveStyle, and makVrv::DtTexturedPrimitiveStyle.
Get total size of the vertex data in bytes.
Implemented in makVrv::DtStippledPrimitiveStyle, makVrv::DtFlatPrimitiveStyle, and makVrv::DtTexturedPrimitiveStyle.
Get the number of vertices per primitive. inlined to speed up PVD icons.
|
virtual |
Set whether the graphic is normalised screen coordinates Used by window object API, passed to shader.
Reimplemented in makVrv::DtStippledPrimitiveStyle.
|
protected |
|
protected |