VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
makVrv::DtTextProxyInterface Class Referenceabstract

A class for controlling text owned by the TextRenderer.

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

Public Member Functions

 DtTextProxyInterface ()
 
virtual ~DtTextProxyInterface ()
 
virtual DtTextProxyInterfaceclone (DtTextRenderer *parent) const =0
 
virtual void setAlignment (DtFontInterface::TextAlignment alignment)=0
 
virtual
DtFontInterface::TextAlignment 
alignment () const =0
 
virtual void setParent (DtTextRenderer *)=0
 
virtual void setPosition (float x, float y, float z, float w=0)=0
 
virtual const float * position () const =0
 
virtual void setMaximumWorldHeight (double worldHeightInMeters)=0
 
virtual double maximumWorldHeight () const =0
 
virtual void setMaximumWorldWidth (double worldWidthInMeters)=0
 
virtual double maximumWorldWidth () const =0
 
virtual void setIsHiddenWhenExceedingMaximumWorldDimensions (bool)=0
 
virtual bool isHiddenWhenExceedingMaximumWorldDimensions () const =0
 
virtual void setRotation (float angle)=0
 
virtual float rotation () const =0
 
virtual void setColor (float r, float g, float b, float a)=0
 
virtual const float * color () const =0
 
virtual void setString (const DtUnicode &str)=0
 
virtual const DtUnicodestring () const =0
 
virtual void setFont (DtFontInterface *font)=0
 
virtual std::vector< doublefontConfigurationMinimumAltitudes () const =0
 
virtual void setAltitudeSpecificFonts (const DtAltitudeBasedConfigurationCollection &)=0
 
virtual void clearAltitudeSpecificFonts ()=0
 
virtual void setIsForcedAltitudeBasedConfigurationEnabled (bool enabled)=0
 
virtual bool isForcedAltitudeBasedConfigurationEnabled () const =0
 
virtual void setBaseAltitudeToUseForForcedAltitudeBasedConfigurations (double minimumAltitudeForUse)=0
 
virtual DtFontInterfacefont (double altitude=std::numeric_limits< double >::min()) const =0
 
virtual DtBoundingBox calculateBoundingBox (double cameraAltitude=std::numeric_limits< double >::min(), unsigned int pos=0, int len=-1, const DtPen &pen=DtPen()) const =0
 
virtual void setBounds (const DtBoundingBox &box)=0
 
virtual const DtBoundingBoxbounds (double cameraAltitude) const =0
 
virtual void setBoundsByMinimumAltitude (const DtBoundingBox &box, double minimumAltitudeForUse)=0
 
virtual void setGroup (unsigned int group)=0
 
virtual unsigned int group () const =0
 
virtual void setLodOutAltitude (double lodOutAltitude)=0
 
virtual double lodOutAltitude () const =0
 
virtual void setIsLodOutAltitudeEnabled (bool isLodOutAltitudeEnabled)=0
 
virtual bool isLodOutAltitudeEnabled () const =0
 
virtual void setIsRotationInScreenSpace (bool isRotationInScreenSpace)=0
 
virtual bool isRotationInScreenSpace () const =0
 

Constructor & Destructor Documentation

makVrv::DtTextProxyInterface::DtTextProxyInterface ( )

CTOR.

virtual makVrv::DtTextProxyInterface::~DtTextProxyInterface ( )
virtual

DTOR.

Member Function Documentation

virtual DtTextProxyInterface* makVrv::DtTextProxyInterface::clone ( DtTextRenderer parent) const
pure virtual

Clone the given DtTextProxyInterface.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setAlignment ( DtFontInterface::TextAlignment  alignment)
pure virtual

Set the position.

Implemented in makVrv::DtTextProxy.

virtual DtFontInterface::TextAlignment makVrv::DtTextProxyInterface::alignment ( ) const
pure virtual

Returns alignment.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setParent ( DtTextRenderer )
pure virtual

Sets the parent of this proxy.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setPosition ( float  x,
float  y,
float  z,
float  w = 0 
)
pure virtual

Set the position.

Implemented in makVrv::DtTextProxy.

virtual const float* makVrv::DtTextProxyInterface::position ( ) const
pure virtual

Returns position.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setMaximumWorldHeight ( double  worldHeightInMeters)
pure virtual

Set the maximum world-space height for the this proxy, in meters. Once the text proxy exceeds the maximum world-space height, the text 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).

Implemented in makVrv::DtTextProxy.

virtual double makVrv::DtTextProxyInterface::maximumWorldHeight ( ) const
pure virtual

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

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setMaximumWorldWidth ( double  worldWidthInMeters)
pure virtual

Set the maximum world-space width for the this proxy, in meters. Once the text proxy exceeds the maximum world-space width, the text will not be rendered. To disable this mechanism for width 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).

Implemented in makVrv::DtTextProxy.

virtual double makVrv::DtTextProxyInterface::maximumWorldWidth ( ) const
pure virtual

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

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setIsHiddenWhenExceedingMaximumWorldDimensions ( bool  )
pure virtual

Set whether or not to hide this proxy when either of the maximum world-space dimensions is exceeded based on the current altitude of the observer rendering the text proxy. If the text is not hidden when either of the maximum world-space dimensions is exceeded, then the text is always shown regardless of what has been set for the text's world dimensions. By default, this value is true (text will be hidden if world dimensions are exceeded)

