![]() |
VR-Forces Developer's Guide
|
A class for creating a heading tape on screen using DtWindowObjects. The heading tape displays the heading of the current observer view. When the observer yaw's right or left, the heading tape is translated across displaying the current heading in degrees; there is an arrow pointed at the tape to denote the current heading. Each line represents 5 degrees. Every 10 degrees there is a number displayed using DtWindowTexts. This number ranges from 1 ( denoting 10 degrees) to 36 (denoting 360 degrees). This class creates a DtWindowSurface on screen, at the the location (0.5,0.85), this surface is used to place the DtWindowLines that represent each 5 degree increment in object space of the surface. The surface has an associated clip box that will automatically clip child window objects that go outside of the box. The clip box is made from two 2D coordinates, a minXY and maxXY, these are set to ( 0.4, 0.805 ),( 0.6, 0.95 ) in screen space. The heading tape can be created through the init() method. The tick() method updates the heading tape based upon the current orientation of the observer. The heading tapes are spilt into two root objects so we do not need an endless tape, 0->180 and 180 -> 350 degrees. Imagine we are flying in a circle, or rotating in a hover, when the tape comes back around to 00 we slot the 0->180 tape onto the end of 180->360.
Public Member Functions | |
| DtHeadingTape (DtDe &de, DtObserver &observer) | |
| virtual | ~DtHeadingTape () |
| virtual void | init () |
| virtual void | tick () |
Protected Types | |
| typedef std::vector < DtWindowObjectAgent * > | DtWindowObjects |
Protected Attributes | |
| DtDe & | myDe |
| DtObserver & | myObserver |
| DtWindowObjects | myWindowAgents |
| DtWindowObjectAgent * | myHeadingTapeLowObject |
| DtWindowObjectAgent * | myheadingTapeHighObject |
| DtWindowSurfaceAgent * | mySurface |
|
protected |
typedef vector for holding DtWindowObjectAgents
| makVrv::DtHeadingTape::DtHeadingTape | ( | DtDe & | de, |
| DtObserver & | observer | ||
| ) |
CTOR.
|
virtual |
Virtual DTOR.
|
virtual |
Initialise the heading tape by creating a DtWindowSurface, the lines for each heading increment, DtWindowText's to display the heading number It creates two tapes, a 0-180 tape, and 180-360 tape. DtWindowObjects can be used in a parent child relationship, each line created is offset and atteched to a root object - myHeadingTapeLowObject or myheadingTapeHighObject This allows one root object to be manipulated which in turn effects all the children.
|
virtual |
Update the heading tape.
|
protected |
Current Observer refernece.
|
protected |
Vector of the window agents.
|
protected |
Root object to control the 0-180 heading tape.
|
protected |
Root object to control the 180-360(0) heading tape.
|
protected |
Surface that clips the heading tape.