![]() |
VR-Forces 4.8 Class Documentation
|
A variable vertex convex filled 2D polygon. More...

Public Types | |
| enum | FillType { Fill_Solid = 0, Fill_Stipple, FillType_End } |
Public Member Functions | |
| DtFilledPolygon (DtOverlayRenderer &renderer, DtWidgetPicker &picker) | |
| CTOR, takes render the overlay will be on. More... | |
| DtFilledPolygon (DtTriangleRenderer &renderer, DtWidgetPicker &picker) | |
| CTOR, takes render the triangle render that will draw the polygon. More... | |
| virtual | ~DtFilledPolygon () |
| DTOR. More... | |
| virtual void | setFillType (FillType type) |
| Set the quad fill type. More... | |
| virtual FillType | fillType () const |
| Get the fill type. More... | |
| virtual void | setFillParameter (unsigned int param, unsigned int fullStipplePattern[32]=0) |
| Set the quad fill parameter. More... | |
| virtual void | clearFillPattern () |
| Clears the fill pattern of the quad. More... | |
| virtual void | getFillParameter (unsigned int ¶mOut, unsigned int fullStipplePatternOut[32]) const |
| Get the quad fill parameters. More... | |
| virtual void | setEventsEnabled (bool enabled, unsigned long long=0) |
| Set whether the sprite has widget events. More... | |
| bool | eventsEnabled () const |
| Get whether events are already enabled. More... | |
| virtual void | setVertexCount (unsigned int vertexCount) |
| Set the number of vertices, any newly created vertices will be black and add 0,0,0 so setColor/setPosition may be necessary. More... | |
| virtual unsigned int | vertexCount () const |
| Get the vertex count. More... | |
| virtual void | set2DPositions (const std::vector< float > &vertices) |
| Set the number of vertices and their positions. More... | |
| virtual void | set2DPosition (unsigned int vertexIndex, float x, float y) |
| Set one vertex position. More... | |
| virtual void | set2DCentroidPosition (float x, float y) |
| Sets the position of the polygon's centroid. More... | |
| virtual void | get2DPosition (unsigned int vertexIndex, float &x, float &y) const |
| Get the vertex position. More... | |
| virtual void | set3DPosition (unsigned int vertexIndex, float x, float y, float z, float w) |
| Set one vertex position. More... | |
| virtual void | set3DCentroidPosition (float x, float y, float z, float w) |
| Sets the position of the polygon's centroid. More... | |
| virtual void | get3DPosition (unsigned int index, float &x, float &y, float &z, float &w) const |
| Get the vertex position. More... | |
| void | set3DDirectionAndLength (unsigned int index, float x, float y, float z, float l) |
| Sets an optional 3D direction with a 2D length value for a vertex. More... | |
| virtual void | setStipple (unsigned int stipplePattern) |
| Set the stipple pattern. More... | |
| virtual void | setVertexColor (unsigned int index, float r, float g, float b, float a) |
| Set the color of a specific vertex. More... | |
| virtual void | getVertexColor (unsigned int index, float &r, float &g, float &b, float &a) |
| TODO document. More... | |
| virtual void | setCentroidColor (float r, float g, float b, float a) |
| Set the color of the polygon's centroid. More... | |
| virtual void | setColor (float r, float g, float b, float a) |
| Set the color. More... | |
| virtual void | getColor (float &r, float &g, float &b, float &a) const |
| Get the color. More... | |
| virtual int | group () const |
| Returns the group that the polygon is on (for Z-Ordering). Default is zero. More... | |
| virtual void | setGroup (int) |
| Sets the group for Z-Ordering. More... | |
| virtual void | triangulate () |
| As long as there are a divisible by three of triangle proxies, reworks them to be a triangle of three related points, using the center as an anchor point. More... | |
Public Member Functions inherited from makVrv::DtPolygon | |
| virtual | ~DtPolygon () |
Protected Types | |
| typedef std::vector< float > | VertexList |
| typedef std::vector < DtTriangleProxy * > | TriangleProxyList |
| typedef std::vector < DtPickableTriangle * > | PickableTriangleList |
A variable vertex convex filled 2D polygon.
|
protected |
|
protected |
|
protected |
| makVrv::DtFilledPolygon::DtFilledPolygon | ( | DtOverlayRenderer & | renderer, |
| DtWidgetPicker & | picker | ||
| ) |
CTOR, takes render the overlay will be on.
| makVrv::DtFilledPolygon::DtFilledPolygon | ( | DtTriangleRenderer & | renderer, |
| DtWidgetPicker & | picker | ||
| ) |
CTOR, takes render the triangle render that will draw the polygon.
|
virtual |
DTOR.
|
virtual |
Set the quad fill type.
Calling fill type resets the fill parameter, thus the fill parameter must be reset after calling setFillType.
|
virtual |
Get the fill type.
|
virtual |
Set the quad fill parameter.
In Texture mode the parameter is the texture index. If the full stippledPattern (aka a full 32x32 bit array) the initial param is ignored.
|
virtual |
Clears the fill pattern of the quad.
|
virtual |
Get the quad fill parameters.
|
virtual |
Set whether the sprite has widget events.
Disabling events disconnects all of the DtFilledPolygon signals The user data is set when enabling the events, to change only the user data make multiple calls with enabled=true
Implements makVrv::DtPolygon.
| bool makVrv::DtFilledPolygon::eventsEnabled | ( | ) | const |
Get whether events are already enabled.
Set the number of vertices, any newly created vertices will be black and add 0,0,0 so setColor/setPosition may be necessary.
Implements makVrv::DtPolygon.
Get the vertex count.
Implements makVrv::DtPolygon.
|
virtual |
Set the number of vertices and their positions.
Implements makVrv::DtPolygon.
|
virtual |
Set one vertex position.
NOTE it is much more efficient to update all vertices using setPositions if several change.
Implements makVrv::DtPolygon.
|
virtual |
Sets the position of the polygon's centroid.
|
virtual |
Get the vertex position.
Implements makVrv::DtPolygon.
|
virtual |
Set one vertex position.
Implements makVrv::DtPolygon.
|
virtual |
Sets the position of the polygon's centroid.
|
virtual |
Get the vertex position.
Implements makVrv::DtPolygon.
|
virtual |
Sets an optional 3D direction with a 2D length value for a vertex.
| index | the index of the vertex to get the position of |
| x | x component of the position |
| y | y component of the position |
| z | z component of the position |
| l | l length of the vector offset in 2D. |
Implements makVrv::DtPolygon.
Set the stipple pattern.
Implements makVrv::DtPolygon.
|
virtual |
Set the color of a specific vertex.
Implements makVrv::DtPolygon.
|
virtual |
TODO document.
Implements makVrv::DtPolygon.
|
virtual |
Set the color of the polygon's centroid.
|
virtual |
Set the color.
Implements makVrv::DtPolygon.
|
virtual |
Get the color.
Implements makVrv::DtPolygon.
|
virtual |
Returns the group that the polygon is on (for Z-Ordering). Default is zero.
Implements makVrv::DtPolygon.
|
virtual |
Sets the group for Z-Ordering.
Implements makVrv::DtPolygon.
|
virtual |
As long as there are a divisible by three of triangle proxies, reworks them to be a triangle of three related points, using the center as an anchor point.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |