VR-Forces 5.0.2 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 | Static Protected Member Functions | Protected Attributes | Friends
makVrv::DtQuadProxy Class Reference

A flyweight class for controlling a single quad owned by the DtQuadRenderer. None of this class's member functions are virtual because:

Classes

class  DtAltitudeSpecificConfiguration
 

Public Member Functions

 ~DtQuadProxy ()
 
void setGroup (float order)
 
float group () const
 
void set3DPosition (int index, float x, float y, float z, float w)
 
void set3DPosition (float x, float y, float z, float w=0)
 
void get3DPosition (float &x, float &y, float &z, float &w) const
 
void set2DRotation (float angle)
 
void get2DRotation (float &angle) const
 
void setPoints (const float points[8])
 
void getPoints (float points[8]) const
 
void setPointsByMinimumAltitude (const float points[8], double altitude)
 
void setIsForcedPointsByAltitudeEnabled (bool isEnabled)
 
void setAltitudeForForcedPoints (double minimumAltitudeForUse)
 
void clearAltitudeSpecificConfigurations ()
 
void setBounds (const float bounds[4])
 
void getBounds (float bounds[4]) const
 
void setStyle (int style)
 
int style () const
 
void setColor (float r, float g, float b, float a)
 
void getColor (float &r, float &g, float &b, float &a) const
 
void setStippleParameters (unsigned int fill, unsigned int fullStipplePattern[32]=0)
 
void setTextureParameters (void *textureHangle, float left=0.0f, float right=1.0f, float bottom=0.0f, float top=1.0f)
 
void * textureHandle () const
 
unsigned int index () const
 
void setIndex (unsigned int index)
 
void setLodOutAltitude (double lodOutAltitude)
 
double lodOutAltitude () const
 
void setIsLodOutAltitudeEnabled (bool isLodOutAltitudeEnabled)
 
bool isLodOutAltitudeEnabled () const
 

Protected Types

typedef std::vector
< DtAltitudeSpecificConfiguration
DtMinimumAltitudeToPointsVector
 

Protected Member Functions

 DtQuadProxy (DtQuadRenderer &renderer, unsigned char effect)
 
bool hasAltitudeSpecificPoints () const
 
void updatePointsBasedOnAltitude (double cameraAltitude)
 
bool updateLodVisibility (DtPrimitiveStyle *style, double cameraAltitude)
 

Static Protected Member Functions

static void getBoundsFromPoints (float bounds[4], const float points[8])
 

Protected Attributes

DtQuadRenderermyParent
 
unsigned int myIndex
 
unsigned char myStyle
 
DtMinimumAltitudeToPointsVector myAltitudeToPointsMap
 
bool myIsForcedPointsByMinimumAltitudeEnabled
 
double myAltitudeToUseForForcedPoints
 
double myLodOutAltitude
 
bool myIsLodOutAltitudeEnabled
 

Friends

class DtQuadRenderer
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtQuadProxy::~DtQuadProxy ( )
makVrv::DtQuadProxy::DtQuadProxy ( DtQuadRenderer renderer,
unsigned char  effect 
)
protected

Protected CTOR (DtQuadRenderer manages creation)

Member Function Documentation

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

Set the order.

float makVrv::DtQuadProxy::group ( ) const

Get the group.

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

Set the position at the given index of the quad (points 0 - 3)

void makVrv::DtQuadProxy::set3DPosition ( float  x,
float  y,
float  z,
float  w = 0 
)

Sets the same position at all points in the quad.

void makVrv::DtQuadProxy::get3DPosition ( float &  x,
float &  y,
float &  z,
float &  w 
) const

Get the position.

void makVrv::DtQuadProxy::set2DRotation ( float  angle)

Set the rotation.

void makVrv::DtQuadProxy::get2DRotation ( float &  angle) const

Get the rotation.

void makVrv::DtQuadProxy::setPoints ( const float  points[8])

Set the 2d vertices.

void makVrv::DtQuadProxy::getPoints ( float  points[8]) const

Get the 2d vertices.

void makVrv::DtQuadProxy::setPointsByMinimumAltitude ( const float  points[8],
double  altitude 
)

Set the 2d vertices, based on the current altitude of the observer rendering the quad.

void makVrv::DtQuadProxy::setIsForcedPointsByAltitudeEnabled ( bool  isEnabled)

Set whether or not a particular set of points are used, regardless of altitude. This only matters if altitude-specific sets of points are used. The sets of points used are provided by the altitude-specific configuration corresponding to the altitude provided using: setAltitudeForForcedPoints(...) Default is false.

void makVrv::DtQuadProxy::setAltitudeForForcedPoints ( double  minimumAltitudeForUse)

Set the altitude, in meters, to use when determining the forced set of points. This is only used if setIsForcedPointsByAltitudeEnabled(true). Default is std::numeric_limits<double>::min().

void makVrv::DtQuadProxy::clearAltitudeSpecificConfigurations ( )

Clear all altitude-specific configurations.

void makVrv::DtQuadProxy::setBounds ( const float  bounds[4])

Set the 2d vertices by size.

void makVrv::DtQuadProxy::getBounds ( float  bounds[4]) const

Get the size.

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

Set the style.

int makVrv::DtQuadProxy::style ( ) const

Get the current style.

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

Set the color.

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

Get the color.

void makVrv::DtQuadProxy::setStippleParameters ( unsigned int  fill,
unsigned int  fullStipplePattern[32] = 0 
)

Set the fill parameters.

void makVrv::DtQuadProxy::setTextureParameters ( void *  textureHangle,
float  left = 0.0f,
float  right = 1.0f,
float  bottom = 0.0f,
float  top = 1.0f 
)

Set the texture parameter.

void* makVrv::DtQuadProxy::textureHandle ( ) const

Get the texture handle.

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

Get the internal index of this proxy.

void makVrv::DtQuadProxy::setIndex ( unsigned int  index)

Get the internal index of this proxy.

void makVrv::DtQuadProxy::setLodOutAltitude ( double  lodOutAltitude)

Set the minimum altitude, in meters, at which this quad will no longer render. Only used if setIsLodOutAltitudeEnabled(true). Default is the maximum value a double can hold.

double makVrv::DtQuadProxy::lodOutAltitude ( ) const

Get the minimum altitude, in meters, at which this quad will no longer render.

void makVrv::DtQuadProxy::setIsLodOutAltitudeEnabled ( bool  isLodOutAltitudeEnabled)

Set whether or not to use the LOD Out Altitude property. Default is true.

bool makVrv::DtQuadProxy::isLodOutAltitudeEnabled ( ) const

Get whether or not to use the LOD Out Altitude property.

static void makVrv::DtQuadProxy::getBoundsFromPoints ( float  bounds[4],
const float  points[8] 
)
staticprotected

Get the bounding values for a quad's points.

Parameters
boundsbounding values in order min_x, min_y, max_x, max_y
points2d points in order [x0,y0,x1,y1,...]
bool makVrv::DtQuadProxy::hasAltitudeSpecificPoints ( ) const
protected

Return whether or not the proxy has altitude-specific points configured.

void makVrv::DtQuadProxy::updatePointsBasedOnAltitude ( double  cameraAltitude)
protected

Update the proxy bounds based on the provided altitude, in meters.

bool makVrv::DtQuadProxy::updateLodVisibility ( DtPrimitiveStyle style,
double  cameraAltitude 
)
protected

Updates the visibility state of the quad based on the camera altitude and the lod parameters. Returns true if the visibility state changed.

Parameters
style- the style to set the visibility state in
cameraAltitude- the current camera altitude

Friends And Related Function Documentation

friend class DtQuadRenderer
friend

Member Data Documentation

DtQuadRenderer* makVrv::DtQuadProxy::myParent
protected
unsigned int makVrv::DtQuadProxy::myIndex
protected
unsigned char makVrv::DtQuadProxy::myStyle
protected
DtMinimumAltitudeToPointsVector makVrv::DtQuadProxy::myAltitudeToPointsMap
protected
bool makVrv::DtQuadProxy::myIsForcedPointsByMinimumAltitudeEnabled
protected
double makVrv::DtQuadProxy::myAltitudeToUseForForcedPoints
protected
double makVrv::DtQuadProxy::myLodOutAltitude
protected
bool makVrv::DtQuadProxy::myIsLodOutAltitudeEnabled
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)