VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtOsgWindowTextInstance Class Reference

An OSG Implementation of DtWindowTextInstance. More...

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

Public Member Functions

 DtOsgWindowTextInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtOsgWindowTextInstance ()
 DTOR. More...
 
virtual void setVisible (bool isVisible)
 Set the text visible or invisible. More...
 
virtual void setTopLeftCorner (float x, float y)
 Set the Top left corner of the text in normalized screen coordinates (0..1) More...
 
virtual void setColor (float r, float g, float b, float a)
 Set the text's color. More...
 
virtual void setText (const std::string &textString)
 Set the text to display. More...
 
virtual void setFont (const std::string &fontFile, float sizeInPoints)
 Set the font file and size in points to display the text in. More...
 
virtual void setTextBoxWidth (unsigned int widthInPixels)
 Set the width of the text box in pixels. More...
 
virtual void setAlignment (DtWindowText::TextAlignment alignment)
 Set the alignment mode of the text. More...
 
virtual bool visible () const
 Get the text's visibility status. More...
 
virtual void setTransform (DtMatrix3< double > transform)
 Sets the line's transform matrix, used to update the position and clockwise rotation of the vertices. More...
 
virtual void update ()
 Called on signal_postUpdate; time to update render data. More...
 
virtual void setGroup (int groupId)
 Set this object's group ID for z order. More...
 
virtual void setChannelOverlay (std::string displayName, std::string windowName, std::string channelName)
 By default window objects are placed on the RemoteDisplayWorldOverlay, which is rendered on all channels that have the "showRemoteGraphics" channel keyword. More...
 
void createText ()
 Create the text object. More...
 
- Public Member Functions inherited from makVrv::DtWindowTextInstance
virtual ~DtWindowTextInstance ()
 DTOR. More...
 
- Public Member Functions inherited from makVrv::DtSetVisibilityInterface
virtual ~DtSetVisibilityInterface ()
 

Protected Member Functions

virtual void setClipBox (DtVector2< double > bottomLeftLocation, DtVector2< double > topRightLocation)
 Set this objects clip box bounds This does not clip text yet. More...
 
virtual void slot_releaseResources ()
 Destroy the text when the resources are released since it's fonts won't work anymore. More...
 
virtual void slot_channelToBeDestroyed (DtChannelManager *, DtChannel *)
 Destroy the text when the channel its being rendered on is going to be destroyed. More...
 
virtual void slot_onViewCreated ()
 Recreate the text if needed when a new window is created. More...
 
virtual bool clipTextPosition (osg::Vec2 position)
 Check whether the position of this text box is within the clip box. More...
 

Protected Attributes

DtDemyDe
 
float myColorR
 
float myColorG
 
float myColorB
 
float myColorA
 
std::string myFontFile
 
std::string myTextString
 
std::string myDisplayName
 
std::string myWindowName
 
std::string myChannelName
 
DtFontSP myFont
 
float mySize
 
float myWidth
 
osg::Vec2 myTopLeftPosition
 
osg::Vec2 myClipBoxBottomLeft
 
osg::Vec2 myClipBoxTopRight
 
DtFont::TextAlignement myAlignment
 
DtTextProxymyText
 
bool myIsVisible
 
bool myGeometryDirty
 
bool myUseChannelOverlay
 
osg::Matrix myTransform
 
int myGroup
 

Detailed Description

An OSG Implementation of DtWindowTextInstance.

Uses a vrvGraphics DtTextProxy to implement 2D text.

Constructor & Destructor Documentation

makVrv::DtOsgWindowTextInstance::DtOsgWindowTextInstance ( DtDe de)

CTOR.

virtual makVrv::DtOsgWindowTextInstance::~DtOsgWindowTextInstance ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtOsgWindowTextInstance::setVisible ( bool  isVisible)
virtual

Set the text visible or invisible.

Implements makVrv::DtWindowTextInstance.

virtual void makVrv::DtOsgWindowTextInstance::setTopLeftCorner ( float  x,
float  y 
)
virtual

Set the Top left corner of the text in normalized screen coordinates (0..1)

Implements makVrv::DtWindowTextInstance.

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

Set the text's color.

Implements makVrv::DtWindowTextInstance.

virtual void makVrv::DtOsgWindowTextInstance::setText ( const std::string &  textString)
virtual

Set the text to display.

Implements makVrv::DtWindowTextInstance.

virtual void makVrv::DtOsgWindowTextInstance::setFont ( const std::string &  fontFile,
float  sizeInPoints 
)
virtual

Set the font file and size in points to display the text in.

Implements makVrv::DtWindowTextInstance.

