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

A variable vertex convex filled 2D polygon.

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

Public Types

enum  FillType { Fill_Solid = 0, Fill_Stipple, Fill_Texture, FillType_End }
 

Public Member Functions

 DtFilledPolygonInterface ()
 
virtual ~DtFilledPolygonInterface ()
 
virtual void setFillType (FillType type)=0
 
virtual FillType fillType () const =0
 
virtual void setFillParameter (unsigned int param, unsigned int fullStipplePattern[32]=0)=0
 
virtual void setFillTexture (DtTextureInterface *textureHandle)=0
 
virtual void clearFillPattern ()=0
 
virtual void getFillParameter (unsigned int &paramOut, unsigned int fullStipplePatternOut[32]) const =0
 
virtual void setFillPatternFrequency (float frequency)=0
 
virtual void setEventsEnabled (bool enabled, unsigned long long=0)=0
 
virtual bool eventsEnabled () const =0
 
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 vertexIndex, float x, float y)=0
 
virtual void set2DCentroidPosition (float x, float y)=0
 
virtual void get2DPosition (unsigned int vertexIndex, float &x, float &y) const =0
 
virtual void set3DPosition (unsigned int vertexIndex, float x, float y, float z, float w)=0
 
virtual void set3DCentroidPosition (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 projectUVCoordinates (const DtVector &origin, const DtVector &axisU, const DtVector &axisV, float scale=1.0f)=0
 
virtual void setStipple (unsigned int stipplePattern)=0
 
virtual void setCentroidColor (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 int group () const =0
 
virtual void setGroup (int)=0
 
virtual void triangulate ()=0
 
virtual void set2DPositionsTriangles (const std::vector< float > &vertices)=0
 
virtual void setVertexCountTriangles (unsigned int vertexCount)=0
 
virtual void setIsNormalisedScreenCoordinates (bool isNormalisedScreenCoords)=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
 
- Public Member Functions inherited from makVrv::DtPolygonInterface
 DtPolygonInterface ()=default
 
 DtPolygonInterface (DtPolygonInterface &)=delete
 
 DtPolygonInterface (DtPolygonInterface &&)=delete
 
DtPolygonInterfaceoperator= (DtPolygonInterface &)=delete
 
DtPolygonInterfaceoperator= (DtPolygonInterface &&)=delete
 
virtual ~DtPolygonInterface ()
 
virtual void triangulationComplete (bool crossingLines)
 

Member Enumeration Documentation

Enumerator
Fill_Solid 
Fill_Stipple 
Fill_Texture 
FillType_End 

Constructor & Destructor Documentation

makVrv::DtFilledPolygonInterface::DtFilledPolygonInterface ( )

CTOR.

virtual makVrv::DtFilledPolygonInterface::~DtFilledPolygonInterface ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtFilledPolygonInterface::setFillType ( FillType  type)
pure virtual

Set the quad fill type. Calling fill type resets the fill parameter, thus the fill parameter must be reset after calling setFillType.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual FillType makVrv::DtFilledPolygonInterface::fillType ( ) const
pure virtual

Get the fill type.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setFillParameter ( unsigned int  param,
unsigned int  fullStipplePattern[32] = 0 
)
pure virtual

Set the quad fill parameter.

If the full stippledPattern (aka a full 32x32 bit array) the initial param is ignored.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setFillTexture ( DtTextureInterface textureHandle)
pure virtual

Sets the texture to fill the polygon with. The texture is visualized to be centered in the polygon and to fill the polygon with minimal tiling.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::clearFillPattern ( )
pure virtual

Clears the fill pattern of the quad.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::getFillParameter ( unsigned int paramOut,
unsigned int  fullStipplePatternOut[32] 
) const
pure virtual

Get the quad fill parameters.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setFillPatternFrequency ( float  frequency)
pure virtual

Sets the fill pattern tiling frequency. The frequency needs to be 1 / x where x is a whole number. examples: frequency = 1.0 : the tiled pattern will tile normally frequency = 0.5 : the tiled pattern will appear half as often.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setEventsEnabled ( bool  enabled,
unsigned long  long = 0 
)
pure virtual

Set whether the sprite has widget events. Disabling events disconnects all of the DtFilledPolygonInterface signals The user data is set when enabling the events, to change only the user data make multiple calls with enabled=true.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual bool makVrv::DtFilledPolygonInterface::eventsEnabled ( ) const
pure virtual

Get whether events are already enabled.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setVertexCount ( unsigned int  vertexCount)
pure virtual

Set the number of vertices, any newly created vertices will be black and add 0,0,0 so setColor/setPosition may be necessary.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual unsigned int makVrv::DtFilledPolygonInterface::vertexCount ( ) const
pure virtual

Get the vertex count.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::set2DPositions ( const std::vector< float > &  vertices)
pure virtual

Set the number of vertices and their positions.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::set2DPosition ( unsigned int  vertexIndex,
float  x,
float  y 
)
pure virtual

Set one vertex position. NOTE it is much more efficient to update all vertices using setPositions if several change.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::set2DCentroidPosition ( float  x,
float  y 
)
pure virtual

Sets the position of the polygon's centroid.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::get2DPosition ( unsigned int  vertexIndex,
float &  x,
float &  y 
) const
pure virtual

Get the vertex position.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::set3DPosition ( unsigned int  vertexIndex,
float  x,
float  y,
float  z,
float  w 
)
pure virtual

Set one vertex position.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::set3DCentroidPosition ( float  x,
float  y,
float  z,
float  w 
)
pure virtual

Sets the position of the polygon's centroid.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::get3DPosition ( unsigned int  index,
float &  x,
float &  y,
float &  z,
float &  w 
) const
pure virtual

Get the vertex position.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::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.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::projectUVCoordinates ( const DtVector &  origin,
const DtVector &  axisU,
const DtVector &  axisV,
float  scale = 1.0f 
)
pure virtual

Does uv coordinate projection based on the current vertex positions and the given projection parameters.

Parameters
origin- each vertex position will subtract the origin.
axisU- the X axis to project the position along for the u coordinate.
axisV- the Y axis to project the position along for the v coordinate.
scale- the scale to apply to the final uv coordinates.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setStipple ( unsigned int  stipplePattern)
pure virtual

Set the stipple pattern.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setVertexColor ( unsigned int  index,
float  r,
float  g,
float  b,
float  a 
)
pure virtual

Set / Get the color of a specific vertex.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::getVertexColor ( unsigned int  index,
float &  r,
float &  g,
float &  b,
float &  a 
)
pure virtual

Set / Get the color of a specific vertex.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setCentroidColor ( float  r,
float  g,
float  b,
float  a 
)
pure virtual

Set the color of the polygon's centroid.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setColor ( float  r,
float  g,
float  b,
float  a 
)
pure virtual
virtual void makVrv::DtFilledPolygonInterface::getColor ( float &  r,
float &  g,
float &  b,
float &  a 
) const
pure virtual
virtual int makVrv::DtFilledPolygonInterface::group ( ) const
pure virtual

Returns the group that the polygon is on (for Z-Ordering). Default is zero.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setGroup ( int  )
pure virtual

Sets the group for Z-Ordering.

Implements makVrv::DtPolygonInterface.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::triangulate ( )
pure virtual

As long as there are a divisible by three of triangle proxies, reworks them to be a triangle of three related points, using the center as an anchor point.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::set2DPositionsTriangles ( const std::vector< float > &  vertices)
pure virtual

Set the number of vertices and their positions. This method is to be used instead of set2DPositions. This method does not calculate/use the center of the polygon as the third vertex for each two passed in like set2DPositions. It expects the triangles to already be calculated, the loop in here skips 6 floats per iteration.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setVertexCountTriangles ( unsigned int  vertexCount)
pure virtual

Set the number of vertices, any newly created vertices will be black and add 0,0,0 so setColor/setPosition may be necessary.This method is used instead of setVertexCount when you are calling set2DPositionsTriangles.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.

virtual void makVrv::DtFilledPolygonInterface::setIsNormalisedScreenCoordinates ( bool  isNormalisedScreenCoords)
pure virtual

Set whether the graphic is normalised screen coordinates Used by window object API, passed to shader.

Implemented in makVrv::DtDecalProjectorPolygon, and makVrv::DtFilledPolygon.


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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)