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

Public Member Functions | |
| virtual | ~DtPolygon () |
| virtual void | setVertexCount (unsigned int vertexCount)=0 |
| 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. | |
| virtual unsigned int | vertexCount () const =0 |
| Get the vertex count. | |
| virtual void | set2DPositions (const std::vector< float > &vertices)=0 |
| Sets all 2d polygon vertex positions Vertices must be given as x,y encoded pairs. | |
| virtual void | set2DPosition (unsigned int index, float x, float y)=0 |
| Sets the position of the given 2d polygon vertex NOTE: it is much more efficient to update all vertices using setPositions if several change. | |
| virtual void | get2DPosition (unsigned int index, float &x, float &y) const =0 |
| Gets the position of the given 2d polygon vertex. | |
| virtual void | set3DPosition (unsigned int index, float x, float y, float z, float w)=0 |
| Sets the position of the given 3d polygon vertex. | |
| virtual void | get3DPosition (unsigned int index, float &x, float &y, float &z, float &w) const =0 |
| Gets the position of the given 3d polygon vertex. | |
| virtual void | set3DDirectionAndLength (unsigned int index, float x, float y, float z, float l)=0 |
| Sets an optional 3D direction with a 2D length value for a vertex. | |
| virtual void | setStipple (unsigned int stipplePattern)=0 |
| 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. | |
| virtual void | setVertexColor (unsigned int index, float r, float g, float b, float a)=0 |
| Set the color of a specific vertex. | |
| virtual void | getVertexColor (unsigned int index, float &r, float &g, float &b, float &a)=0 |
| Gets the color of the requested vertex. | |
| virtual void | setColor (float r, float g, float b, float a)=0 |
| Sets the color of the polygon. | |
| virtual void | getColor (float &r, float &g, float &b, float &a) const =0 |
| Gets a color representative of the polygon's color. | |
| virtual void | setEventsEnabled (bool b, unsigned long long userData=0)=0 |
| Sets whether or not mouse events are enabled for this polygon, and, the user data for it. | |
| virtual int | group () const =0 |
| Returns the group that the polygon is on (for Z-Ordering) | |
| virtual void | setGroup (int)=0 |
| Sets the group the polygon is on (for Z-Ordering) | |
A variable vertex 2D polygon.
|
virtual |
|
pure virtual |
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
pure virtual |
Get the vertex count.
Implemented in makVrv::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
pure virtual |
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
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::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
pure virtual |
Sets whether or not mouse events are enabled for this polygon, and, the user data for it.
Implemented in makVrv::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
pure virtual |
Returns the group that the polygon is on (for Z-Ordering)
Implemented in makVrv::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
|
pure virtual |
Sets the group the polygon is on (for Z-Ordering)
Implemented in makVrv::DtFilledPolygon, and makVrv::DtOutlinedPolygon.