VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
makVrv::DtPolygonInterface Class Referenceabstract

An abstract interface for a polygon primitive.

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

Public Member Functions

 DtPolygonInterface ()=default
 
 DtPolygonInterface (DtPolygonInterface &)=delete
 
 DtPolygonInterface (DtPolygonInterface &&)=delete
 
DtPolygonInterfaceoperator= (DtPolygonInterface &)=delete
 
DtPolygonInterfaceoperator= (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)
 

Constructor & Destructor Documentation

makVrv::DtPolygonInterface::DtPolygonInterface ( )
default

Default CTOR.

makVrv::DtPolygonInterface::DtPolygonInterface ( DtPolygonInterface )
delete

Copy CTOR - Not Allowed.

makVrv::DtPolygonInterface::DtPolygonInterface ( DtPolygonInterface &&  )
delete

Move CTOR - Not Allowed.

virtual makVrv::DtPolygonInterface::~DtPolygonInterface ( )
virtual

Virtual DTOR.

Member Function Documentation

DtPolygonInterface& makVrv::DtPolygonInterface::operator= ( DtPolygonInterface )
delete

Copy Assignment Operator - Not Allowed.

DtPolygonInterface& makVrv::DtPolygonInterface::operator= ( DtPolygonInterface &&  )
delete

Move Assignment Operator - Not Allowed.

virtual void makVrv::DtPolygonInterface::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::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual unsigned int makVrv::DtPolygonInterface::vertexCount ( ) const
pure virtual
virtual void makVrv::DtPolygonInterface::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::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual void makVrv::DtPolygonInterface::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::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual void makVrv::DtPolygonInterface::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::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual void makVrv::DtPolygonInterface::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::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual void makVrv::DtPolygonInterface::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::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual void makVrv::DtPolygonInterface::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::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual void makVrv::DtPolygonInterface::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::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual void makVrv::DtPolygonInterface::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::DtDecalProjectorPolygon, makVrv::DtFilledPolygonInterface, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual void makVrv::DtPolygonInterface::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::DtDecalProjectorPolygon, makVrv::DtFilledPolygonInterface, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual void makVrv::DtPolygonInterface::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::DtDecalProjectorPolygon, makVrv::DtFilledPolygonInterface, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual void makVrv::DtPolygonInterface::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::DtDecalProjectorPolygon, makVrv::DtFilledPolygonInterface, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual void makVrv::DtPolygonInterface::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::DtFilledPolygonInterface, makVrv::DtDecalProjectorPolygon, makVrv::DtFilledPolygon, makVrv::DtOutlinedPolygon, makVrv::DtTexturedOutlinedPolygon, and makVrv::DtOutlinedPolygonInterface.

virtual int makVrv::DtPolygonInterface::group ( ) const
pure virtual
virtual void makVrv::DtPolygonInterface::setGroup ( int  )
pure virtual
virtual void makVrv::DtPolygonInterface::triangulationComplete ( bool  crossingLines)
virtual

This is call when a polygon's triangulation is complete. Derived classes are not required to do anything in this case.

Parameters
crossingLinesTrue if triangulation had crossing lines.

Reimplemented in makVrv::DtDecalProjectorPolygon.


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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)