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

#include <HUD.h>

Public Member Functions

 HUD (unsigned long id)
 
 ~HUD (void)
 
void init (osgViewer::GraphicsWindow *gw)
 
void init (mars::interfaces::sReal width, mars::interfaces::sReal height)
 
osg::ref_ptr< osg::Texture2D > getTexture (void)
 
osg::ref_ptr< osg::Camera > getCamera (void)
 
void getSize (mars::interfaces::sReal &width, mars::interfaces::sReal &height)
 
void setViewSize (double width, double height)
 
void getOffset (mars::utils::Vector &offset)
 
void resize (double width, double height)
 
void setCullMask (unsigned int cull_mask)
 
void addHUDElement (HUDElement *elem)
 
void removeHUDElement (HUDElement *elem)
 
void switchCullElement (int key)
 
void switchElementVis (int num_element)
 
void setViewOffsets (double x1, double y1, double x2, double y2)
 

Private Member Functions

void initialize (osgViewer::GraphicsWindow *gw)
 

Private Attributes

osg::ref_ptr< osg::Camera > hudCamera
 
osg::ref_ptr< osg::Group > hudTerminalList
 
osg::ref_ptr< osg::MatrixTransform > scaleTransform
 
std::vector< HUDElement * > elements
 
mars::interfaces::sReal swidth
 
mars::interfaces::sReal sheight
 
unsigned long id
 
mars::utils::Color myColor
 
mars::utils::Vector myoff
 
unsigned int width
 
unsigned int height
 
double view_width
 
double view_height
 
double x1
 
double x2
 
double y1
 
double y2
 
unsigned int row_index
 
unsigned int cull_mask
 

Detailed Description

Definition at line 48 of file HUD.h.

Constructor & Destructor Documentation

◆ HUD()

mars::graphics::HUD::HUD ( unsigned long  id)

Definition at line 40 of file HUD.cpp.

◆ ~HUD()

mars::graphics::HUD::~HUD ( void  )

Definition at line 51 of file HUD.cpp.

Member Function Documentation

◆ addHUDElement()

void mars::graphics::HUD::addHUDElement ( HUDElement elem)

Definition at line 161 of file HUD.cpp.

◆ getCamera()

osg::ref_ptr< osg::Camera > mars::graphics::HUD::getCamera ( void  )

Definition at line 117 of file HUD.cpp.

◆ getOffset()

void mars::graphics::HUD::getOffset ( mars::utils::Vector offset)

◆ getSize()

void mars::graphics::HUD::getSize ( mars::interfaces::sReal width,
mars::interfaces::sReal height 
)

◆ getTexture()

osg::ref_ptr< osg::Texture2D > mars::graphics::HUD::getTexture ( void  )

Definition at line 113 of file HUD.cpp.

◆ init() [1/2]

void mars::graphics::HUD::init ( osgViewer::GraphicsWindow *  gw)

Definition at line 54 of file HUD.cpp.

◆ init() [2/2]

void mars::graphics::HUD::init ( mars::interfaces::sReal  width,
mars::interfaces::sReal  height 
)

Definition at line 60 of file HUD.cpp.

◆ initialize()

void mars::graphics::HUD::initialize ( osgViewer::GraphicsWindow *  gw)
private

Definition at line 66 of file HUD.cpp.

◆ removeHUDElement()

void mars::graphics::HUD::removeHUDElement ( HUDElement elem)

Definition at line 166 of file HUD.cpp.

◆ resize()

void mars::graphics::HUD::resize ( double  width,
double  height 
)

Definition at line 126 of file HUD.cpp.

◆ setCullMask()

void mars::graphics::HUD::setCullMask ( unsigned int  cull_mask)

Definition at line 156 of file HUD.cpp.

◆ setViewOffsets()

void mars::graphics::HUD::setViewOffsets ( double  x1,
double  y1,
double  x2,
double  y2 
)

Definition at line 146 of file HUD.cpp.

◆ setViewSize()

void mars::graphics::HUD::setViewSize ( double  width,
double  height 
)

Definition at line 121 of file HUD.cpp.

◆ switchCullElement()

void mars::graphics::HUD::switchCullElement ( int  key)

Definition at line 179 of file HUD.cpp.

◆ switchElementVis()

void mars::graphics::HUD::switchElementVis ( int  num_element)

Definition at line 199 of file HUD.cpp.

Member Data Documentation

◆ cull_mask

unsigned int mars::graphics::HUD::cull_mask
private

Definition at line 84 of file HUD.h.

◆ elements

std::vector<HUDElement*> mars::graphics::HUD::elements
private

Definition at line 74 of file HUD.h.

◆ height

unsigned int mars::graphics::HUD::height
private

Definition at line 80 of file HUD.h.

◆ hudCamera

osg::ref_ptr<osg::Camera> mars::graphics::HUD::hudCamera
private

Definition at line 71 of file HUD.h.

◆ hudTerminalList

osg::ref_ptr<osg::Group> mars::graphics::HUD::hudTerminalList
private

Definition at line 72 of file HUD.h.

◆ id

unsigned long mars::graphics::HUD::id
private

Definition at line 77 of file HUD.h.

◆ myColor

mars::utils::Color mars::graphics::HUD::myColor
private

Definition at line 78 of file HUD.h.

◆ myoff

mars::utils::Vector mars::graphics::HUD::myoff
private

Definition at line 79 of file HUD.h.

◆ row_index

unsigned int mars::graphics::HUD::row_index
private

Definition at line 83 of file HUD.h.

◆ scaleTransform

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

Definition at line 73 of file HUD.h.

◆ sheight

mars::interfaces::sReal mars::graphics::HUD::sheight
private

Definition at line 76 of file HUD.h.

◆ swidth

mars::interfaces::sReal mars::graphics::HUD::swidth
private

Definition at line 75 of file HUD.h.

◆ view_height

double mars::graphics::HUD::view_height
private

Definition at line 81 of file HUD.h.

◆ view_width

double mars::graphics::HUD::view_width
private

Definition at line 81 of file HUD.h.

◆ width

unsigned int mars::graphics::HUD::width
private

Definition at line 80 of file HUD.h.

◆ x1

double mars::graphics::HUD::x1
private

Definition at line 82 of file HUD.h.

◆ x2

double mars::graphics::HUD::x2
private

Definition at line 82 of file HUD.h.

◆ y1

double mars::graphics::HUD::y1
private

Definition at line 82 of file HUD.h.

◆ y2

double mars::graphics::HUD::y2
private

Definition at line 82 of file HUD.h.


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