![]() |
VR-Forces 4.0.4 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. | |
A variable vertex 2D polygon.
| virtual makVrv::DtPolygon::~DtPolygon | ( | ) | [virtual] |
| virtual void makVrv::DtPolygon::setVertexCount | ( | unsigned int | vertexCount | ) | [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.
| virtual unsigned int makVrv::DtPolygon::vertexCount | ( | ) | const [pure virtual] |
Get the vertex count.
Implemented in makVrv::DtFilledPolygon, and makVrv::DtOutlinedPolygon.
| virtual void makVrv::DtPolygon::set2DPositions | ( | const std::vector< float > & | vertices | ) | [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.
| virtual void makVrv::DtPolygon::set2DPosition | ( | unsigned int | index, |
| float | x, | ||
| float | y | ||
| ) | [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.
| virtual void makVrv::DtPolygon::get2DPosition | ( | unsigned int | index, |
| float & | x, | ||
| float & | y | ||
| ) | const [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.
| virtual void makVrv::DtPolygon::set3DPosition | ( | unsigned int | index, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | w | ||
| ) | [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.
| virtual void makVrv::DtPolygon::get3DPosition | ( | unsigned int | index, |
| float & | x, | ||
| float & | y, | ||
| float & | z, | ||
| float & | w | ||
| ) | const [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.
| virtual void makVrv::DtPolygon::set3DDirectionAndLength | ( | unsigned int | index, |
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | l | ||
| ) | [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.
| virtual void makVrv::DtPolygon::setStipple | ( | unsigned int | stipplePattern | ) | [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::DtOutlinedPolygon, and makVrv::DtFilledPolygon.
| virtual void makVrv::DtPolygon::setVertexColor | ( | unsigned int | index, |
| float | r, | ||
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) | [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.
| virtual void makVrv::DtPolygon::getVertexColor | ( | unsigned int | index, |
| float & | r, | ||
| float & | g, | ||
| float & | b, | ||
| float & | a | ||
| ) | [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.
| virtual void makVrv::DtPolygon::setColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) | [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.
| virtual void makVrv::DtPolygon::getColor | ( | float & | r, |
| float & | g, | ||
| float & | b, | ||
| float & | a | ||
| ) | const [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.
| virtual void makVrv::DtPolygon::setEventsEnabled | ( | bool | b, |
| unsigned long long | userData = 0 |
||
| ) | [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.