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 | Protected Member Functions | Protected Attributes | Friends
makVrv::DtTriangleProxy Class Reference

A flyweight class for controlling a triangle owned by the triangle renderer.

Public Member Functions

 ~DtTriangleProxy ()
 
void setGroup (float order)
 
float group () const
 
void set3DPositions (float x1, float y1, float z1, float w1, float x2, float y2, float z2, float w2, float x3, float y3, float z3, float w3)
 
void set3DPosition (float x, float y, float z, float w)
 
void set3DPosition (unsigned int index, float x, float y, float z, float w)
 
void get3DPosition (unsigned int index, float &x, float &y, float &z, float &w)
 
void set2DPositions (float x1, float y1, float x2, float y2, float x3, float y3)
 
void set2DPosition (unsigned int index, float x, float y)
 
void get2DPosition (unsigned int index, float &x, float &y) const
 
void setStyle (int style)
 
int style () const
 
void setColor (unsigned int vertIndex, float r, float g, float b, float a)
 
void setColor (float r, float g, float b, float a)
 
void getColor (float &r, float &g, float &b, float &a) const
 
void projectUVCoordinates (const DtVector &origin, const DtVector &axisU, const DtVector &axisV, float scale)
 
void setFillPatternFrequency (float frequency)
 
void setFillParameters (unsigned int fullStipplePattern[32]=0)
 
void setTextureHandle (DtTextureInterface *textureHandle)
 
void setIndex (unsigned int index)
 
unsigned int index () const
 
virtual void setIsNormalisedScreenCoordinates (bool isNormalisedScreenCoords)
 

Protected Member Functions

 DtTriangleProxy (DtTriangleRenderer &renderer, unsigned int style)
 

Protected Attributes

DtTriangleRenderermyParent
 
unsigned int myIndex
 
unsigned char myStyle
 
bool myDirtyBit
 

Friends

class DtTriangleRenderer
 

Constructor & Destructor Documentation

makVrv::DtTriangleProxy::~DtTriangleProxy ( )

DTOR.

makVrv::DtTriangleProxy::DtTriangleProxy ( DtTriangleRenderer renderer,
unsigned int  style 
)
protected

CTOR.

Member Function Documentation

void makVrv::DtTriangleProxy::setGroup ( float  order)

Set the order.

float makVrv::DtTriangleProxy::group ( ) const

Get the group.

void makVrv::DtTriangleProxy::set3DPositions ( float  x1,
float  y1,
float  z1,
float  w1,
float  x2,
float  y2,
float  z2,
float  w2,
float  x3,
float  y3,
float  z3,
float  w3 
)

Sets the 3D position of the triangle. (As packed vec4s).

void makVrv::DtTriangleProxy::set3DPosition ( float  x,
float  y,
float  z,
float  w 
)

Sets the 3D position of the triangle (As a packed vec 4), this is equivalent of setting the position of all vertices to the same 3D value.

void makVrv::DtTriangleProxy::set3DPosition ( unsigned int  index,
float  x,
float  y,
float  z,
float  w 
)

Sets the 3D position of a vertex in the triangle. (As a packed vec 4).

void makVrv::DtTriangleProxy::get3DPosition ( unsigned int  index,
float &  x,
float &  y,
float &  z,
float &  w 
)

Gets the 3D position of a vertex in the triangle.

void makVrv::DtTriangleProxy::set2DPositions ( float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3 
)

Set the 2D position, encoded as xyz triplets.

void makVrv::DtTriangleProxy::set2DPosition ( unsigned int  index,
float  x,
float  y 
)

Set a specific 2D position.

void makVrv::DtTriangleProxy::get2DPosition ( unsigned int  index,
float &  x,
float &  y 
) const

Get the 2D position of the given vertex.

void makVrv::DtTriangleProxy::setStyle ( int  style)

Set the style.

int makVrv::DtTriangleProxy::style ( ) const

Get the current style.

void makVrv::DtTriangleProxy::setColor ( unsigned int  vertIndex,
float  r,
float  g,
float  b,
float  a 
)

Sets the color of the given vertex.

void makVrv::DtTriangleProxy::setColor ( float  r,
float  g,
float  b,
float  a 
)

Set the color of all vertices.

void makVrv::DtTriangleProxy::getColor ( float &  r,
float &  g,
float &  b,
float &  a 
) const

Get the color of the central vertex.

void makVrv::DtTriangleProxy::projectUVCoordinates ( const DtVector &  origin,
const DtVector &  axisU,
const DtVector &  axisV,
float  scale 
)

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.
void makVrv::DtTriangleProxy::setFillPatternFrequency ( float  frequency)

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.

Parameters
frequencythe frequency to set.
void makVrv::DtTriangleProxy::setFillParameters ( unsigned int  fullStipplePattern[32] = 0)

Set the fill parameters.

void makVrv::DtTriangleProxy::setTextureHandle ( DtTextureInterface textureHandle)
void makVrv::DtTriangleProxy::setIndex ( unsigned int  index)

Get the internal index of this proxy.

unsigned int makVrv::DtTriangleProxy::index ( ) const

Get the internal index of this proxy.

virtual void makVrv::DtTriangleProxy::setIsNormalisedScreenCoordinates ( bool  isNormalisedScreenCoords)
virtual

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

Friends And Related Function Documentation

friend class DtTriangleRenderer
friend

Member Data Documentation

DtTriangleRenderer* makVrv::DtTriangleProxy::myParent
protected
unsigned int makVrv::DtTriangleProxy::myIndex
protected
unsigned char makVrv::DtTriangleProxy::myStyle
protected
bool makVrv::DtTriangleProxy::myDirtyBit
protected

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)