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

A style for rendering a 2D quad with only a flat color.

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

Classes

struct  FlatPrimitiveInfo
 
struct  SortFlatPrimitives
 

Public Member Functions

 DtFlatPrimitiveStyle (DtOverlayResourceProvider &provider, unsigned int vertexCountPerPrimitve)
 
virtual ~DtFlatPrimitiveStyle ()
 
virtual void add (unsigned int *index)
 
virtual void remove (unsigned int index)
 
virtual void render (int mode, unsigned int groupCount, bool geocentric, float geocentricAlpha, const double cameraLocation[3], const DtObserverRenderData &observerRenderData, const double positionMatrix[16], const double projectionMatrix[16], const int viewport[4], int offset) override
 
virtual void update (int renderMode)
 
Vertex Attribute Setters and Getters
virtual void set3DVertexPosition (unsigned int index, unsigned int vertex, float x, float y, float z, float w=0)
 
virtual void set3DVertexQuadPositions (unsigned int index, float x, float y, float z, float w)
 
virtual void get3DVertexPosition (unsigned int index, unsigned int vertex, float &x, float &y, float &z, float &w) const
 
virtual void set2DVertexPosition (unsigned int index, unsigned int vertex, float x, float y)
 
virtual void get2DVertexPosition (unsigned int index, unsigned int vertex, float &x, float &y) const
 
virtual void set2DOffsetRotation (unsigned int index, unsigned int vertIndex, float angle)
 
virtual void get2DOffsetRotation (unsigned int index, unsigned int vertIndex, float &angle) const
 
virtual void setColor (unsigned int index, unsigned int vertIndex, float r, float g, float b, float a)
 
virtual void getColor (unsigned int index, unsigned int vertIndex, float &r, float &g, float &b, float &a) const
 
virtual void setUVCoordinates (unsigned int index, unsigned int vertIndex, float u, float v)
 
virtual void getUVCoordinates (unsigned int index, unsigned int vertIndex, float &u, float &v) const
 
virtual void projectUVCoordinates (unsigned int index, const DtVector &origin, const DtVector &axisU, const DtVector &axisV, float scale) override
 
Primitive Attribute Setters and Getters
virtual void setFillParameters (unsigned int index, unsigned int fullStipplePattern[32]=0) override
 
virtual void getFillParameters (unsigned int index, unsigned int fullStipplePattern[32]=0) const override
 
virtual void setFillPatternFrequency (unsigned int index, float frequency) override
 
virtual void setTextureHandle (unsigned int index, DtTextureInterface *newTextureHandle) override
 
virtual DtTextureInterfacefindTextureHandle (unsigned int index) const override
 
virtual void setGroup (unsigned int index, float zFactor)
 
virtual float group (unsigned int index) const
 
virtual void setVisible (unsigned int index, bool visible)
 
virtual bool visible (unsigned int index) const
 
- Public Member Functions inherited from makVrv::DtPrimitiveStyle
 DtPrimitiveStyle (unsigned int vertexCountPerPrimitive)
 
virtual ~DtPrimitiveStyle ()
 
virtual void releaseResources ()
 
int numberOfPrimitives () const
 
unsigned int vertexCount () const
 
virtual void setIsNormalisedScreenCoordinates (bool isNormalisedScreenCoords)
 

Protected Types

typedef std::vector
< FlatPrimitiveInfo
FlatPrimitiveInfoList
 
typedef std::vector< unsigned intFlatIndexList
 
typedef std::vector
< DtOffsetColoredVertex
QuadVertexList
 
- Protected Types inherited from makVrv::DtPrimitiveStyle
typedef std::vector< unsigned
int * > 
IndexList
 

Protected Member Functions

virtual float * vertexData () const
 
virtual unsigned int vertexDataSize () const
 

Protected Attributes

bool mySortDirty
 
FlatPrimitiveInfoList myFlatPrimitives
 
FlatPrimitiveInfoList mySortedFlatPrimitives
 
FlatIndexList myFlatIndices
 
DtOverlayResourceProvidermyResourceProvider
 
QuadVertexList myVertices
 
DtProjected2DFlatEffectmyEffect
 
- Protected Attributes inherited from makVrv::DtPrimitiveStyle
DtBufferObjectmyBufferObject
 
unsigned int myVertexCount
 
IndexList myProxyIndices
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtFlatPrimitiveStyle::DtFlatPrimitiveStyle ( DtOverlayResourceProvider provider,
unsigned int  vertexCountPerPrimitve 
)

CTOR.

virtual makVrv::DtFlatPrimitiveStyle::~DtFlatPrimitiveStyle ( )
virtual

Virtual DTOR.

Member Function Documentation

virtual void makVrv::DtFlatPrimitiveStyle::add ( unsigned int index)
virtual

Add an index pointer to keep up to date.

Reimplemented from makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::remove ( unsigned int  index)
virtual

Remove an index.

Reimplemented from makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::render ( int  mode,
unsigned int  groupCount,
bool  geocentric,
float  geocentricAlpha,
const double  cameraLocation[3],
const DtObserverRenderData observerRenderData,
const double  positionMatrix[16],
const double  projectionMatrix[16],
const int  viewport[4],
int  offset 
)
overridevirtual

Render the primitives.

Parameters
viewport[4]- the viewport position and dimensions (x, y, width, height)

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::update ( int  renderMode)
virtual

Update the style resources.