virtual void makVrv::DtOsgWindowTextInstance::setTextBoxWidth ( unsigned int  widthInPixels)
virtual

Set the width of the text box in pixels.

Implements makVrv::DtWindowTextInstance.

virtual void makVrv::DtOsgWindowTextInstance::setAlignment ( DtWindowText::TextAlignment  alignment)
virtual

Set the alignment mode of the text.

Implements makVrv::DtWindowTextInstance.

virtual bool makVrv::DtOsgWindowTextInstance::visible ( ) const
virtual

Get the text's visibility status.

virtual void makVrv::DtOsgWindowTextInstance::setTransform ( DtMatrix3< double transform)
virtual

Sets the line's transform matrix, used to update the position and clockwise rotation of the vertices.

Implements makVrv::DtWindowTextInstance.

virtual void makVrv::DtOsgWindowTextInstance::update ( )
virtual

Called on signal_postUpdate; time to update render data.

Implements makVrv::DtWindowTextInstance.

virtual void makVrv::DtOsgWindowTextInstance::setGroup ( int  groupId)
virtual

Set this object's group ID for z order.

The higher the Z order the "closer" the element will be drawn to the eye point

Implements makVrv::DtWindowTextInstance.

virtual void makVrv::DtOsgWindowTextInstance::setChannelOverlay ( std::string  displayName,
std::string  windowName,
std::string  channelName 
)
virtual

By default window objects are placed on the RemoteDisplayWorldOverlay, which is rendered on all channels that have the "showRemoteGraphics" channel keyword.

If a user wishes to draw a specific window object on a specific channel, use this method. This does not work for remote displays.

Implements makVrv::DtWindowTextInstance.

void makVrv::DtOsgWindowTextInstance::createText ( )

Create the text object.

virtual void makVrv::DtOsgWindowTextInstance::setClipBox ( DtVector2< double bottomLeftLocation,
DtVector2< double topRightLocation 
)
protectedvirtual

Set this objects clip box bounds This does not clip text yet.

Implements makVrv::DtWindowTextInstance.

virtual void makVrv::DtOsgWindowTextInstance::slot_releaseResources ( )
protectedvirtual

Destroy the text when the resources are released since it's fonts won't work anymore.

virtual void makVrv::DtOsgWindowTextInstance::slot_channelToBeDestroyed ( DtChannelManager ,
DtChannel  
)
protectedvirtual

Destroy the text when the channel its being rendered on is going to be destroyed.

virtual void makVrv::DtOsgWindowTextInstance::slot_onViewCreated ( )
protectedvirtual

Recreate the text if needed when a new window is created.

virtual bool makVrv::DtOsgWindowTextInstance::clipTextPosition ( osg::Vec2  position)
protectedvirtual

Check whether the position of this text box is within the clip box.

Checks against top left position.

Member Data Documentation

DtDe& makVrv::DtOsgWindowTextInstance::myDe
protected
float makVrv::DtOsgWindowTextInstance::myColorR
protected
float makVrv::DtOsgWindowTextInstance::myColorG
protected
float makVrv::DtOsgWindowTextInstance::myColorB
protected
float makVrv::DtOsgWindowTextInstance::myColorA
protected
std::string makVrv::DtOsgWindowTextInstance::myFontFile
protected
std::string makVrv::DtOsgWindowTextInstance::myTextString
protected
std::string makVrv::DtOsgWindowTextInstance::myDisplayName
protected
std::string makVrv::DtOsgWindowTextInstance::myWindowName
protected
std::string makVrv::DtOsgWindowTextInstance::myChannelName
protected
DtFontSP makVrv::DtOsgWindowTextInstance::myFont
protected
float makVrv::DtOsgWindowTextInstance::mySize
protected
float makVrv::DtOsgWindowTextInstance::myWidth
protected
osg::Vec2 makVrv::DtOsgWindowTextInstance::myTopLeftPosition
protected
osg::Vec2 makVrv::DtOsgWindowTextInstance::myClipBoxBottomLeft
protected
osg::Vec2 makVrv::DtOsgWindowTextInstance::myClipBoxTopRight
protected
DtFont::TextAlignement makVrv::DtOsgWindowTextInstance::myAlignment
protected
DtTextProxy* makVrv::DtOsgWindowTextInstance::myText
protected
bool makVrv::DtOsgWindowTextInstance::myIsVisible
protected
bool makVrv::DtOsgWindowTextInstance::myGeometryDirty
protected
bool makVrv::DtOsgWindowTextInstance::myUseChannelOverlay
protected
osg::Matrix makVrv::DtOsgWindowTextInstance::myTransform
protected
int makVrv::DtOsgWindowTextInstance::myGroup
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)