Implemented in makVrv::DtTextProxy.

virtual bool makVrv::DtTextProxyInterface::isHiddenWhenExceedingMaximumWorldDimensions ( ) const
pure virtual

Set whether or not to hide this proxy when either of the maximum world-space dimensions is exceeded based on the current altitude of the observer rendering the text proxy. If the text is not hidden when the maximum world-space dimensions is exceeded, then the text is always shown regardless of what has been set for the text's world dimensions.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setRotation ( float  angle)
pure virtual

Sets the rotation, in screen space or in world space.

See Also
setIsRotationInScreenSpace(virtual bool)

Implemented in makVrv::DtTextProxy.

virtual float makVrv::DtTextProxyInterface::rotation ( ) const
pure virtual

Returns rotation, in screen space or in world space.

See Also
isRotationInScreenSpace()

Implemented in makVrv::DtTextProxy.

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

Set the color of the text.

Implemented in makVrv::DtTextProxy.

virtual const float* makVrv::DtTextProxyInterface::color ( ) const
pure virtual

Returns color.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setString ( const DtUnicode str)
pure virtual

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.

Implemented in makVrv::DtTextProxy.

virtual const DtUnicode& makVrv::DtTextProxyInterface::string ( ) const
pure virtual

Gets the text string.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setFont ( DtFontInterface font)
pure virtual

Set the font to render using.

Implemented in makVrv::DtTextProxy.

virtual std::vector<double> makVrv::DtTextProxyInterface::fontConfigurationMinimumAltitudes ( ) const
pure virtual

Get a vector of minimum altitude the text has a font configuration for.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setAltitudeSpecificFonts ( const DtAltitudeBasedConfigurationCollection )
pure virtual

Set the altitude-based fonts this text proxy should use.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::clearAltitudeSpecificFonts ( )
pure virtual

Clear altitude-based fonts, if any were defined. Altitude-specific fonts are defined using setAltitudeSpecificFonts(...).

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setIsForcedAltitudeBasedConfigurationEnabled ( bool  enabled)
pure virtual

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 DtTextProxyInterface::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.

Implemented in makVrv::DtTextProxy.

virtual bool makVrv::DtTextProxyInterface::isForcedAltitudeBasedConfigurationEnabled ( ) const
pure virtual

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.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setBaseAltitudeToUseForForcedAltitudeBasedConfigurations ( double  minimumAltitudeForUse)
pure virtual

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<virtual double>::min().

Implemented in makVrv::DtTextProxy.

virtual DtFontInterface* makVrv::DtTextProxyInterface::font ( double  altitude = std::numeric_limits< double >::min()) const
pure virtual

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

Implemented in makVrv::DtTextProxy.

virtual DtBoundingBox makVrv::DtTextProxyInterface::calculateBoundingBox ( double  cameraAltitude = std::numeric_limits< double >::min(),
unsigned int  pos = 0,
int  len = -1,
const DtPen pen = DtPen() 
) const
pure virtual

Calculates the bounding box, in screen space, for the passed in string and font. By default, this function calculates the bounding box for the entire passed in string but it can also calculate the bounding box for a substring of the passed in string.

Parameters
cameraAltitudeThe camera altitude to use when determining the bounding box.
posThe position, within the passed in string, of the first character for the substring to calculate the bounding box for.
lenThe number of characters, from pos, to consider in the passed in string. If -1, consider all remaining characters in the string.
penSpecifies the spacing and starting position to use when calculating the bounding box.
See Also
DtFont::calculateBoundingBox
DtTextLayoutInterface::calculateBoundingBox

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setBounds ( const DtBoundingBox box)
pure virtual

Set the bounds of the text.

Implemented in makVrv::DtTextProxy.

virtual const DtBoundingBox& makVrv::DtTextProxyInterface::bounds ( double  cameraAltitude) const
pure virtual

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

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setBoundsByMinimumAltitude ( const DtBoundingBox box,
double  minimumAltitudeForUse 
)
pure virtual

Set the bounds of the text based on the current altitude of the observer rendering the text.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setGroup ( unsigned int  group)
pure virtual

Sets the text group.

Implemented in makVrv::DtTextProxy.

virtual unsigned int makVrv::DtTextProxyInterface::group ( ) const
pure virtual

Gets the group of the text.

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setLodOutAltitude ( double  lodOutAltitude)
pure virtual

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 virtual double can hold.

Implemented in makVrv::DtTextProxy.

virtual double makVrv::DtTextProxyInterface::lodOutAltitude ( ) const
pure virtual

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

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setIsLodOutAltitudeEnabled ( bool  isLodOutAltitudeEnabled)
pure virtual

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

Implemented in makVrv::DtTextProxy.

virtual bool makVrv::DtTextProxyInterface::isLodOutAltitudeEnabled ( ) const
pure virtual

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

Implemented in makVrv::DtTextProxy.

virtual void makVrv::DtTextProxyInterface::setIsRotationInScreenSpace ( bool  isRotationInScreenSpace)
pure virtual

Set whether or not the rotation of the text 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.

Implemented in makVrv::DtTextProxy.

virtual bool makVrv::DtTextProxyInterface::isRotationInScreenSpace ( ) const
pure virtual

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

Implemented in makVrv::DtTextProxy.


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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)