VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::HudImageItem Class Reference

Detailed Description

HudImageItem extends HudItem with image-specific properties including the image path and size dimensions.

#include <hudItem.h>

Inheritance diagram for makVre::HudImageItem:
[legend]

Public Member Functions

 HudImageItem ()
 
virtual ~HudImageItem () override
 
virtual std::string getImagePath () const
 
virtual void setImagePath (const std::string &path)
 
virtual void getSize (float *w, float *h) const
 
virtual void setSize (float w, float h)
 
virtual float getWidth () const
 
virtual float getHeight () const
 
- Public Member Functions inherited from makVre::HudItem
 HudItem ()
 
virtual ~HudItem ()
 
virtual Type type () const
 
virtual int dirtyKey () const
 
virtual void makeDirty ()
 
virtual void getPosition (float *x, float *y) const
 
virtual void setPosition (float x, float y)
 
virtual AlignHorizontal getHorizontalAlignment () const
 
virtual void setHorizontalAlignment (AlignHorizontal align)
 
virtual AlignVertical getVerticalAlignment () const
 
virtual void setVerticalAlignment (AlignVertical align)
 
virtual float getX () const
 
virtual float getY () const
 
virtual bool getVisible () const
 
virtual void setVisible (bool visible)
 
virtual void getColor (float *r, float *g, float *b, float *a) const
 
virtual void setColor (float r, float g, float b, float a)
 
virtual float getRed () const
 
virtual float getGreen () const
 
virtual float getBlue () const
 
virtual float getAlpha () const
 

Protected Attributes

std::string myImagePath
 
float mySize [2]
 
- Protected Attributes inherited from makVre::HudItem
Type myType
 
int myDirtyKey
 
float myPosition [2]
 
AlignHorizontal myHorizontalAlignment
 
AlignVertical myVerticalAlignment
 
bool myVisible
 
float myColor [4]
 

Additional Inherited Members

- Public Types inherited from makVre::HudItem
enum  Type { ILLEGAL_TYPE_UNDEFINED , TEXT , IMAGE }
 
enum  AlignHorizontal { LEFT , CENTER , RIGHT }
 
enum  AlignVertical { TOP , MIDDLE , BOTTOM }
 

Constructor & Destructor Documentation

◆ HudImageItem()

makVre::HudImageItem::HudImageItem ( )

Constructor for HudImageItem.

Initializes the item as an IMAGE type

◆ ~HudImageItem()

virtual makVre::HudImageItem::~HudImageItem ( )
overridevirtual

Virtual destructor for HudImageItem.

Member Function Documentation

◆ getImagePath()

virtual std::string makVre::HudImageItem::getImagePath ( ) const
virtual

Gets the current image path.

Returns
Path to the image file

◆ setImagePath()

virtual void makVre::HudImageItem::setImagePath ( const std::string & path)
virtual

Sets the image path.

Parameters
pathPath to the image file to display

Updates the dirty key if the image path changes

◆ getSize()

virtual void makVre::HudImageItem::getSize ( float * w,
float * h ) const
virtual

Gets the current image size.

Parameters
wPointer to receive the width
hPointer to receive the height

◆ setSize()

virtual void makVre::HudImageItem::setSize ( float w,
float h )
virtual

Sets the image size.

Parameters
wThe width of the image
hThe height of the image

Updates the dirty key if the size changes

◆ getWidth()

virtual float makVre::HudImageItem::getWidth ( ) const
virtual

Gets the width of the image.

Returns
The current width

◆ getHeight()

virtual float makVre::HudImageItem::getHeight ( ) const
virtual

Gets the height of the image.

Returns
The current height

Member Data Documentation

◆ myImagePath

std::string makVre::HudImageItem::myImagePath
protected

Path to the image file.

◆ mySize

float makVre::HudImageItem::mySize[2]
protected

Size of the image [width, height].


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