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

A flyweight class for controlling a single quad owned by the DtQuadRenderer.

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

Classes

class  DtAltitudeSpecificConfiguration
 

Public Member Functions

virtual ~DtQuadProxy ()
 
virtual void set3DPosition (int index, float x, float y, float z, float w)
 
virtual void set3DPosition (float x, float y, float z, float w=0) override
 
virtual void get3DPosition (float &x, float &y, float &z, float &w) const
 
virtual void set2DRotation (float angle)
 
virtual void get2DRotation (float &angle) const
 
virtual void setIsRotationInScreenSpace (bool isRotationInScreenSpace)
 
virtual bool isRotationInScreenSpace () const
 
virtual void setMaximumWorldHeight (double worldHeightInMeters)
 
virtual double maximumWorldHeight () const
 
virtual void setMaximumWorldWidth (double worldWidthInMeters)
 
virtual double maximumWorldWidth () const
 
virtual void setPoints (const float points[8])
 
virtual void getPoints (float points[8]) const
 
virtual void setPointsByMinimumAltitude (const float points[8], double altitude)
 
virtual void setIsForcedPointsByAltitudeEnabled (bool isEnabled)
 
virtual void setAltitudeForForcedPoints (double minimumAltitudeForUse)
 
virtual void clearAltitudeSpecificConfigurations ()
 
virtual void setGroup (float order)
 
virtual float group () const
 
virtual void setColor (float r, float g, float b, float a)
 
virtual void getColor (float &r, float &g, float &b, float &a) const
 
virtual void setBounds (const float bounds[4])
 
virtual void getBounds (float bounds[4]) const
 
virtual void setBounds (const DtBoundingBox &box)
 
virtual void getBounds (DtBoundingBox &box) const
 
virtual void setFillType (FillType style)
 
virtual FillType fillType () const
 
virtual void setFillParameter (unsigned int fullStipplePattern[32]=0)
 
virtual void setTextureParameters (DtTextureInterface *textureHandle, float left=0.0f, float right=1.0f, float bottom=0.0f, float top=1.0f)
 
virtual DtTextureInterfacefindTextureHandle () const override
 
virtual void setLodOutAltitude (double lodOutAltitude)
 
virtual double lodOutAltitude () const
 
virtual void setIsLodOutAltitudeEnabled (bool isLodOutAltitudeEnabled)
 
virtual bool isLodOutAltitudeEnabled () const
 
virtual unsigned int index () const
 
virtual void setIndex (unsigned int index)
 
- Public Member Functions inherited from makVrv::DtQuadProxyInterface
 DtQuadProxyInterface ()
 
virtual ~DtQuadProxyInterface ()
 

Protected Types

typedef std::vector
< DtAltitudeSpecificConfiguration
DtMinimumAltitudeToPointsVector
 

Protected Member Functions

 DtQuadProxy (DtQuadRenderer &renderer, FillType effect)
 
bool hasAltitudeSpecificPoints () const
 
void updateRotationBasedOnCurrentObserverTopographicHeading (double heading)
 
size_t indexOfPointsToUseForAltitude (double cameraAltitude) const
 
void updatePointsBasedOnAltitude (double cameraAltitude)
 
bool updateLodVisibility (DtPrimitiveStyle *style, const DtObserverRenderData &observerRenderData)
 

Static Protected Member Functions

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

Protected Attributes

DtQuadRenderermyParent
 
unsigned int myIndex
 
FillType myStyle
 
DtMinimumAltitudeToPointsVector myAltitudeToPointsMap
 
bool myIsForcedPointsByMinimumAltitudeEnabled
 
double myAltitudeToUseForForcedPoints
 
double myLodOutAltitude
 
bool myIsLodOutAltitudeEnabled
 
bool myIsRotationInScreenSpace
 
float myRotation
 
double myMaximumWorldWidth
 
double myMaximumWorldHeight
 

Friends

class DtQuadRenderer
 

Additional Inherited Members

- Public Types inherited from makVrv::DtQuadProxyInterface
enum  FillType { Fill_Solid = 0, Fill_Stipple, Fill_Texture, Fill_Repeating_Texture }
 

Member Typedef Documentation

Constructor & Destructor Documentation

virtual makVrv::DtQuadProxy::~DtQuadProxy ( )
virtual
makVrv::DtQuadProxy::DtQuadProxy ( DtQuadRenderer renderer,
FillType  effect 
)
protected

Protected CTOR (DtQuadRenderer manages creation)

Member Function Documentation

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

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

Implements makVrv::DtQuadProxyInterface.

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

Sets the same position at all points in the quad.

Implements makVrv::DtQuadProxyInterface.

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

Get the position.

Implements makVrv::DtQuadProxyInterface.

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

Set the rotation.

Implements makVrv::DtQuadProxyInterface.

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

Get the rotation.

Implements makVrv::DtQuadProxyInterface.

virtual void makVrv::DtQuadProxy::setIsRotationInScreenSpace ( bool  isRotationInScreenSpace)
virtual

Set whether or not the rotation of the quad object is in screen space. If rotation is in screen space, a 0 degrees rotation means the top of the user's computer monitor. If rotation is not in screen space, it is in world space with a 0 degrees rotation meaning the direction of True North. Default is true.

Implements makVrv::DtQuadProxyInterface.

virtual bool makVrv::DtQuadProxy::isRotationInScreenSpace ( ) const
virtual

Get whether or not the rotation of the text object is in screen space.

Implements makVrv::DtQuadProxyInterface.

virtual void makVrv::DtQuadProxy::setMaximumWorldHeight ( double  worldHeightInMeters)
virtual

Set the maximum world-space height for the this proxy, in meters. Once the quad proxy exceeds the maximum world-space height, the quad will not be rendered. To disable this mechanism for height altogether, set this property to -1.0. Calling setIsHiddenWhenExceedingMaximumWorldDimensions(false) will cause width to not be used either. By default, this property is set to -1.0 (and as a result this mechanism is unused by default).

Implements makVrv::DtQuadProxyInterface.

virtual double makVrv::DtQuadProxy::maximumWorldHeight ( ) const
virtual

Returns the maximum world-space height for the this proxy, in meters.

Implements makVrv::DtQuadProxyInterface.

virtual void makVrv::DtQuadProxy::setMaximumWorldWidth ( double  worldWidthInMeters)
virtual

Set the maximum world-space width for the this proxy, in meters. Once the quad proxy exceeds the maximum world-space width, the quad proxy will not be rendered. To disable this mechanism for width altogether, set this property to -1.0. Calling setIsHiddenWhenExceedingMaximumWorldDimensions(false) will cause height to not be used either. By default, this property is set to -1.0 (and as a result this mechanism is unused by default).

Implements makVrv::DtQuadProxyInterface.

virtual double makVrv::DtQuadProxy::maximumWorldWidth ( ) const
virtual

Returns the maximum world-space width for the this proxy, in meters.

Implements makVrv::DtQuadProxyInterface.

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

Set the 2d vertices.

Implements makVrv::DtQuadProxyInterface.

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

Get the 2d vertices.

Implements makVrv::DtQuadProxyInterface.

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

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

Implements makVrv::DtQuadProxyInterface.

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

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.

Implements makVrv::DtQuadProxyInterface.

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

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().

Implements makVrv::DtQuadProxyInterface.

virtual void makVrv::DtQuadProxy::clearAltitudeSpecificConfigurations ( )
virtual

Clear all altitude-specific configurations.

Implements makVrv::DtQuadProxyInterface.

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

Set the order.

Implements makVrv::DtQuadProxyInterface.

virtual float makVrv::DtQuadProxy::group ( ) const
virtual

Get the group.

Implements makVrv::DtQuadProxyInterface.

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

Set the color.

Implements makVrv::DtQuadProxyInterface.

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

Get the color.

Implements makVrv::DtQuadProxyInterface.

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

Set the 2d vertices by size.

Implements makVrv::DtQuadProxyInterface.

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

Get the size.

Implements makVrv::DtQuadProxyInterface.

virtual void makVrv::DtQuadProxy::setBounds ( const DtBoundingBox box)
virtual

Set the bounding box to use.

Implements makVrv::DtQuadProxyInterface.

virtual void makVrv::DtQuadProxy::getBounds ( DtBoundingBox box) const
virtual

Get the bounding box.

Implements makVrv::DtQuadProxyInterface.

virtual void makVrv::DtQuadProxy::setFillType ( FillType  style)
virtual

Set the style.

Implements makVrv::DtQuadProxyInterface.

virtual FillType makVrv::DtQuadProxy::fillType ( ) const
virtual

Get the current style.

Implements makVrv::DtQuadProxyInterface.

virtual void makVrv::DtQuadProxy::setFillParameter ( unsigned int  fullStipplePattern[32] = 0)
virtual

Set the fill parameters.

Implements makVrv::DtQuadProxyInterface.

virtual void makVrv::DtQuadProxy::setTextureParameters ( DtTextureInterface textureHandle,
float  left = 0.0f,
float  right = 1.0f,
float  bottom = 0.0f,
float  top = 1.0f 
)
virtual

Set the texture parameter.

Implements makVrv::DtQuadProxyInterface.

virtual DtTextureInterface* makVrv::DtQuadProxy::findTextureHandle ( ) const
overridevirtual

Get the texture handle.

Implements makVrv::DtQuadProxyInterface.

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

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.

Implements makVrv::DtQuadProxyInterface.

virtual double makVrv::DtQuadProxy::lodOutAltitude ( ) const
virtual

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

Implements makVrv::DtQuadProxyInterface.

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

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

Implements makVrv::DtQuadProxyInterface.

virtual bool makVrv::DtQuadProxy::isLodOutAltitudeEnabled ( ) const
virtual

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

Implements makVrv::DtQuadProxyInterface.

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

Get the internal index of this proxy.

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

Get the internal index of this proxy.

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::updateRotationBasedOnCurrentObserverTopographicHeading ( double  heading)
protected

Updates the rotation of the underlying primitive vertices based on the observer's heading and the current rotation for this quad - set via set2DRotation(float).

size_t makVrv::DtQuadProxy::indexOfPointsToUseForAltitude ( double  cameraAltitude) const
protected
void makVrv::DtQuadProxy::updatePointsBasedOnAltitude ( double  cameraAltitude)
protected

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

bool makVrv::DtQuadProxy::updateLodVisibility ( DtPrimitiveStyle style,
const DtObserverRenderData observerRenderData 
)
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
FillType 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
bool makVrv::DtQuadProxy::myIsRotationInScreenSpace
protected
float makVrv::DtQuadProxy::myRotation
protected
double makVrv::DtQuadProxy::myMaximumWorldWidth
protected
double makVrv::DtQuadProxy::myMaximumWorldHeight
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)