VR-Forces 4.8 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

vrvGraphics implementation of a 2D text 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...
 
- 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 setScale (double x, double y)
 Set the scale of the lines x y components. More...
 
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_onViewCreated ()
 Recreate the text if needed when a new window is created. More...
 
void createText ()
 Create the text object. 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
 
DtFontSP myFont
 
float mySize
 
float myWidth
 
osg::Vec2 myTopLeftPosition
 
osg::Vec2 myClipBoxBottomLeft
 
osg::Vec2 myClipBoxTopRight
 
osg::Vec2 myScale
 
DtFont::TextAlignement myAlignment
 
DtTextProxymyText
 
bool myIsVisible
 
bool myGeometryDirty
 
osg::Matrix myTransform
 

Detailed Description

vrvGraphics implementation of a 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::setScale ( double  x,
double  y 
)
protectedvirtual

Set the scale of the lines x y components.

Implements makVrv::DtWindowTextInstance.

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_onViewCreated ( )
protectedvirtual

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

void makVrv::DtOsgWindowTextInstance::createText ( )
protected

Create the text object.

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
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
osg::Vec2 makVrv::DtOsgWindowTextInstance::myScale
protected
DtFont::TextAlignement makVrv::DtOsgWindowTextInstance::myAlignment
protected
DtTextProxy* makVrv::DtOsgWindowTextInstance::myText
protected
bool makVrv::DtOsgWindowTextInstance::myIsVisible
protected
bool makVrv::DtOsgWindowTextInstance::myGeometryDirty
protected
osg::Matrix makVrv::DtOsgWindowTextInstance::myTransform
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)