![]() |
VR-Forces Developer's Guide
|
A variable vertex convex filled 2D polygon.

Public Member Functions | |
| DtFilledPolygon (DtOverlayRendererInterface &renderer, DtWidgetPicker &picker) | |
| DtFilledPolygon (DtDe &de, DtChannel *channel, DtModelSetId modelSet) | |
| virtual | ~DtFilledPolygon () |
| virtual void | setFillType (FillType type) |
| virtual FillType | fillType () const |
| virtual void | setFillParameter (unsigned int param, unsigned int fullStipplePattern[32]=0) override |
| virtual void | setFillTexture (DtTextureInterface *textureHandle) override |
| virtual void | clearFillPattern () |
| virtual void | getFillParameter (unsigned int ¶mOut, unsigned int fullStipplePatternOut[32]) const override |
| virtual void | setFillPatternFrequency (float frequency) override |
| virtual void | setEventsEnabled (bool enabled, unsigned long long=0) |
| bool | eventsEnabled () const |
| virtual void | setVertexCount (unsigned int vertexCount) |
| virtual unsigned int | vertexCount () const |
| virtual void | set2DPositions (const std::vector< float > &vertices) |
| virtual void | set2DPosition (unsigned int vertexIndex, float x, float y) |
| virtual void | set2DCentroidPosition (float x, float y) |
| virtual void | get2DPosition (unsigned int vertexIndex, float &x, float &y) const |
| virtual void | set3DPosition (unsigned int vertexIndex, float x, float y, float z, float w) |
| virtual void | set3DCentroidPosition (float x, float y, float z, float w) |
| virtual void | get3DPosition (unsigned int index, float &x, float &y, float &z, float &w) const |
| void | set3DDirectionAndLength (unsigned int index, float x, float y, float z, float l) |
| virtual void | projectUVCoordinates (const DtVector &origin, const DtVector &axisU, const DtVector &axisV, float scale=1.0f) override |
| virtual void | setStipple (unsigned int stipplePattern) |
| virtual void | setVertexColor (unsigned int index, float r, float g, float b, float a) |
| virtual void | getVertexColor (unsigned int index, float &r, float &g, float &b, float &a) |
| virtual void | setCentroidColor (float r, float g, float b, float a) |
| virtual void | setColor (float r, float g, float b, float a) |
| virtual void | getColor (float &r, float &g, float &b, float &a) const |
| virtual int | group () const |
| virtual void | setGroup (int) |
| virtual void | triangulate () |
| virtual void | set2DPositionsTriangles (const std::vector< float > &vertices) |
| virtual void | setVertexCountTriangles (unsigned int vertexCount) |
Public Member Functions inherited from makVrv::DtFilledPolygonInterface | |
| DtFilledPolygonInterface () | |
| virtual | ~DtFilledPolygonInterface () |
Public Member Functions inherited from makVrv::DtPolygonInterface | |
| DtPolygonInterface ()=default | |
| DtPolygonInterface (DtPolygonInterface &)=delete | |
| DtPolygonInterface (DtPolygonInterface &&)=delete | |
| DtPolygonInterface & | operator= (DtPolygonInterface &)=delete |
| DtPolygonInterface & | operator= (DtPolygonInterface &&)=delete |
| virtual | ~DtPolygonInterface () |
| virtual void | triangulationComplete (bool crossingLines) |
Protected Types | |
| typedef std::vector< float > | VertexList |
| typedef std::vector < DtTriangleProxy * > | TriangleProxyList |
| typedef std::vector < DtPickableTriangle * > | PickableTriangleList |
Protected Member Functions | |
| virtual void | slot_pickerDestroyed () |
Protected Attributes | |
| DtOverlayRendererInterface * | myRenderer |
| DtWidgetPicker * | myPicker |
| bool | myEventsEnabled |
| bool | myPickerDestroyed |
| boost::signalslib::connection | myPickerDestroyedConnection |
| unsigned long long | myUserData |
| VertexList | myVertices |
| VertexList | my3DVertices |
| float | myCenterPoint [2] |
| double | my3DCenterPoint [3] |
| TriangleProxyList | myTriangles |
| PickableTriangleList | myPickableTriangles |
| unsigned int | myFillParam |
| DtTextureInterface * | myFillTexture |
| unsigned int | myFullStipplePattern [32] |
| FillType | myFillType |
| int | myGroup |
Additional Inherited Members | |
Public Types inherited from makVrv::DtFilledPolygonInterface | |
| enum | FillType { Fill_Solid = 0, Fill_Stipple, Fill_Texture, FillType_End } |
|
protected |
|
protected |
|
protected |
| makVrv::DtFilledPolygon::DtFilledPolygon | ( | DtOverlayRendererInterface & | renderer, |
| DtWidgetPicker & | picker | ||
| ) |
CTOR, takes render the overlay will be on.
| makVrv::DtFilledPolygon::DtFilledPolygon | ( | DtDe & | de, |
| DtChannel * | channel, | ||
| DtModelSetId | modelSet | ||
| ) |
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.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Get the fill type.
Implements makVrv::DtFilledPolygonInterface.
|
overridevirtual |
Set a 32x32 stipple pattern as the fill. If the full stippledPattern (aka a full 32x32 bit array) the initial param is ignored.
Implements makVrv::DtFilledPolygonInterface.
|
overridevirtual |
Sets the texture to fill the polygon with. The texture is visualized to be centered in the polygon and to fill the polygon with minimal tiling.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Clears the fill pattern of the quad.
Implements makVrv::DtFilledPolygonInterface.
|
overridevirtual |
Get the quad fill parameters.
Implements makVrv::DtFilledPolygonInterface.
|
overridevirtual |
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.
Implements makVrv::DtFilledPolygonInterface.
|
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::DtFilledPolygonInterface.
|
virtual |
Get whether events are already enabled.
Implements makVrv::DtFilledPolygonInterface.
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::DtFilledPolygonInterface.
Get the vertex count.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Set the number of vertices and their positions.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Set one vertex position. NOTE it is much more efficient to update all vertices using setPositions if several change.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Sets the position of the polygon's centroid.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Get the vertex position.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Set one vertex position.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Sets the position of the polygon's centroid.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Get the vertex position.
Implements makVrv::DtFilledPolygonInterface.
|
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::DtFilledPolygonInterface.
|
overridevirtual |
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. |
Implements makVrv::DtFilledPolygonInterface.
Set the stipple pattern.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Set the color of a specific vertex.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
TODO document.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Set the color of the polygon's centroid.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Set the color.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Get the color.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Returns the group that the polygon is on (for Z-Ordering). Default is zero.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Sets the group for Z-Ordering.
Implements makVrv::DtFilledPolygonInterface.
|
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.
Implements makVrv::DtFilledPolygonInterface.
|
virtual |
Set the number of vertices and their positions. This method is to be used instead of set2DPositions. This method does not calculate/use the center of the polygon as the third vertex for each two passed in like set2DPositions. It expects the triangles to already be calculated, the loop in here skips 6 floats per iteration.
Implements makVrv::DtFilledPolygonInterface.
Set the number of vertices, any newly created vertices will be black and add 0,0,0 so setColor/setPosition may be necessary.This method is used instead of setVertexCount when you are calling set2DPositionsTriangles.
Implements makVrv::DtFilledPolygonInterface.
|
protectedvirtual |
Called when the widget picker is destroyed, clears out pickable segment list and sets a flag to no longer use the picker.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |