![]() |
VR-Forces Developer's Guide
|
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.

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 |
| DtPitchLadder * | myPitchLadder |
| DtHeadingTape * | myHeadingTape |
Protected Attributes inherited from makVrv::DtDriver | |
| DtAgentManager & | myAgentManager |
| bool | myStartedFlag |
| std::string | myName |
| DtConfiguration | myConfiguration |
| bool | myPersistentFlag |
| bool | myUserControllableFlag |
| bool | myRequestStateDiffPendingFlag |
| DtElementChanges | myChanges |
| makVrv::DtWindowObjectHudDriver::DtWindowObjectHudDriver | ( | DtAgentManager & | agentManager, |
| const std::string & | instanceName | ||
| ) |
CTOR.
|
virtual |
Virtual DTOR.
|
virtual |
Get the class name as a string.
Implements makVrv::DtDriver.
|
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.
|
protectedvirtual |
Called when the driver is stopped by the display engine.
Implements makVrv::DtDriver.
|
protectedvirtual |
This updates the on screen objects with new observer information Including the horizon line, pitch ladder, and heading tape.
Implements makVrv::DtDriver.
|
protected |
Center dot or cross hair located at (0.5,0.5) screen space.
|
protected |
|
protected |