![]() |
VR-Forces Developer's Guide
|
An abstract interface for a polygon primitive.

Public Member Functions | |
| DtPolygonInterface ()=default | |
| DtPolygonInterface (DtPolygonInterface &)=delete | |
| DtPolygonInterface (DtPolygonInterface &&)=delete | |
| DtPolygonInterface & | operator= (DtPolygonInterface &)=delete |
| DtPolygonInterface & | operator= (DtPolygonInterface &&)=delete |
| virtual | ~DtPolygonInterface () |
| virtual void | setVertexCount (unsigned int vertexCount)=0 |
| virtual unsigned int | vertexCount () const =0 |
| virtual void | set2DPositions (const std::vector< float > &vertices)=0 |
| virtual void | set2DPosition (unsigned int index, float x, float y)=0 |
| virtual void | get2DPosition (unsigned int index, float &x, float &y) const =0 |
| virtual void | set3DPosition (unsigned int index, float x, float y, float z, float w)=0 |
| virtual void | get3DPosition (unsigned int index, float &x, float &y, float &z, float &w) const =0 |
| virtual void | set3DDirectionAndLength (unsigned int index, float x, float y, float z, float l)=0 |
| virtual void | setStipple (unsigned int stipplePattern)=0 |
| virtual void | setVertexColor (unsigned int index, float r, float g, float b, float a)=0 |
| virtual void | getVertexColor (unsigned int index, float &r, float &g, float &b, float &a)=0 |
| virtual void | setColor (float r, float g, float b, float a)=0 |
| virtual void | getColor (float &r, float &g, float &b, float &a) const =0 |
| virtual void | setEventsEnabled (bool b, unsigned long long userData=0)=0 |
| virtual int | group () const =0 |
| virtual void | setGroup (int)=0 |
| virtual void | triangulationComplete (bool crossingLines) |
|
default |
Default CTOR.
|
delete |
Copy CTOR - Not Allowed.
|
delete |
Move CTOR - Not Allowed.
|
virtual |
Virtual DTOR.
|
delete |
Copy Assignment Operator - Not Allowed.
|
delete |
Move Assignment Operator - Not Allowed.
Set the vertex count for the polygon Set the number of vertices, any newly created vertices will be black and at 0,0,0 so setColor/setPosition may be necessary.
| the | new vertex count |
Implemented in makVrv::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
Get the vertex count.
Implemented in makVrv::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Sets all 2d polygon vertex positions Vertices must be given as x,y encoded pairs.
| vertices | vector of floats containing the vertex positions |
Implemented in makVrv::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Sets the position of the given 2d polygon vertex NOTE: it is much more efficient to update all vertices using setPositions if several change.
| vertexIndex | the index of the vertex to reposition |
| x | the x component of the position |
| y | the y component of the position |
Implemented in makVrv::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Gets the position of the given 2d polygon vertex.
| x | x component of the position |
| y | y component of the position |
Implemented in makVrv::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Sets the position of the given 3d polygon vertex.
| index | the index of the vertex to reposition |
| x | the x component of the position |
| y | the y component of the position |
| z | the z component of the position |
| w | the w component of the position |
Implemented in makVrv::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Gets the position of the given 3d polygon 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 |
| w | w component of the position |
Implemented in makVrv::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure 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. |
Implemented in makVrv::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
Set the stipple pattern This pattern is used as a bitmask against the pixels of the polygon The default value is 0xFFFFFFFF, which is equivalent to no stippling.
| stipplePattern | the pattern to use for stippling |
Implemented in makVrv::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Set the color of a specific vertex.
| index | the vertex index to set the color of |
| r | the r component of the color to set |
| g | the g component of the color to set |
| b | the b component of the color to set |
| a | the a component of the color to set |
Implemented in makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygonInterface, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Gets the color of the requested vertex.
| index | the index of the vertex to get the color of |
| r | the r component of the color to set |
| g | the g component of the color to set |
| b | the b component of the color to set |
| a | the a component of the color to set |
Implemented in makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygonInterface, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Sets the color of the polygon.
| r | the r component of the color to set |
| g | the g component of the color to set |
| b | the b component of the color to set |
| a | the a component of the color to set |
Implemented in makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygonInterface, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Gets a color representative of the polygon's color.
| r | r component of the color |
| g | g component of the color |
| b | b component of the color |
| a | a component of the color |
Implemented in makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygonInterface, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Sets whether or not mouse events are enabled for this polygon, and, the user data for it.
Implemented in makVrv::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Returns the group that the polygon is on (for Z-Ordering)
Implemented in makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygonInterface, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
pure virtual |
Sets the group the polygon is on (for Z-Ordering)
Implemented in makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygonInterface, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.
|
virtual |
This is call when a polygon's triangulation is complete. Derived classes are not required to do anything in this case.
| crossingLines | True if triangulation had crossing lines. |
Reimplemented in makVrv::DtDecalProjectorPolygon.