OpenWalnut  1.5.0dev
Public Member Functions | Protected Attributes | List of all members
WGETextureHud::WGETextureHudEntry Class Reference

Class implementing one texture HUD entry representing a texture in the HUD. More...

#include <WGETextureHud.h>

+ Inheritance diagram for WGETextureHud::WGETextureHudEntry:
+ Collaboration diagram for WGETextureHud::WGETextureHudEntry:

Public Member Functions

 WGETextureHudEntry (osg::ref_ptr< osg::Texture2D > texture, std::string name, bool transparency=false)
 Constructor. More...
 
 ~WGETextureHudEntry ()
 Destructor. More...
 
unsigned int getRealWidth () const
 Returns the real width of the contained texture. More...
 
unsigned int getRealHeight () const
 Returns the real height of the contained texture. More...
 
osg::ref_ptr< osg::TexMat > getTextureMatrix () const
 Get the texture matrix state for this entry. More...
 
std::string getName () const
 Returns the name of the entry. More...
 
osg::ref_ptr< osg::Texture2D > getTexture () const
 Gets the texture associated with the entry. More...
 
void setMaxTextWidth (float width)
 Set maximum text width. More...
 

Protected Attributes

osg::ref_ptr< osg::Texture2D > m_texture
 The texture. More...
 
osg::ref_ptr< osg::TexMat > m_texMat
 The texture matrix for this entry. More...
 
osgText::Text * m_label
 The label text. More...
 
std::string m_name
 The name for this HUD entry. More...
 
float m_maxTextWidth
 Mqx text width. More...
 

Detailed Description

Class implementing one texture HUD entry representing a texture in the HUD.

Definition at line 62 of file WGETextureHud.h.

Constructor & Destructor Documentation

◆ WGETextureHudEntry()

WGETextureHud::WGETextureHudEntry::WGETextureHudEntry ( osg::ref_ptr< osg::Texture2D >  texture,
std::string  name,
bool  transparency = false 
)

Constructor.

Parameters
texturethe texture to show in the HUD
namea telling name to support the illustrative function of the HUD
transparencytrue if transparency should be shown

Definition at line 174 of file WGETextureHud.cpp.

References WPathHelper::getAllFonts(), m_label, m_name, and m_texMat.

+ Here is the call graph for this function:

◆ ~WGETextureHudEntry()

WGETextureHud::WGETextureHudEntry::~WGETextureHudEntry ( )

Destructor.

Definition at line 274 of file WGETextureHud.cpp.

Member Function Documentation

◆ getName()

std::string WGETextureHud::WGETextureHudEntry::getName ( ) const

Returns the name of the entry.

Returns
name of the entry.

Definition at line 300 of file WGETextureHud.cpp.

◆ getRealHeight()

unsigned int WGETextureHud::WGETextureHudEntry::getRealHeight ( ) const

Returns the real height of the contained texture.

Returns
the real height.

Definition at line 290 of file WGETextureHud.cpp.

Referenced by WGETextureHud::SafeUpdateCallback::operator()().

+ Here is the caller graph for this function:

◆ getRealWidth()

unsigned int WGETextureHud::WGETextureHudEntry::getRealWidth ( ) const

Returns the real width of the contained texture.

Returns
the real width.

Definition at line 285 of file WGETextureHud.cpp.

Referenced by WGETextureHud::SafeUpdateCallback::operator()().

+ Here is the caller graph for this function:

◆ getTexture()

osg::ref_ptr< osg::Texture2D > WGETextureHud::WGETextureHudEntry::getTexture ( ) const

Gets the texture associated with the entry.

Returns
the texture

Definition at line 315 of file WGETextureHud.cpp.

◆ getTextureMatrix()

osg::ref_ptr< osg::TexMat > WGETextureHud::WGETextureHudEntry::getTextureMatrix ( ) const

Get the texture matrix state for this entry.

Returns
the texture matrix state

Definition at line 295 of file WGETextureHud.cpp.

Referenced by WGETextureHud::SafeUpdateCallback::operator()().

+ Here is the caller graph for this function:

◆ setMaxTextWidth()

void WGETextureHud::WGETextureHudEntry::setMaxTextWidth ( float  width)

Set maximum text width.

This is useful to avoid oversize text. Call only from inside a OSG callback.

Parameters
widththe max width

Definition at line 279 of file WGETextureHud.cpp.

Referenced by WGETextureHud::SafeUpdateCallback::operator()().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_label

osgText::Text* WGETextureHud::WGETextureHudEntry::m_label
protected

The label text.

Definition at line 134 of file WGETextureHud.h.

Referenced by WGETextureHudEntry().

◆ m_maxTextWidth

float WGETextureHud::WGETextureHudEntry::m_maxTextWidth
protected

Mqx text width.

Definition at line 144 of file WGETextureHud.h.

◆ m_name

std::string WGETextureHud::WGETextureHudEntry::m_name
protected

The name for this HUD entry.

Definition at line 139 of file WGETextureHud.h.

Referenced by WGETextureHudEntry().

◆ m_texMat

osg::ref_ptr< osg::TexMat > WGETextureHud::WGETextureHudEntry::m_texMat
protected

The texture matrix for this entry.

Definition at line 129 of file WGETextureHud.h.

Referenced by WGETextureHudEntry().

◆ m_texture

osg::ref_ptr< osg::Texture2D > WGETextureHud::WGETextureHudEntry::m_texture
protected

The texture.

Definition at line 124 of file WGETextureHud.h.


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