![]() |
VR-Forces 5.0.2 Developer's Guide
|
The osg implementation of a label.

Public Member Functions | |
| DtOsgWidgetLabel (DtDe &de, DtUniqueID id) | |
| virtual | ~DtOsgWidgetLabel () |
| DtOsgWidgetLabel ()=delete | |
| DtOsgWidgetLabel (const DtOsgWidgetLabel &other)=delete | |
| DtOsgWidgetLabel & | operator= (const DtOsgWidgetLabel &other)=delete |
| virtual void | setOverlay (unsigned int layer) |
| virtual unsigned int | overlay () const |
| virtual void | setOrderGroup (unsigned int group) |
| virtual unsigned int | orderGroup () const |
| virtual void | setPosition (float x, float y, float z, float w=0) |
| virtual void | setText (const DtUnicode &string) |
| virtual void | setFont (const std::string &font, float size) |
| virtual void | setFontScale (float scale) |
| virtual float | fontScale (double minimumAltitudeForUse=std::numeric_limits< double >::min()) const |
| virtual void | setAltitudeBasedConfigurations (const makArchives::DtDynamicScaleConfigurationCollection &configs) |
| virtual void | clearAltitudeBasedConfigurations () |
| virtual void | setIsForcedAltitudeBasedFontScaleEnabled (bool isEnabled) |
| virtual void | setBaseAltitudeToUseForForcedFontScale (double minimumAltitudeForUse) |
| virtual void | setLodOutAltitude (double lodOutAltitude) |
| virtual void | setIsLodOutAltitudeEnabled (bool isLodOutAltitudeEnabled) |
| virtual void | setBackgroundImage (const std::string &filename) |
| virtual void | setBackgroundImage (const std::string &filename, float left, float right, float bottom, float top) |
| virtual void | setTextColor (float r, float g, float b, float a) |
| virtual void | setColor (float r, float g, float b, float a) |
| virtual void | setOrigin (float originX, float originY) |
| virtual void | setSize (float w, float h) |
| virtual void | getSize (float &width, float &height) |
| virtual void | setPadding (float paddingX, float paddingY) |
| virtual void | setModelDefinition (const std::string &str) |
| virtual void | setTextAlignment (DtWidgetLabel::HorizontalAlignment ha) |
| virtual void | setGlyphCenterPolicy (DtWidgetLabel::GlyphCenterPolicy gcp) |
| virtual void | setEventsEnabled (bool enabled) |
| virtual void | setVisible (bool visible) |
| virtual void | setBoundsLength (int len) |
| virtual void | setRotation (float angle) |
| virtual double | getRotation () const |
| virtual void | setSizeConstraints (SizeConstraints) |
Public Member Functions inherited from makVrv::DtWidgetLabel | |
| DtWidgetLabel (DtDe &de, DtUniqueID id) | |
| virtual | ~DtWidgetLabel () |
| DtWidgetLabel ()=delete | |
| DtWidgetLabel (const DtWidgetLabel &other)=delete | |
| DtWidgetLabel & | operator= (const DtWidgetLabel &other)=delete |
Public Member Functions inherited from makVrv::DtWidget | |
| DtWidget (DtDe &de, DtUniqueID id) | |
| virtual | ~DtWidget () |
| virtual void | setParentId (DtUniqueID id) |
| virtual void | setAltitudeSpecificSizes (const DtWidget::DtDynamicSizeConfigurationCollection &configs) |
| virtual void | clearAltitudeSpecificSizes () |
| virtual void | setIsForcedSizeByAltitudeEnabled (bool enabled) |
| virtual void | setAltitudeForForcedSize (double minimumAltitudeForUse) |
| virtual DtUniqueID | id () const |
| virtual DtUniqueID | parentId () const |
Protected Member Functions | |
| virtual void | updateBounds (bool calculateText) |
| virtual void | updateTextBounds (DtBoundingBox box, bool calculateText, double altitude) |
| virtual void | updateFont () |
Protected Attributes | |
| osg::ref_ptr< osg::Texture > | myTexture |
| DtSprite * | mySprite |
| DtTextProxy * | myText |
| DtBoundingBox | myTextBounds |
| unsigned int | myOverlay |
| float | myWidth |
| float | myHeight |
| float | myOriginX |
| float | myOriginY |
| float | myPaddingX |
| float | myPaddingY |
| float | myRotation |
| unsigned int | myGroup |
| std::string | myFontFile |
| makArchives::DtDynamicScaleConfigurationCollection | myFontScaleFromMinimumAltitudeVector |
| int | myFontSize |
| int | myBoundsLength |
| GlyphCenterPolicy | myCenterPolicy |
| SizeConstraints | mySizeConstraints |
Protected Attributes inherited from makVrv::DtWidget | |
| DtDe & | myDe |
| DtUniqueID | myId |
| DtUniqueID | myParentId |
Additional Inherited Members | |
Public Types inherited from makVrv::DtWidgetLabel | |
| enum | HorizontalAlignment { AlignLeft, AlignCenter, AlignRight, AlignJustify } |
| enum | GlyphCenterPolicy { CenterNone, CenterHorizontal, CenterVertical, CenterBoth, AlignToTextHeight } |
| enum | SizeConstraints { ConstrainToText, ConstrainToBounds } |
Public Types inherited from makVrv::DtWidget | |
| typedef std::vector < DtDynamicSizeConfiguration > | DtDynamicSizeConfigurationCollection |
| makVrv::DtOsgWidgetLabel::DtOsgWidgetLabel | ( | DtDe & | de, |
| DtUniqueID | id | ||
| ) |
CTOR.
|
virtual |
Virtual DTOR.
|
delete |
Default Constructor not implemented.
|
delete |
Copy Constructor not implemented - Copy not allowed.
|
delete |
Assignment Operator not implemented - Assignment not allowed.
Sets the z layer of the widget.
Implements makVrv::DtWidget.
Gets the overlay of the widget.
Implements makVrv::DtWidget.
Sets the overlay of the widget.
Implements makVrv::DtWidget.
Gets the overlay of the widget.
Implements makVrv::DtWidget.
|
virtual |
Set the position of the widget in screen space.
Implements makVrv::DtWidget.
|
virtual |
Set the labels string. Labels support multi lines when the string contains new line characters.
Implements makVrv::DtWidgetLabel.
|
virtual |
Sets the font size.
Implements makVrv::DtWidgetLabel.
|
virtual |
Set the font scale for the label. This will multiply the font size times the scale to get an effective font size. Allows for scaling of font without changing font size. Akin to calling setFontScaleByMinimumAltitude(scale).
Implements makVrv::DtWidgetLabel.
|
virtual |
Gets the font scale to use based on the current altitude of the observer rendering the label.
Implements makVrv::DtWidgetLabel.
|
virtual |
Set an altitude-specific (meters) font scale for the label. This will multiply the font size times the scale to get an effective font size. Allows for 1) scaling of font without changing font size and 2) the use of different font scales depending on the altitude of the camera rendering the label.
Implements makVrv::DtWidgetLabel.
|
virtual |
Clear altitude-specific fonts, if any were defined. Altitude-specific fonts are defined using setFontScaleByMinimumAltitude(...).
Implements makVrv::DtWidgetLabel.
|
virtual |
Set whether or not a particular font scale is used, regardless of altitude. This only matters if altitude-specific font scales are used. The font scale used is provided by the altitude-specific configuration corresponding to the altitude provided using: setBaseAltitudeToUseForForcedFontScale(...)
Implements makVrv::DtWidgetLabel.
|
virtual |
Set the altitude, in meters, to use when determining the forced font scale. This is only used if setIsForcedAltitudeBasedFontScaleEnabled(true).
Implements makVrv::DtWidgetLabel.
|
virtual |
Set the altitude, in meters, at which this label will no longer appear. This is only used if setIsLodOutAltitudeEnabled(true).
Implements makVrv::DtWidgetLabel.
|
virtual |
Set whether or not this label widget will use the LOD Out Altitude property. The LOD Out Altitude property is set using setLodOutAltitude(...).
Implements makVrv::DtWidgetLabel.
|
virtual |
Set the background image.
Implements makVrv::DtWidget.
|
virtual |
|
virtual |
Set the text color.
Implements makVrv::DtWidgetLabel.
|
virtual |
Set the color of the widget.
Implements makVrv::DtWidget.
|
virtual |
Sets the origin location, by default it is 0,0. The origin can be used to specify a offset from the position.
Implements makVrv::DtWidget.
|
virtual |
Sets the size of the widget in overlay coordinate space.
Implements makVrv::DtWidgetLabel.
|
virtual |
Returns the size of the widget set by setSize.
Implements makVrv::DtWidgetLabel.
|
virtual |
Sets the size of the widget in overlay coordinate space.
Implements makVrv::DtWidget.
|
virtual |
Set the widget's model definition ("theme")
Implements makVrv::DtWidget.
|
virtual |
Set the text's alignment.
Implements makVrv::DtWidgetLabel.
|
virtual |
Sets the policy for how the glyph is located wrt its origin.
Implements makVrv::DtWidgetLabel.
|
virtual |
Enable or disable event handling for this widget.
Implements makVrv::DtWidget.
|
virtual |
Set the widget visible or hidden.
Implements makVrv::DtWidget.
|
virtual |
Sets the length of the string to check when determining bounds. This is useful when needing text to line up.
Implements makVrv::DtWidgetLabel.
|
virtual |
Sets the rotation applied to the label.
Implements makVrv::DtWidgetLabel.
|
virtual |
Return the current rotation.
Implements makVrv::DtWidgetLabel.
|
virtual |
Sets the constraint of the text box. SizeToText is default. SizeToBounds will bound text to values set in setSize.
Implements makVrv::DtWidgetLabel.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |