VR-Forces 4.8 Class Documentation
 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. More...

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

Public Member Functions

 DtWindowObjectHudDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR. More...
 
virtual ~DtWindowObjectHudDriver ()
 Virtual DTOR. More...
 
virtual const std::string & className () const
 Get the class name as a string. More...
 
- Public Member Functions inherited from makVrv::DtDriver
 DtDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR. More...
 
virtual ~DtDriver ()
 DTOR. More...
 
virtual void realizeConfiguration (const DtConfiguration &configuration)
 Realize the driver using the configuration. More...
 
virtual DtConfiguration createConfiguration () const
 Create a configuration for the driver. More...
 
DtAgentManageragentManager ()
 Get the master scene for this host. More...
 
virtual DtAgentManagerInterfacesceneInterface ()
 Get the scene manager interface for creating agents. More...
 
bool started () const
 Get this driver's active state. More...
 
virtual const std::string & instanceName () const
 Get this driver's instance name. More...
 
virtual bool autoStart () const
 Get whether this driver is set to automatically start if it is persistent. More...
 
virtual void setAutoStart (bool autoStart)
 Set whether this driver automatically starts if it is persistent. More...
 
virtual bool isWindowDependent () const
 Get whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed. More...
 
virtual void setIsWindowDependent (bool dep)
 Set whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed. More...
 
virtual void setIsUserControllable (bool)
 Set whether this driver can be started and stopped by the user. More...
 
virtual bool isUserControllable () const
 Get whether this driver can be started and stopped by the user. More...
 
virtual void setIsPersistent (bool per)
 Set if the driver is persistent and should be saved between runs. More...
 
virtual bool isPersistent () const
 Get if the driver is persistent and should be saved between runs. More...
 
virtual bool isOnDriverSelectionList () const
 Returns whether or not this driver is to be automatically started/stopped from the driver selection list. More...
 
virtual void setOnDriverSelectionList (bool)
 Sets whether or not this item is on the driver selection list. More...
 
bool objectFromAgentManager (const DtUniqueID &id) const
 check to see if the object was created using this driver's agent manager. More...
 

Protected Member Functions

virtual bool onStart ()
 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. More...
 
virtual bool onStop ()
 Called when the driver is stopped by the display engine. More...
 
virtual bool onTick ()
 This updates the on screen objects with new observer information Including the horizon line, pitch ladder, and heading tape. More...
 
- Protected Member Functions inherited from makVrv::DtDriver
void applyChangesAndDelete (DtElementChanges *changes)
 Function for apply changes from a changes object and deleting it. More...
 
void reportElementCreated (DtElementID id, DtElementID parentId, DtElementEntry::ElementType type)
 Report an element created. More...
 
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 Report an element attribute changed. More...
 
void reportElementDestroyed (DtElementID id)
 Report an element destroyed. More...
 
void start ()
 Start the driver. More...
 
void stop ()
 Stop the driver. More...
 
bool tick ()
 Tick the host driver. More...
 
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 Called when a display engine is added. More...
 
virtual void setInstanceName (const std::string &name)
 set the Instance name. More...
 
virtual void installAccessories ()
 Installs accessories on this driver. More...
 
virtual void uninstallAccessories ()
 Removes accessories from this driver. More...
 

Protected Attributes

DtWindowEllipseAgent * myCenterDot
 Center dot or cross hair located at (0.5,0.5) screen space. More...
 
DtPitchLaddermyPitchLadder
 
DtHeadingTapemyHeadingTape
 
- Protected Attributes inherited from makVrv::DtDriver
DtAgentManagermyAgentManager
 
bool myStartedFlag
 
std::string myName
 
DtConfiguration myConfiguration
 
bool myPersistentFlag
 
bool myUserControllableFlag
 
bool myRequestStateDiffPendingFlag
 
DtElementChanges myChanges
 

Detailed Description

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

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 Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)