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

#include <HUDTexture.h>

Public Member Functions

 HUDTexture (osg::Group *group)
 
 HUDTexture (void)
 
 ~HUDTexture (void)
 
void setSize (double width, double height)
 
void setTextureSize (double width, double height)
 
void setPos (double x, double y)
 
void setBorderColor (double r, double g, double b, double a)
 
void setBorderWidth (double border_width)
 
void createBox (void)
 
osg::Group * getNode (void)
 
void switchCullMask ()
 
void xorCullMask (unsigned int mask)
 
void setImageData (void *data)
 
void setTexture (osg::Texture2D *texture=0)
 
- 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 Attributes

osg::ref_ptr< osg::Group > parent
 
osg::ref_ptr< osg::MatrixTransform > scaleTransform
 
osg::ref_ptr< osg::PositionAttitudeTransform > posTransform
 
osg::ref_ptr< osg::Image > image
 
osg::ref_ptr< osg::Texture2D > texture
 
osg::ref_ptr< osg::Geode > geode
 
double width
 
double height
 
double t_width
 
double t_height
 
double posx
 
double posy
 
double border_color [4]
 
double border_width
 
unsigned int cull_mask
 
bool visible
 
unsigned int texture_type
 

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 41 of file HUDTexture.h.

Constructor & Destructor Documentation

◆ HUDTexture() [1/2]

mars::graphics::HUDTexture::HUDTexture ( osg::Group *  group)

Definition at line 51 of file HUDTexture.cpp.

◆ HUDTexture() [2/2]

mars::graphics::HUDTexture::HUDTexture ( void  )

Definition at line 70 of file HUDTexture.cpp.

◆ ~HUDTexture()

mars::graphics::HUDTexture::~HUDTexture ( void  )

Definition at line 84 of file HUDTexture.cpp.

Member Function Documentation

◆ createBox()

void mars::graphics::HUDTexture::createBox ( void  )

Definition at line 114 of file HUDTexture.cpp.

◆ getNode()

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

Implements mars::graphics::HUDElement.

Definition at line 220 of file HUDTexture.cpp.

◆ setBorderColor()

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

Definition at line 103 of file HUDTexture.cpp.

◆ setBorderWidth()

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

Definition at line 110 of file HUDTexture.cpp.

◆ setImageData()

void mars::graphics::HUDTexture::setImageData ( void *  data)

Definition at line 240 of file HUDTexture.cpp.

◆ setPos()

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

Implements mars::graphics::HUDElement.

Definition at line 97 of file HUDTexture.cpp.

◆ setSize()

void mars::graphics::HUDTexture::setSize ( double  width,
double  height 
)

Definition at line 87 of file HUDTexture.cpp.

◆ setTexture()

void mars::graphics::HUDTexture::setTexture ( osg::Texture2D *  texture = 0)

Definition at line 251 of file HUDTexture.cpp.

◆ setTextureSize()

void mars::graphics::HUDTexture::setTextureSize ( double  width,
double  height 
)

Definition at line 92 of file HUDTexture.cpp.

◆ switchCullMask()

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

Implements mars::graphics::HUDElement.

Definition at line 224 of file HUDTexture.cpp.

◆ xorCullMask()

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

Implements mars::graphics::HUDElement.

Definition at line 235 of file HUDTexture.cpp.

Member Data Documentation

◆ border_color

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

Definition at line 71 of file HUDTexture.h.

◆ border_width

double mars::graphics::HUDTexture::border_width
private

Definition at line 72 of file HUDTexture.h.

◆ cull_mask

unsigned int mars::graphics::HUDTexture::cull_mask
private

Definition at line 73 of file HUDTexture.h.

◆ geode

osg::ref_ptr<osg::Geode> mars::graphics::HUDTexture::geode
private

Definition at line 67 of file HUDTexture.h.

◆ height

double mars::graphics::HUDTexture::height
private

Definition at line 69 of file HUDTexture.h.

◆ image

osg::ref_ptr<osg::Image> mars::graphics::HUDTexture::image
private

Definition at line 65 of file HUDTexture.h.

◆ parent

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

Definition at line 62 of file HUDTexture.h.

◆ posTransform

osg::ref_ptr<osg::PositionAttitudeTransform> mars::graphics::HUDTexture::posTransform
private

Definition at line 64 of file HUDTexture.h.

◆ posx

double mars::graphics::HUDTexture::posx
private

Definition at line 70 of file HUDTexture.h.

◆ posy

double mars::graphics::HUDTexture::posy
private

Definition at line 70 of file HUDTexture.h.

◆ scaleTransform

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

Definition at line 63 of file HUDTexture.h.

◆ t_height

double mars::graphics::HUDTexture::t_height
private

Definition at line 69 of file HUDTexture.h.

◆ t_width

double mars::graphics::HUDTexture::t_width
private

Definition at line 69 of file HUDTexture.h.

◆ texture

osg::ref_ptr<osg::Texture2D> mars::graphics::HUDTexture::texture
private

Definition at line 66 of file HUDTexture.h.

◆ texture_type

unsigned int mars::graphics::HUDTexture::texture_type
private

Definition at line 75 of file HUDTexture.h.

◆ visible

bool mars::graphics::HUDTexture::visible
private

Definition at line 74 of file HUDTexture.h.

◆ width

double mars::graphics::HUDTexture::width
private

Definition at line 69 of file HUDTexture.h.


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