![]() |
VR-Forces 5.0.3 Developer's Guide
|
A class for controlling text owned by the TextRenderer.
Classes | |
| class | DtAltitudeBasedBoundingBoxConfiguration |
Public Types | |
| typedef std::vector < DtAltitudeBasedBoundingBoxConfiguration > | DtAltitudeBasedBoundingBoxConfigurationCollection |
Protected Member Functions | |
| void | makeOrChangeTextLayout (const DtUnicode &str) |
| typedef std::vector<DtAltitudeBasedBoundingBoxConfiguration> makVrv::DtTextProxy::DtAltitudeBasedBoundingBoxConfigurationCollection |
A collection of altitude-based bounding boxes for a text proxy.
| makVrv::DtTextProxy::DtTextProxy | ( | DtTextRenderer * | parent | ) |
CTOR.
| makVrv::DtTextProxy::~DtTextProxy | ( | ) |
DTOR.
| DtTextProxy* makVrv::DtTextProxy::clone | ( | DtTextRenderer * | parent | ) | const |
Clone the given DtTextProxy.
| void makVrv::DtTextProxy::setAlignment | ( | DtFont::TextAlignement | alignment | ) |
Set the position.
|
inline |
Returns alignment.
| void makVrv::DtTextProxy::setParent | ( | DtTextRenderer * | ) |
Sets the parent of this proxy.
| void makVrv::DtTextProxy::setPosition | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | w = 0 |
||
| ) |
Set the position.
| const float* makVrv::DtTextProxy::position | ( | ) | const |
Returns positiuon.
| void makVrv::DtTextProxy::setRotation | ( | float | angle | ) |
Set the rotation.
| float makVrv::DtTextProxy::rotation | ( | ) | const |
Returns rotation.
| void makVrv::DtTextProxy::setColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
Set the color of the text.
| const float* makVrv::DtTextProxy::color | ( | ) | const |
Returns color.
| void makVrv::DtTextProxy::setString | ( | const DtUnicode & | str | ) |
Set the text string. If this string is left to right will create a DtGenericTextLayoutRenderer to render the text, else will create a DtHarfbuzzTextRenderer to layout the text.
| const DtUnicode& makVrv::DtTextProxy::string | ( | ) | const |
Gets the text string.
| void makVrv::DtTextProxy::setFont | ( | DtFontSP | font | ) |
Set the font to render using.
| std::vector<double> makVrv::DtTextProxy::fontConfigurationMinimumAltitudes | ( | ) | const |
Get a vector of minimum altitude the text has a font configuration for.
| void makVrv::DtTextProxy::setAltitudeSpecificFonts | ( | const DtTextRenderer::DtAltitudeBasedConfigurationCollection & | ) |
Set the altitude-based fonts this text proxy should use.
| void makVrv::DtTextProxy::clearAltitudeSpecificFonts | ( | ) |
Clear altitude-based fonts, if any were defined. Altitude-specific fonts are defined using setAltitudeSpecificFonts(...).
| void makVrv::DtTextProxy::setIsForcedAltitudeBasedConfigurationEnabled | ( | bool | enabled | ) |
Set whether or not a particular altitude-based configuration is always used for this text proxy. This only matters if altitude-based configurations are specified for this text proxy. The altitude-based configuration used for rendering must meet the following conditions: (1) The configuration's base altitude is less than the altitude provided using the DtTextProxy::setBaseAltitudeToUseForForcedFont API. (2) The configuration's base altitude is larger than all other altitude-based configurations, defined for this text proxy, that also meet condition (1).
Altitude is in meters from mean sea level. Default is false.
| bool makVrv::DtTextProxy::isForcedAltitudeBasedConfigurationEnabled | ( | ) | const |
Get whether or not a particular altitude-based configuration is always used for this text proxy. This only matters if altitude-based configurations are specified for this text proxy.
| void makVrv::DtTextProxy::setBaseAltitudeToUseForForcedAltitudeBasedConfigurations | ( | double | minimumAltitudeForUse | ) |
Set the altitude to always use when determining the altitude-based configurations to use for any given frame. This is only used if setIsForcedFontScaleByAltitudeEnabled(true). Default is std::numeric_limits<double>::min().
Get the font to use for rendering based on the provided base altitude. The result of this API only differs if altitude-based fonts are specified for this text proxy.
The returned font is provided by the altitude-based configuration that meets both of the following conditions: (1) The configuration's base altitude is less than the altitude provided. (2) The configuration's base altitude is larger than all other altitude-based configurations, defined for this text proxy, that also meet condition (1).
| Dt2dPoint makVrv::DtTextProxy::calculateGlyphSize | ( | const DtPen & | pen, |
| const DtUnicode & | string, | ||
| double | minimumCameraAltitude = std::numeric_limits< double >::min(), |
||
| unsigned int | pos = 0, |
||
| int | len = -1 |
||
| ) | const |
Calculate the bounding box for a string.
| DtBoundingBox makVrv::DtTextProxy::calculateBoundingBox | ( | const DtPen & | pen, |
| const DtUnicode & | string, | ||
| double | minimumCameraAltitude = std::numeric_limits< double >::min(), |
||
| unsigned int | pos = 0, |
||
| int | len = -1 |
||
| ) | const |
Calculate the bounding box for a string.
| void makVrv::DtTextProxy::setBounds | ( | const DtBoundingBox & | box | ) |
Set the bounds of the text.
| const DtBoundingBox& makVrv::DtTextProxy::bounds | ( | double | cameraAltitude | ) | const |
Get the bounding box to use for rendering based on the provided base altitude. The result of this API only differs if altitude-based bounds are specified for this text proxy.
The returned bounding box is provided by the altitude-based configuration that meets both of the following conditions: (1) The configuration's base altitude is less than the altitude provided. (2) The configuration's base altitude is larger than all other altitude-based configurations, defined for this text proxy, that also meet condition (1).
| void makVrv::DtTextProxy::setBoundsByMinimumAltitude | ( | const DtBoundingBox & | box, |
| double | minimumAltitudeForUse | ||
| ) |
Set the bounds of the text based on the current altitude of the observer rendering the text.
| void makVrv::DtTextProxy::setLodOutAltitude | ( | double | lodOutAltitude | ) |
Set the minimum altitude, in meters, at which this text will no longer render. Only used if setIsLodOutAltitudeEnabled(true). Default is the maximum value a double can hold.
| double makVrv::DtTextProxy::lodOutAltitude | ( | ) | const |
Get the minimum altitude, in meters, at which this text will no longer render.
| void makVrv::DtTextProxy::setIsLodOutAltitudeEnabled | ( | bool | isLodOutAltitudeEnabled | ) |
Set whether or not to use the LOD Out Altitude property. Default is true.
| bool makVrv::DtTextProxy::isLodOutAltitudeEnabled | ( | ) | const |
Get whether or not to use the LOD Out Altitude property.
| void makVrv::DtTextProxy::renderText | ( | DtTexturedGlyphRenderer * | , |
| DtFontSP | , | ||
| double | |||
| ) |
Renders text using the layout renderer to the given glyph renderer.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |