![]() |
VR-Forces 5.0.2 Developer's Guide
|
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]) |
Friends | |
| class | DtQuadRenderer |
|
protected |
| makVrv::DtQuadProxy::~DtQuadProxy | ( | ) |
|
protected |
Protected CTOR (DtQuadRenderer manages creation)
| 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.
| 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.
|
staticprotected |
Get the bounding values for a quad's points.
| bounds | bounding values in order min_x, min_y, max_x, max_y |
| points | 2d points in order [x0,y0,x1,y1,...] |
|
protected |
Return whether or not the proxy has altitude-specific points configured.
|
protected |
Update the proxy bounds based on the provided altitude, in meters.
|
protected |
Updates the visibility state of the quad based on the camera altitude and the lod parameters. Returns true if the visibility state changed.
| style | - the style to set the visibility state in |
| cameraAltitude | - the current camera altitude |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |