orxonox::HUDNavigation Class Reference

#include <src/orxonox/overlays/hud/HUDNavigation.h>

Inheritance diagram for orxonox::HUDNavigation:

orxonox::OrxonoxOverlay orxonox::Tickable orxonox::BaseObject orxonox::WindowEventListener orxonox::OrxonoxClass orxonox::OrxonoxClass orxonox::OrxonoxClass

List of all members.

Public Member Functions

 HUDNavigation (BaseObject *creator)
virtual void tick (float dt)
 Gets called every frame.
virtual void XMLPort (Element &xmlElement, XMLPort::Mode mode)
 Loads the OrxonoxOverlay.
virtual ~HUDNavigation ()

Private Member Functions

void angleChanged ()
 Called whenever the rotation angle has changed.
float getAimMarkerSize () const
float getDist2Focus () const
const std::stringgetFont () const
float getNavMarkerSize () const
float getTextSize () const
void positionChanged ()
 Determines the position of the overlay. This works also well when a rotation angle is applied. The overlay always gets aligned correctly as well as possible.
void setAimMarkerSize (float size)
void setFont (const std::string &font)
void setNavMarkerSize (float size)
void setTextSize (float size)
void sizeChanged ()
 Overridden method of OrxonoxOverlay. Usually the entire overlay scales with scale(). Here we obviously have to adjust this.
void updateFocus ()
void updateMarker ()

Private Attributes

Ogre::PanelOverlayElement * aimMarker_
 Panel used to show the aim Marker.
float aimMarkerSize_
 One paramter size of the aim marker.
Ogre::PanelOverlayElement * navMarker_
 the panel used to show the arrow and the target marker
float navMarkerSize_
 One paramter size of the navigation marker.
Ogre::TextAreaOverlayElement * navText_
 Text overlay to display the target distance.
bool wasOutOfView_
 Performance booster variable: setMaterial is not cheap.


Constructor & Destructor Documentation

orxonox::HUDNavigation::HUDNavigation ( BaseObject creator  ) 

orxonox::HUDNavigation::~HUDNavigation (  )  [virtual]


Member Function Documentation

void orxonox::HUDNavigation::angleChanged (  )  [inline, private, virtual]

Called whenever the rotation angle has changed.

Reimplemented from orxonox::OrxonoxOverlay.

float orxonox::HUDNavigation::getAimMarkerSize (  )  const [inline, private]

Referenced by XMLPort().

float orxonox::HUDNavigation::getDist2Focus (  )  const [private]

Referenced by tick().

const std::string & orxonox::HUDNavigation::getFont (  )  const [private]

References orxonox::BLANKSTRING, and navText_.

Referenced by XMLPort().

float orxonox::HUDNavigation::getNavMarkerSize (  )  const [inline, private]

Referenced by XMLPort().

float orxonox::HUDNavigation::getTextSize (  )  const [private]

References navText_.

Referenced by XMLPort().

void orxonox::HUDNavigation::positionChanged (  )  [inline, private, virtual]

Determines the position of the overlay. This works also well when a rotation angle is applied. The overlay always gets aligned correctly as well as possible.

Reimplemented from orxonox::OrxonoxOverlay.

void orxonox::HUDNavigation::setAimMarkerSize ( float  size  )  [inline, private]

Referenced by HUDNavigation(), and XMLPort().

void orxonox::HUDNavigation::setFont ( const std::string font  )  [private]

References navText_.

Referenced by HUDNavigation(), and XMLPort().

void orxonox::HUDNavigation::setNavMarkerSize ( float  size  )  [inline, private]

Referenced by HUDNavigation(), and XMLPort().

void orxonox::HUDNavigation::setTextSize ( float  size  )  [private]

References navText_.

Referenced by HUDNavigation(), and XMLPort().

void orxonox::HUDNavigation::sizeChanged (  )  [private, virtual]

Overridden method of OrxonoxOverlay. Usually the entire overlay scales with scale(). Here we obviously have to adjust this.

Reimplemented from orxonox::OrxonoxOverlay.

References aimMarker_, aimMarkerSize_, orxonox::OrxonoxOverlay::getActualSize(), navMarker_, navMarkerSize_, and navText_.

void orxonox::HUDNavigation::tick ( float  dt  )  [virtual]

void orxonox::HUDNavigation::updateFocus (  )  [private]

void orxonox::HUDNavigation::updateMarker (  )  [private]

void orxonox::HUDNavigation::XMLPort ( Element &  xmlElement,
XMLPort::Mode  mode 
) [virtual]

Loads the OrxonoxOverlay.

This has to be called before usage, otherwise strange behaviour is guaranteed! (there should be no segfaults however). XML loading and saving.

Parameters:
xmlelement The XML-element
loading Loading (true) or saving (false)
Returns:
The XML-element

Reimplemented from orxonox::OrxonoxOverlay.

References getAimMarkerSize(), getFont(), getNavMarkerSize(), getTextSize(), setAimMarkerSize(), setFont(), setNavMarkerSize(), setTextSize(), SUPER, and XMLPortParam.


Member Data Documentation

Ogre::PanelOverlayElement* orxonox::HUDNavigation::aimMarker_ [private]

Panel used to show the aim Marker.

Referenced by HUDNavigation(), sizeChanged(), tick(), and ~HUDNavigation().

One paramter size of the aim marker.

Referenced by sizeChanged().

Ogre::PanelOverlayElement* orxonox::HUDNavigation::navMarker_ [private]

the panel used to show the arrow and the target marker

Referenced by HUDNavigation(), sizeChanged(), tick(), and ~HUDNavigation().

One paramter size of the navigation marker.

Referenced by sizeChanged().

Ogre::TextAreaOverlayElement* orxonox::HUDNavigation::navText_ [private]

Text overlay to display the target distance.

Referenced by getFont(), getTextSize(), HUDNavigation(), setFont(), setTextSize(), sizeChanged(), tick(), and ~HUDNavigation().

Performance booster variable: setMaterial is not cheap.

Referenced by HUDNavigation(), and tick().


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

Generated on Tue Jul 28 16:22:35 2009 for Orxonox by  doxygen 1.5.6