![]() |
VR-Forces 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 |
| DtOsgWidgetLabel (const DtOsgWidgetLabel &&other)=delete | |
| DtOsgWidgetLabel & | operator= (const DtOsgWidgetLabel &&other)=delete |
| virtual void | setParentId (DtUniqueID id) override |
| virtual void | setOverlay (unsigned int layer) override |
| virtual unsigned int | overlay () const override |
| virtual void | setOrderGroup (unsigned int group) override |
| virtual unsigned int | orderGroup () const override |
| virtual void | setPosition (float x, float y, float z, float w=0) override |
| virtual void | setText (const DtUnicode &string) override |
| virtual void | setFont (const std::string &font, float size) override |
| virtual void | setFontScale (float scale) override |
| virtual float | fontScale (double minimumAltitudeForUse=std::numeric_limits< double >::min()) const override |
| virtual void | setAltitudeBasedConfigurations (const makArchives::DtAltitudeBasedScaleConfigurationRecordCollection &configs) override |
| virtual void | clearAltitudeBasedConfigurations () override |
| virtual void | setIsForcedAltitudeBasedFontScaleEnabled (bool isEnabled) override |
| virtual void | setBaseAltitudeToUseForForcedFontScale (double minimumAltitudeForUse) override |
| virtual void | setLodOutAltitude (double lodOutAltitude) override |
| virtual void | setIsLodOutAltitudeEnabled (bool isLodOutAltitudeEnabled) override |
| virtual bool | isLodOutAltitudeEnabled () const override |
| virtual void | setBackgroundImage (const std::string &filename) override |
| 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) override |
| virtual void | setColor (float r, float g, float b, float a) override |
| virtual void | setOriginOffset (int xOffset, int yOffset) override |
| virtual void | setSize (float w, float h) override |
| virtual void | getSize (float &width, float &height) override |
| virtual void | setPadding (float paddingX, float paddingY) override |
| virtual void | setModelDefinition (const std::string &str) override |
| virtual void | setTextHorizontalAlignmentPolicy (DtWidgetLabel::TextHorizontalAlignmentPolicy ha) override |
| virtual void | setOriginPlacementPolicy (DtWidgetLabel::OriginPlacementPolicy gcp) override |
| virtual void | setEventsEnabled (bool enabled) override |
| virtual void | setVisible (bool visible) override |
| virtual void | setBoundsLength (int len) override |
| virtual void | setRotation (float angle) override |
| virtual double | getRotation () const override |
| virtual void | setIsRotationInScreenSpace (bool isRotationInScreenSpace) override |
| virtual bool | isRotationInScreenSpace () const override |
| virtual void | setMaximumWorldHeight (double worldHeightInMeters) override |
| virtual double | maximumWorldHeight () const override |
| virtual void | setMaximumWorldWidth (double worldWidthInMeters) override |
| virtual double | maximumWorldWidth () const override |
| virtual void | setTextBoundsPolicy (TextBoundsPolicy) override |
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 |
| DtWidgetLabel (const DtWidgetLabel &&other)=delete | |
| DtWidgetLabel & | operator= (const DtWidgetLabel &&other)=delete |
| virtual void | setTextBoundsPolicy (TextBoundsPolicy)=0 |
Public Member Functions inherited from makVrv::DtWidget | |
| DtWidget (DtDe &de, DtUniqueID id) | |
| virtual | ~DtWidget () |
| DtWidget (const DtWidget &other)=delete | |
| DtWidget & | operator= (const DtWidget &other)=delete |
| DtWidget (const DtWidget &&other)=delete | |
| DtWidget & | operator= (const DtWidget &&other)=delete |
| 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 | updateFont () |
| virtual void | updateEventSignals () override |
Protected Attributes | |
| DtOsgTextureWrapper * | myTexture |
| DtSprite * | mySprite |
| DtTextProxyInterface * | myText |
| unsigned int | myOverlay |
| float | myWidth |
| float | myHeight |
| float | myPaddingX |
| float | myPaddingY |
| float | myRotation |
| unsigned int | myGroup |
| double | myMaximumWorldWidth |
| double | myMaximumWorldHeight |
| bool | myIsRotationInScreenSpace |
| bool | myIsLodOutAltitudeEnabled |
| double | myLodOutAltitude |
| std::string | myFontFile |
| makArchives::DtAltitudeBasedScaleConfigurationRecordCollection | myFontScaleFromMinimumAltitudeVector |
| std::vector< DtBoundingBox > | myTextBoundsCache |
| std::vector< float > | myFontLineHeightCache |
| int | myFontSize |
| int | myBoundsLength |
| OriginPlacementPolicy | myOriginPlacementPolicy |
| TextBoundsPolicy | myTextBoundsPolicy |
| DtUnicode | myString |
| int | myOriginXOffset |
| int | myOriginYOffset |
Protected Attributes inherited from makVrv::DtWidget | |
| DtDe & | myDe |
| DtUniqueID | myId |
| DtUniqueID | myParentId |
| DtSignalConnectionManager | mySignalConnectionManager |
| 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 |
Move Constructor not implemented - Move not allowed.
|
delete |
Assignment Operator not implemented - Assignment not allowed.
|
delete |
Move Assignment Operator not implemented - Move Assignment not allowed.
|
overridevirtual |
Set the parent id.
Reimplemented from makVrv::DtWidget.
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.
|
overridevirtual |
Set the position of the widget in screen space.
Implements makVrv::DtWidget.
|
overridevirtual |
Set the labels string. Labels support multi lines when the string contains new line characters.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Sets the font size.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
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.
|
overridevirtual |
Gets the font scale to use based on the current altitude of the observer rendering the label.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
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.
|
overridevirtual |
Clear altitude-specific fonts, if any were defined. Altitude-specific fonts are defined using setFontScaleByMinimumAltitude(...).
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
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.
|
overridevirtual |
Set the altitude, in meters, to use when determining the forced font scale. This is only used if setIsForcedAltitudeBasedFontScaleEnabled(true).
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Set the altitude, in meters, at which this label will no longer appear. This is only used if setIsLodOutAltitudeEnabled(true).
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
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.
|
overridevirtual |
Get whether or not this label widget will use the LOD Out Altitude property.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Set the background image.
Implements makVrv::DtWidget.
|
virtual |
|
overridevirtual |
Set the text color.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Set the color of the widget.
Implements makVrv::DtWidget.
Set the offset in pixels from the position.
Implements makVrv::DtWidget.
|
overridevirtual |
Sets the size of the widget in overlay coordinate space.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Returns the size of the widget set by setSize.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Sets the size of the widget in overlay coordinate space.
Implements makVrv::DtWidget.
|
overridevirtual |
Set the widget's model definition ("theme")
Implements makVrv::DtWidget.
|
overridevirtual |
Set the text's alignment.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Sets the policy for how the glyph is located with respect to its position.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Enable or disable event handling for this widget.
Implements makVrv::DtWidget.
|
overridevirtual |
Set the widget visible or hidden.
Implements makVrv::DtWidget.
|
overridevirtual |
Sets the length of the string to check when determining bounds. This is useful when needing text to line up.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Sets the rotation, in screen space or in world space, applied to the label.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Return the current rotation, in screen space or in world space.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
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.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Get whether or not the rotation of the text object is in screen space.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Set the maximum world-space width for the this widget, in meters. Once the widget exceeds the maximum world-space height, the widget will not be rendered. To disable this mechanism altogether (for height), set this property to -1.0. By default, this property is set to -1.0 (and as a result this mechanism is unused by default).
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Returns the maximum world-space height for the this widget, in meters.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Set the maximum world-space width for the this proxy, in meters. Once the widget exceeds the maximum world-space width the widget will not be rendered. To disable this mechanism altogether (for width), set this property to -1.0. By default, this property is set to -1.0 (and as a result this mechanism is unused by default).
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Returns the maximum world-space width for the this widget, in meters.
Implements makVrv::DtWidgetLabel.
|
overridevirtual |
Sets the Text Bounds Policy for the label. The default is ConstrainToLine.
|
protectedvirtual |
|
protectedvirtual |
|
overrideprotectedvirtual |
Disconnect all signals on the signal manager, and reconnects if the pickable widget has events enabled.
Implements makVrv::DtWidget.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Pixels.
|
protected |
Pixels.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |