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::DtDecalProjectorComponentInterface Class Referenceabstract

A class which represents a component for a decal projector.

This is part of a component/system concept. In this case the system portion is handled by DtDecalProjectorRenderer.

To use this component, you get the DtDecalProjectorRenderer from the DtOverlayRenderer that you are working with. Then call createComponent using the DtDecalProjectorRenderer::createComponent method. The component takes care of registering/unregistering itself with the DtDecalProjectorRenderer, but you must handle freeing the component when no longer using it because DtDecalProjectorRenderer does not own it.

This component is used for projecting geometry onto a surface/terrain. Triangles and lines are currently supported by the renderer. The staging geometry in general is meant to lay on the same plane but it does not have to be perfectly flat.

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

Public Types

enum  RenderingType { RenderingTypeLine = 0, RenderingTypeTriangle }
 

Public Member Functions

 DtDecalProjectorComponentInterface ()
 
virtual ~DtDecalProjectorComponentInterface ()
 
virtual void setProjectionRange (float projNear, float projFar)=0
 
virtual void projectionRange (float &projNear, float &projFar) const =0
 
virtual void resizeStagingVertexCount (size_t size)=0
 
virtual void setStagingVertexPosition (unsigned int index, double x, double y, double z)=0
 
virtual void expandStagingPointsToLines ()=0
 
virtual void expandStagingPointsToLineQuads (float lineWidth)=0
 
virtual void stagingGeometryUpdated ()=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 projectUVCoordinates (const DtVector &origin, const DtVector &axisU, const DtVector &axisV)=0
 
virtual void getUVCoordinateProjection (DtVector3< float > &origin, DtVector3< float > &axisU, DtVector3< float > &axisV) const =0
 
virtual void setStipplePattern (unsigned int stipplePattern[32]=0)=0
 
virtual const unsigned intgetStipplePattern () const =0
 
virtual void setFillPatternFrequency (float frequency)=0
 
virtual float fillPatternFrequency () const =0
 
virtual void setAllowAltitudeTileMultiplier (bool allow)=0
 
virtual bool allowAltitudeTileMultiplier () const =0
 
virtual void setTexture (DtTextureInterface *texture)=0
 
virtual DtTextureInterfacetexture () const =0
 
virtual bool pick (double x, double y, double z) const =0
 

Member Enumeration Documentation

Enumeration for component renderer topology to use.

Enumerator
RenderingTypeLine 
RenderingTypeTriangle 

Constructor & Destructor Documentation

makVrv::DtDecalProjectorComponentInterface::DtDecalProjectorComponentInterface ( )

CTOR.

virtual makVrv::DtDecalProjectorComponentInterface::~DtDecalProjectorComponentInterface ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtDecalProjectorComponentInterface::setProjectionRange ( float  projNear,
float  projFar 
)
pure virtual

Sets the back/forward projection range of the decal. The range is in reference to the origin of the points. This is similar to a near/far clip range.

Parameters
projNearThe near distance to project (can be negative behind the origin)
projFarThe far distance to project (should be > projNear) example: setProjectionRange(-100.0, 500.0) would project on something up to 100 meters behind the origin and 500 meters in front of the origin.

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::projectionRange ( float &  projNear,
float &  projFar 
) const
pure virtual

Gets the back/forward projection range of the decal. (see setProjectionRange)

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::resizeStagingVertexCount ( size_t  size)
pure virtual

Sets the current staging vertex count.

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::setStagingVertexPosition ( unsigned int  index,
double  x,
double  y,
double  z 
)
pure virtual

Sets the position of a staging vertex.

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::expandStagingPointsToLines ( )
pure virtual

Takes the current staging points and treats them as a line loop. Expands staging points to hold unique points for each primitive.

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::expandStagingPointsToLineQuads ( float  lineWidth)
pure virtual

Takes the current staging points and treats them as a line loop. Each line will be converted to 2 triangles that form a quad in the topo plane. Expands staging points to hold unique points for each primitive.

Parameters
lineWidthThe width in meters of the line quad

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::stagingGeometryUpdated ( )
pure virtual

Called after all staging gemoetry has been updated. Internally computes bounding information, and prepares data for rendering draw passes.

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::setColor ( float  r,
float  g,
float  b,
float  a 
)
pure virtual

Set the color of all vertices.

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::getColor ( float &  r,
float &  g,
float &  b,
float &  a 
) const
pure virtual

Get the color of all vertices.

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::projectUVCoordinates ( const DtVector origin,
const DtVector axisU,
const DtVector axisV 
)
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

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::getUVCoordinateProjection ( DtVector3< float > &  origin,
DtVector3< float > &  axisU,
DtVector3< float > &  axisV 
) const
pure virtual
virtual void makVrv::DtDecalProjectorComponentInterface::setStipplePattern ( unsigned int  stipplePattern[32] = 0)
pure virtual

Set a stipple pattern to be used for rendering.

Implemented in makVrv::DtDecalProjectorComponent.

virtual const unsigned int* makVrv::DtDecalProjectorComponentInterface::getStipplePattern ( ) const
pure virtual

Get the stipple pattern used for rendering.

Implemented in makVrv::DtDecalProjectorComponent.

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

virtual float makVrv::DtDecalProjectorComponentInterface::fillPatternFrequency ( ) const
pure virtual

Returns the fill pattern tiling frequency.

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::setAllowAltitudeTileMultiplier ( bool  allow)
pure virtual

The texture tiling will be modified at descrete levels based on viewing from different altitudes. This method sets whether or not that should be allowed.

Implemented in makVrv::DtDecalProjectorComponent.

virtual bool makVrv::DtDecalProjectorComponentInterface::allowAltitudeTileMultiplier ( ) const
pure virtual

The texture tiling will be modified at descrete levels based on viewing from different altitudes. This method returns whether or not that should be allowed.

Implemented in makVrv::DtDecalProjectorComponent.

virtual void makVrv::DtDecalProjectorComponentInterface::setTexture ( DtTextureInterface texture)
pure virtual

Sets a texture handle to use for rendering. The texture will be used instead of the stipple pattern.

Parameters
textureThe texture handle from DtOverlayResourceProvider.

Implemented in makVrv::DtDecalProjectorComponent.

virtual DtTextureInterface* makVrv::DtDecalProjectorComponentInterface::texture ( ) const
pure virtual

Gets the texture handle used for rendering.

Implemented in makVrv::DtDecalProjectorComponent.

virtual bool makVrv::DtDecalProjectorComponentInterface::pick ( double  x,
double  y,
double  z 
) const
pure virtual

Returns true if the given location would be in the decal projection space.

Parameters
(x,y,z)The surface location in local VRV space

Implemented in makVrv::DtDecalProjectorComponent.


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)