VR-Forces 4.0.4 Class Documentation
Public Member Functions
makVrv::DtPolygon Class Reference

A variable vertex 2D polygon. More...

Inheritance diagram for makVrv::DtPolygon:
Inheritance graph
[legend]

List of all members.

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.

Detailed Description

A variable vertex 2D polygon.


Constructor & Destructor Documentation

virtual makVrv::DtPolygon::~DtPolygon ( ) [virtual]

Member Function Documentation

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.

Parameters:
thenew 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.

Parameters:
verticesvector 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.

Parameters:
vertexIndexthe index of the vertex to reposition
xthe x component of the position
ythe 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.

Parameters:
xx component of the position
yy 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.

Parameters:
indexthe index of the vertex to reposition
xthe x component of the position
ythe y component of the position
zthe z component of the position
wthe 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.

Parameters:
indexthe index of the vertex to get the position of
xx component of the position
yy component of the position
zz component of the position
ww 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.

Parameters:
indexthe index of the vertex to get the position of
xx component of the position
yy component of the position
zz component of the position
ll 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.

Parameters:
stipplePatternthe 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.

Parameters:
indexthe vertex index to set the color of
rthe r component of the color to set
gthe g component of the color to set
bthe b component of the color to set
athe 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.

Parameters:
indexthe index of the vertex to get the color of
rthe r component of the color to set
gthe g component of the color to set
bthe b component of the color to set
athe 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.

Parameters:
rthe r component of the color to set
gthe g component of the color to set
bthe b component of the color to set
athe 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.

Parameters:
rr component of the color
gg component of the color
bb component of the color
aa 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.


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)