VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtWindowObjectHudDriver Class Reference

This driver is responsible for creating the DtWindowObject HUD. This example demonstrates an aircraft Heads Up Display( HUD ), built using DtWindowObject()s. It gets the view orientation information from the observer to update a heading tape, pitch ladder, and horizon line. The heading tape indicates the observers heading from 0 to 360 degrees, and will loop around when constantly moving in a circle. The pitch ladder displays the observer pitch from - 40 to + 40 degrees. One can see the HUD moving by holding down the right mouse button and move the observer view around. To roll the observer view, press 9 on the NUMPAD of the keyboard. To reset the view press 5 on the NUMPAD of the keyboard. When this driver is started it will also iterate through all the displays to find the first display with "Window 1", then it will set this window to 1000 * 1000 pixels. While it is possible to adjust for non-square aspect ratios by scaling a parent surface, this example chooses to work with a square aspect ratio.

Inheritance diagram for makVrv::DtWindowObjectHudDriver:
Inheritance graph
[legend]

Public Member Functions

 DtWindowObjectHudDriver (DtAgentManager &agentManager, const std::string &instanceName)
 
virtual ~DtWindowObjectHudDriver ()
 
virtual const std::string & className () const
 
- Public Member Functions inherited from makVrv::DtDriver
 DtDriver (DtAgentManager &agentManager, const std::string &instanceName)
 
virtual ~DtDriver ()
 
virtual void realizeConfiguration (const DtConfiguration &configuration)
 
virtual DtConfiguration createConfiguration () const
 
DtAgentManageragentManager ()
 
virtual DtAgentManagerInterfacesceneInterface ()
 
bool started () const
 
virtual const std::string & instanceName () const
 
virtual bool autoStart () const
 
virtual void setAutoStart (bool autoStart)
 
virtual bool isWindowDependent () const
 
virtual void setIsWindowDependent (bool dep)
 
virtual void setIsUserControllable (bool)
 
virtual bool isUserControllable () const
 
virtual void setIsPersistent (bool per)
 
virtual bool isPersistent () const
 
virtual bool isOnDriverSelectionList () const
 
virtual void setOnDriverSelectionList (bool)
 
bool objectFromAgentManager (const DtUniqueID &id) const
 

Protected Member Functions

virtual bool onStart ()
 
virtual bool onStop ()
 
virtual bool onTick ()
 
- Protected Member Functions inherited from makVrv::DtDriver
void applyChangesAndDelete (DtElementChanges *changes)
 
void reportElementCreated (DtElementID id, DtElementID parentId, DtElementEntry::ElementType type)
 
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 
void reportElementDestroyed (DtElementID id)
 
void start ()
 
void stop ()
 
bool tick ()
 
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 
virtual void setInstanceName (const std::string &name)
 
virtual void installAccessories ()
 
virtual void uninstallAccessories ()
 

Protected Attributes

DtWindowEllipseAgent * myCenterDot
 
DtPitchLaddermyPitchLadder
 
DtHeadingTapemyHeadingTape
 
- Protected Attributes inherited from makVrv::DtDriver
DtAgentManagermyAgentManager
 
bool myStartedFlag
 
std::string myName
 
DtConfiguration myConfiguration
 
bool myPersistentFlag
 
bool myUserControllableFlag
 
bool myRequestStateDiffPendingFlag
 
DtElementChanges myChanges
 

Constructor & Destructor Documentation

makVrv::DtWindowObjectHudDriver::DtWindowObjectHudDriver ( DtAgentManager agentManager,
const std::string &  instanceName 
)

CTOR.

virtual makVrv::DtWindowObjectHudDriver::~DtWindowObjectHudDriver ( )
virtual

Virtual DTOR.

Member Function Documentation

virtual const std::string& makVrv::DtWindowObjectHudDriver::className ( ) const
virtual

Get the class name as a string.

Implements makVrv::DtDriver.

virtual bool makVrv::DtWindowObjectHudDriver::onStart ( )
protectedvirtual

Called when the driver is started by the display engine Restores state that existed the last time the driver was stopped Sets the size of the current window to 1000x1000 pixels. Resets the observer view to face the horizon. Initialise the HUD.

Implements makVrv::DtDriver.

virtual bool makVrv::DtWindowObjectHudDriver::onStop ( )
protectedvirtual

Called when the driver is stopped by the display engine.

Implements makVrv::DtDriver.

virtual bool makVrv::DtWindowObjectHudDriver::onTick ( )
protectedvirtual

This updates the on screen objects with new observer information Including the horizon line, pitch ladder, and heading tape.

Implements makVrv::DtDriver.

Member Data Documentation

DtWindowEllipseAgent* makVrv::DtWindowObjectHudDriver::myCenterDot
protected

Center dot or cross hair located at (0.5,0.5) screen space.

DtPitchLadder* makVrv::DtWindowObjectHudDriver::myPitchLadder
protected
DtHeadingTape* makVrv::DtWindowObjectHudDriver::myHeadingTape
protected

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

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)