Privacy
An open-source, flexible 3D physical simulation framework
mars::graphics::HUDLabel Class Reference

#include <HUDLabel.h>

Public Member Functions

 HUDLabel (osg::ref_ptr< osg::Group > group)
 
 HUDLabel (void)
 
 ~HUDLabel (void)
 
void setFontSize (double _font_size)
 
void setPos (double x, double y)
 
void setBackgroundColor (double r, double g, double b, double a)
 
void setBorderColor (double r, double g, double b, double a)
 
void setBorderWidth (double border_width)
 
void setPadding (double left, double top, double right, double bottom)
 
void setDirection (int _direction)
 
void setText (std::string text, double color[4])
 
osg::Group * getNode (void)
 
void switchCullMask (void)
 
void xorCullMask (unsigned int mask)
 
- Public Member Functions inherited from mars::graphics::HUDElement
 HUDElement (void)
 
virtual ~HUDElement (void)
 
virtual void setID (unsigned long id)
 
virtual unsigned long getID (void)
 
virtual void setConfigPath (std::string path)
 

Private Member Functions

osg::ref_ptr< osg::Geode > createLabel (std::string label, double color[4])
 

Private Attributes

osg::ref_ptr< osg::Group > parent
 
osg::ref_ptr< osg::MatrixTransform > scaleTransform
 
osg::ref_ptr< osgText::Text > labelText
 
double posx
 
double posy
 
double background_color [4]
 
double border_color [4]
 
double border_width
 
double font_size
 
double pl
 
double pt
 
double pr
 
double pb
 
int direction
 
bool label_created
 
unsigned int cull_mask
 
bool visible
 

Additional Inherited Members

- Static Public Attributes inherited from mars::graphics::HUDElement
static int elemCount = 1
 
- Protected Attributes inherited from mars::graphics::HUDElement
std::string config_path
 

Detailed Description

Definition at line 39 of file HUDLabel.h.

Constructor & Destructor Documentation

◆ HUDLabel() [1/2]

mars::graphics::HUDLabel::HUDLabel ( osg::ref_ptr< osg::Group >  group)

Definition at line 62 of file HUDLabel.cpp.

◆ HUDLabel() [2/2]

mars::graphics::HUDLabel::HUDLabel ( void  )

Definition at line 75 of file HUDLabel.cpp.

◆ ~HUDLabel()

mars::graphics::HUDLabel::~HUDLabel ( void  )

Definition at line 87 of file HUDLabel.cpp.

Member Function Documentation

◆ createLabel()

osg::ref_ptr< osg::Geode > mars::graphics::HUDLabel::createLabel ( std::string  label,
double  color[4] 
)
private

Definition at line 239 of file HUDLabel.cpp.

◆ getNode()

osg::Group * mars::graphics::HUDLabel::getNode ( void  )
virtual

Implements mars::graphics::HUDElement.

Definition at line 279 of file HUDLabel.cpp.

◆ setBackgroundColor()

void mars::graphics::HUDLabel::setBackgroundColor ( double  r,
double  g,
double  b,
double  a 
)

Definition at line 99 of file HUDLabel.cpp.

◆ setBorderColor()

void mars::graphics::HUDLabel::setBorderColor ( double  r,
double  g,
double  b,
double  a 
)

Definition at line 106 of file HUDLabel.cpp.

◆ setBorderWidth()

void mars::graphics::HUDLabel::setBorderWidth ( double  border_width)

Definition at line 113 of file HUDLabel.cpp.

◆ setDirection()

void mars::graphics::HUDLabel::setDirection ( int  _direction)

Definition at line 286 of file HUDLabel.cpp.

◆ setFontSize()

void mars::graphics::HUDLabel::setFontSize ( double  _font_size)

Definition at line 90 of file HUDLabel.cpp.

◆ setPadding()

void mars::graphics::HUDLabel::setPadding ( double  left,
double  top,
double  right,
double  bottom 
)

Definition at line 117 of file HUDLabel.cpp.

◆ setPos()

void mars::graphics::HUDLabel::setPos ( double  x,
double  y 
)
virtual

Implements mars::graphics::HUDElement.

Definition at line 94 of file HUDLabel.cpp.

◆ setText()

void mars::graphics::HUDLabel::setText ( std::string  text,
double  color[4] 
)

Definition at line 125 of file HUDLabel.cpp.

◆ switchCullMask()

void mars::graphics::HUDLabel::switchCullMask ( void  )
virtual

Implements mars::graphics::HUDElement.

Definition at line 290 of file HUDLabel.cpp.

◆ xorCullMask()

void mars::graphics::HUDLabel::xorCullMask ( unsigned int  mask)
virtual

Implements mars::graphics::HUDElement.

Definition at line 301 of file HUDLabel.cpp.

Member Data Documentation

◆ background_color

double mars::graphics::HUDLabel::background_color[4]
private

Definition at line 64 of file HUDLabel.h.

◆ border_color

double mars::graphics::HUDLabel::border_color[4]
private

Definition at line 64 of file HUDLabel.h.

◆ border_width

double mars::graphics::HUDLabel::border_width
private

Definition at line 65 of file HUDLabel.h.

◆ cull_mask

unsigned int mars::graphics::HUDLabel::cull_mask
private

Definition at line 70 of file HUDLabel.h.

◆ direction

int mars::graphics::HUDLabel::direction
private

Definition at line 68 of file HUDLabel.h.

◆ font_size

double mars::graphics::HUDLabel::font_size
private

Definition at line 66 of file HUDLabel.h.

◆ label_created

bool mars::graphics::HUDLabel::label_created
private

Definition at line 69 of file HUDLabel.h.

◆ labelText

osg::ref_ptr<osgText::Text> mars::graphics::HUDLabel::labelText
private

Definition at line 61 of file HUDLabel.h.

◆ parent

osg::ref_ptr<osg::Group> mars::graphics::HUDLabel::parent
private

Definition at line 59 of file HUDLabel.h.

◆ pb

double mars::graphics::HUDLabel::pb
private

Definition at line 67 of file HUDLabel.h.

◆ pl

double mars::graphics::HUDLabel::pl
private

Definition at line 67 of file HUDLabel.h.

◆ posx

double mars::graphics::HUDLabel::posx
private

Definition at line 63 of file HUDLabel.h.

◆ posy

double mars::graphics::HUDLabel::posy
private

Definition at line 63 of file HUDLabel.h.

◆ pr

double mars::graphics::HUDLabel::pr
private

Definition at line 67 of file HUDLabel.h.

◆ pt

double mars::graphics::HUDLabel::pt
private

Definition at line 67 of file HUDLabel.h.

◆ scaleTransform

osg::ref_ptr<osg::MatrixTransform> mars::graphics::HUDLabel::scaleTransform
private

Definition at line 60 of file HUDLabel.h.

◆ visible

bool mars::graphics::HUDLabel::visible
private

Definition at line 71 of file HUDLabel.h.


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