Reimplemented from makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::set3DVertexPosition ( unsigned int  index,
unsigned int  vertex,
float  x,
float  y,
float  z,
float  w = 0 
)
virtual

Sets the 3D position of the vertex.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::set3DVertexQuadPositions ( unsigned int  index,
float  x,
float  y,
float  z,
float  w 
)
virtual

Sets the 3D position of the vertex for a quad (sets vertex 0,1,2,3)

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::get3DVertexPosition ( unsigned int  index,
unsigned int  vertex,
float &  x,
float &  y,
float &  z,
float &  w 
) const
virtual

Gets the 3D position of the vertex.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::set2DVertexPosition ( unsigned int  index,
unsigned int  vertex,
float  x,
float  y 
)
virtual

Sets the 2D position (offset) of the vertex.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::get2DVertexPosition ( unsigned int  index,
unsigned int  vertex,
float &  x,
float &  y 
) const
virtual

Gets the 2D position (offset) of the vertex.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::set2DOffsetRotation ( unsigned int  index,
unsigned int  vertIndex,
float  angle 
)
virtual

Sets the rotation of the vertex's 2D offset.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::get2DOffsetRotation ( unsigned int  index,
unsigned int  vertIndex,
float &  angle 
) const
virtual

Gets the rotation of the vertex's 2D offset.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::setColor ( unsigned int  index,
unsigned int  vertIndex,
float  r,
float  g,
float  b,
float  a 
)
virtual

Sets the color of the vertex.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::getColor ( unsigned int  index,
unsigned int  vertIndex,
float &  r,
float &  g,
float &  b,
float &  a 
) const
virtual

Gets the color of the vertex.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::setUVCoordinates ( unsigned int  index,
unsigned int  vertIndex,
float  u,
float  v 
)
virtual

Sets the UV coordinate, does nothing.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::getUVCoordinates ( unsigned int  index,
unsigned int  vertIndex,
float &  u,
float &  v 
) const
virtual

Gets the UV coordinate, returns nothing.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::projectUVCoordinates ( unsigned int  index,
const DtVector &  origin,
const DtVector &  axisU,
const DtVector &  axisV,
float  scale 
)
overridevirtual

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.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::setFillParameters ( unsigned int  index,
unsigned int  fullStipplePattern[32] = 0 
)
overridevirtual

Sets the fill parameters for the primitive (no-op).

Parameters
indexthe index of the primitive to set the fill param for.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::getFillParameters ( unsigned int  index,
unsigned int  fullStipplePattern[32] = 0 
) const
overridevirtual

Gets the fill parameters for the primitive (no-op).

Parameters
indexthe index of the primitive to get the fill param for.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::setFillPatternFrequency ( unsigned int  index,
float  frequency 
)
overridevirtual

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
indexthe index of the primitive to set the fill param for.
frequencythe frequency to set.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::setTextureHandle ( unsigned int  index,
DtTextureInterface newTextureHandle 
)
overridevirtual

Set the texture handle of the texture to be applied to the primitive no-op.

Implements makVrv::DtPrimitiveStyle.

virtual DtTextureInterface* makVrv::DtFlatPrimitiveStyle::findTextureHandle ( unsigned int  index) const
overridevirtual

Get the texture handle of the texture to be applied to the primitive no-op.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::setGroup ( unsigned int  index,
float  zFactor 
)
virtual

Sets the group for the primitive.

Parameters
indexthe index of the primitive to set the group for.

Implements makVrv::DtPrimitiveStyle.

virtual float makVrv::DtFlatPrimitiveStyle::group ( unsigned int  index) const
virtual

Gets the group for the primitive.

Parameters
indexthe index of the primitive to get the group for.

Implements makVrv::DtPrimitiveStyle.

virtual void makVrv::DtFlatPrimitiveStyle::setVisible ( unsigned int  index,
bool  visible 
)
virtual

Sets the visible state for the primitive.

Parameters
indexthe index of the primitive to set the state for.

Implements makVrv::DtPrimitiveStyle.

virtual bool makVrv::DtFlatPrimitiveStyle::visible ( unsigned int  index) const
virtual

Gets the visible state for the primitive.

Parameters
indexthe index of the primitive to get the state for.

Implements makVrv::DtPrimitiveStyle.

virtual float* makVrv::DtFlatPrimitiveStyle::vertexData ( ) const
protectedvirtual

Get the vertex data.

Implements makVrv::DtPrimitiveStyle.

virtual unsigned int makVrv::DtFlatPrimitiveStyle::vertexDataSize ( ) const
protectedvirtual

Get total size of the vertex data in bytes.

Implements makVrv::DtPrimitiveStyle.

Member Data Documentation

bool makVrv::DtFlatPrimitiveStyle::mySortDirty
protected
FlatPrimitiveInfoList makVrv::DtFlatPrimitiveStyle::myFlatPrimitives
protected
FlatPrimitiveInfoList makVrv::DtFlatPrimitiveStyle::mySortedFlatPrimitives
protected
FlatIndexList makVrv::DtFlatPrimitiveStyle::myFlatIndices
protected
DtOverlayResourceProvider& makVrv::DtFlatPrimitiveStyle::myResourceProvider
protected
QuadVertexList makVrv::DtFlatPrimitiveStyle::myVertices
protected
DtProjected2DFlatEffect* makVrv::DtFlatPrimitiveStyle::myEffect
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)