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 Types | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtTextProxy Class Reference

A class for controlling text owned by the TextRenderer.

Classes

class  DtAltitudeBasedBoundingBoxConfiguration
 

Public Types

typedef std::vector
< DtAltitudeBasedBoundingBoxConfiguration
DtAltitudeBasedBoundingBoxConfigurationCollection
 

Public Member Functions

 DtTextProxy (DtTextRenderer *parent)
 
DtTextProxyclone (DtTextRenderer *parent) const
 
 ~DtTextProxy ()
 
void setAlignment (DtFont::TextAlignement alignment)
 
DtFont::TextAlignement alignment () const
 
void setParent (DtTextRenderer *)
 
void setPosition (float x, float y, float z, float w=0)
 
const float * position () const
 
void setRotation (float angle)
 
float rotation () const
 
void setColor (float r, float g, float b, float a)
 
const float * color () const
 
void setString (const DtUnicode &str)
 
const DtUnicodestring () const
 
void setFont (DtFontSP font)
 
std::vector< doublefontConfigurationMinimumAltitudes () const
 
void setAltitudeSpecificFonts (const DtTextRenderer::DtAltitudeBasedConfigurationCollection &)
 
void clearAltitudeSpecificFonts ()
 
void setIsForcedAltitudeBasedConfigurationEnabled (bool enabled)
 
bool isForcedAltitudeBasedConfigurationEnabled () const
 
void setBaseAltitudeToUseForForcedAltitudeBasedConfigurations (double minimumAltitudeForUse)
 
DtFontSP font (double altitude=std::numeric_limits< double >::min()) const
 
Dt2dPoint calculateGlyphSize (const DtPen &pen, const DtUnicode &string, double minimumCameraAltitude=std::numeric_limits< double >::min(), unsigned int pos=0, int len=-1) const
 
DtBoundingBox calculateBoundingBox (const DtPen &pen, const DtUnicode &string, double minimumCameraAltitude=std::numeric_limits< double >::min(), unsigned int pos=0, int len=-1) const
 
void setBounds (const DtBoundingBox &box)
 
const DtBoundingBoxbounds (double cameraAltitude) const
 
void setBoundsByMinimumAltitude (const DtBoundingBox &box, double minimumAltitudeForUse)
 
void setGroup (unsigned int group)
 
void setLodOutAltitude (double lodOutAltitude)
 
double lodOutAltitude () const
 
void setIsLodOutAltitudeEnabled (bool isLodOutAltitudeEnabled)
 
bool isLodOutAltitudeEnabled () const
 
unsigned int group () const
 
void renderText (DtTexturedGlyphRenderer *, DtFontSP, double)
 

Protected Member Functions

void makeOrChangeTextLayout (const DtUnicode &str)
 

Protected Attributes

DtTextRenderermyParent
 
float myRotation
 
float myPosition [4]
 
float myColor [4]
 
unsigned int myGroup
 
DtFont::TextAlignement myAlignment
 
DtUnicode myString
 
DtAltitudeBasedBoundingBoxConfigurationCollection myAltitudeBasedBounds
 
DtTextLayoutInterfacemyTextLayout
 
bool myIsLodOutAltitudeEnabled
 
double myLodOutAltitude
 
bool myIsForcedAltitudeBasedConfigurationEnabled
 
double myAltitudeToUseForForcedAltitudeBasedConfiguration
 

Member Typedef Documentation

A collection of altitude-based bounding boxes for a text proxy.

Constructor & Destructor Documentation

makVrv::DtTextProxy::DtTextProxy ( DtTextRenderer parent)

CTOR.

makVrv::DtTextProxy::~DtTextProxy ( )

DTOR.

Member Function Documentation

DtTextProxy* makVrv::DtTextProxy::clone ( DtTextRenderer parent) const

Clone the given DtTextProxy.

void makVrv::DtTextProxy::setAlignment ( DtFont::TextAlignement  alignment)

Set the position.

DtFont::TextAlignement makVrv::DtTextProxy::alignment ( ) const
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().

DtFontSP makVrv::DtTextProxy::font ( double  altitude = std::numeric_limits< double >::min()) const

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::setGroup ( unsigned int  group)

Sets the text group.

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.

unsigned int makVrv::DtTextProxy::group ( ) const

Gets the group of the text.

void makVrv::DtTextProxy::renderText ( DtTexturedGlyphRenderer ,
DtFontSP  ,
double   
)

Renders text using the layout renderer to the given glyph renderer.

void makVrv::DtTextProxy::makeOrChangeTextLayout ( const DtUnicode str)
protected

Member Data Documentation

DtTextRenderer* makVrv::DtTextProxy::myParent
protected
float makVrv::DtTextProxy::myRotation
protected
float makVrv::DtTextProxy::myPosition[4]
protected
float makVrv::DtTextProxy::myColor[4]
protected
unsigned int makVrv::DtTextProxy::myGroup
protected
DtFont::TextAlignement makVrv::DtTextProxy::myAlignment
protected
DtUnicode makVrv::DtTextProxy::myString
protected
DtAltitudeBasedBoundingBoxConfigurationCollection makVrv::DtTextProxy::myAltitudeBasedBounds
protected
DtTextLayoutInterface* makVrv::DtTextProxy::myTextLayout
protected
bool makVrv::DtTextProxy::myIsLodOutAltitudeEnabled
protected
double makVrv::DtTextProxy::myLodOutAltitude
protected
bool makVrv::DtTextProxy::myIsForcedAltitudeBasedConfigurationEnabled
protected
double makVrv::DtTextProxy::myAltitudeToUseForForcedAltitudeBasedConfiguration
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)