![]() |
VR-Forces Developer's Guide
|
A flyweight class for controlling a triangle owned by the triangle renderer.
Public Member Functions | |
| ~DtTriangleProxy () | |
| void | setGroup (float order) |
| float | group () const |
| void | set3DPositions (float x1, float y1, float z1, float w1, float x2, float y2, float z2, float w2, float x3, float y3, float z3, float w3) |
| void | set3DPosition (float x, float y, float z, float w) |
| void | set3DPosition (unsigned int index, float x, float y, float z, float w) |
| void | get3DPosition (unsigned int index, float &x, float &y, float &z, float &w) |
| void | set2DPositions (float x1, float y1, float x2, float y2, float x3, float y3) |
| void | set2DPosition (unsigned int index, float x, float y) |
| void | get2DPosition (unsigned int index, float &x, float &y) const |
| void | setStyle (int style) |
| int | style () const |
| void | setColor (unsigned int vertIndex, float r, float g, float b, float a) |
| void | setColor (float r, float g, float b, float a) |
| void | getColor (float &r, float &g, float &b, float &a) const |
| void | projectUVCoordinates (const DtVector &origin, const DtVector &axisU, const DtVector &axisV, float scale) |
| void | setFillPatternFrequency (float frequency) |
| void | setFillParameters (unsigned int fullStipplePattern[32]=0) |
| void | setTextureHandle (DtTextureInterface *textureHandle) |
| void | setIndex (unsigned int index) |
| unsigned int | index () const |
| virtual void | setIsNormalisedScreenCoordinates (bool isNormalisedScreenCoords) |
Protected Member Functions | |
| DtTriangleProxy (DtTriangleRenderer &renderer, unsigned int style) | |
Protected Attributes | |
| DtTriangleRenderer * | myParent |
| unsigned int | myIndex |
| unsigned char | myStyle |
| bool | myDirtyBit |
Friends | |
| class | DtTriangleRenderer |
| makVrv::DtTriangleProxy::~DtTriangleProxy | ( | ) |
DTOR.
|
protected |
CTOR.
| void makVrv::DtTriangleProxy::setGroup | ( | float | order | ) |
Set the order.
| float makVrv::DtTriangleProxy::group | ( | ) | const |
Get the group.
| void makVrv::DtTriangleProxy::set3DPositions | ( | float | x1, |
| float | y1, | ||
| float | z1, | ||
| float | w1, | ||
| float | x2, | ||
| float | y2, | ||
| float | z2, | ||
| float | w2, | ||
| float | x3, | ||
| float | y3, | ||
| float | z3, | ||
| float | w3 | ||
| ) |
Sets the 3D position of the triangle. (As packed vec4s).
| void makVrv::DtTriangleProxy::set3DPosition | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | w | ||
| ) |
Sets the 3D position of the triangle (As a packed vec 4), this is equivalent of setting the position of all vertices to the same 3D value.
| void makVrv::DtTriangleProxy::set3DPosition | ( | unsigned int | index, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | w | ||
| ) |
Sets the 3D position of a vertex in the triangle. (As a packed vec 4).
| void makVrv::DtTriangleProxy::get3DPosition | ( | unsigned int | index, |
| float & | x, | ||
| float & | y, | ||
| float & | z, | ||
| float & | w | ||
| ) |
Gets the 3D position of a vertex in the triangle.
| void makVrv::DtTriangleProxy::set2DPositions | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | x3, | ||
| float | y3 | ||
| ) |
Set the 2D position, encoded as xyz triplets.
Set a specific 2D position.
Get the 2D position of the given vertex.
| void makVrv::DtTriangleProxy::setStyle | ( | int | style | ) |
Set the style.
| int makVrv::DtTriangleProxy::style | ( | ) | const |
Get the current style.
| void makVrv::DtTriangleProxy::setColor | ( | unsigned int | vertIndex, |
| float | r, | ||
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
Sets the color of the given vertex.
| void makVrv::DtTriangleProxy::setColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
Set the color of all vertices.
| void makVrv::DtTriangleProxy::getColor | ( | float & | r, |
| float & | g, | ||
| float & | b, | ||
| float & | a | ||
| ) | const |
Get the color of the central vertex.
| void makVrv::DtTriangleProxy::projectUVCoordinates | ( | const DtVector & | origin, |
| const DtVector & | axisU, | ||
| const DtVector & | axisV, | ||
| float | scale | ||
| ) |
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. |
| void makVrv::DtTriangleProxy::setFillPatternFrequency | ( | float | frequency | ) |
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.
| frequency | the frequency to set. |
Set the fill parameters.
| void makVrv::DtTriangleProxy::setTextureHandle | ( | DtTextureInterface * | textureHandle | ) |
|
virtual |
Set whether the graphic is normalised screen coordinates Used by window object API, passed to shader Stippled only.
|
friend |
|
protected |
|
protected |