![]() |
VR-Forces Developer's Guide
|
vrvGraphics-based implementation of a model-like object that draws a 3d view first person shooter style compass on a channel.
The fps style compass is a pseudo 3d view where directions rotate into a popout center. The compass is located at the top center of the display.

Classes | |
| struct | CompassSymbol |
| struct | TickMark |
Public Member Functions | |
| DtOsgChannel3dViewCompassInstance (DtDe &de) | |
| virtual | ~DtOsgChannel3dViewCompassInstance () |
| DtOsgChannel3dViewCompassInstance ()=delete | |
| DtOsgChannel3dViewCompassInstance (const DtOsgChannel3dViewCompassInstance &other)=delete | |
| DtOsgChannel3dViewCompassInstance & | operator= (const DtOsgChannel3dViewCompassInstance &other)=delete |
| virtual void | setVisible (bool isVisible) |
| virtual bool | visible () |
| virtual void | setChannelName (const std::string &deName, const std::string &winName, const std::string &channelName) |
| virtual void | setModelDefinition (const std::string &modelDefinition) |
| virtual void | updateCompass (bool force) |
| virtual void | setDarkTickColor (float r, float g, float b, float a) |
| virtual void | setLightTickColor (float r, float g, float b, float a) |
| virtual void | setSymbolsFilename (const std::string &filename) |
| virtual void | setPixelRatio (float pixelRatio) |
| virtual float | getPixelRatio () |
Public Member Functions inherited from makVrv::DtChannel3dViewCompassInstance | |
| DtChannel3dViewCompassInstance (DtDe &de) | |
| virtual | ~DtChannel3dViewCompassInstance () |
| DtChannel3dViewCompassInstance (const DtChannel3dViewCompassInstance &other)=delete | |
| DtChannel3dViewCompassInstance & | operator= (const DtChannel3dViewCompassInstance &other)=delete |
| virtual void | setCompassHeading (double heading) |
| virtual void | setMargins (int xMargin, int yMargin) |
| virtual void | setSymbolColor (float r, float g, float b, float a) |
| virtual void | setPopoutSymbolColor (float r, float g, float b, float a) |
| virtual void | setWidth (unsigned int width) |
| virtual void | setSymbolSize (unsigned int size) |
| virtual void | setPopoutSymbolSize (unsigned int size) |
Public Member Functions inherited from makVrv::DtSetVisibilityInterface | |
| virtual | ~DtSetVisibilityInterface () |
Protected Types | |
| typedef std::vector< float > | VertexList |
Protected Member Functions | |
| virtual void | slot_channelCreated (DtChannelManager *, DtChannel *) |
| virtual void | slot_channelToBeDestroyed (DtChannelManager *, DtChannel *) |
| virtual void | slot_channelConfigurationModified (const std::string &deName, const std::string &winName, const std::string &oldChannelName, const DtChannelConfiguration &config) |
| virtual void | slot_windowConfigurationModified (const std::string &deName, const std::string &winName, const DtWindowConfiguration &config) |
| virtual void | slot_displayUnitUnitChanged (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName, unsigned int newUnit, unsigned int oldUnit) |
| virtual void | slot_update () |
| virtual void | slot_coordinateSystemChanged () |
| bool | updateCompassCharacter (const std::string &filename, DtQuadProxy *quad, DtOsgTextureWrapper *texture, const osg::Vec4 &texCoords) |
| virtual void | parseModelDefinition (const DtModelDefinition *definition) |
| virtual void | createCompass () |
| void | destroyCompass () |
| osg::Vec2 | calcCompassCenterPosition () |
| DtLineSegment * | createDarkSide (DtOverlayRenderer &overlay) |
| DtLineSegment * | createLightSide (DtOverlayRenderer &overlay) |
| virtual bool | updateOrientationUnits () |
| virtual void | updateCompass () |
| virtual void | computeCenteringOffsets (float *offsets, const int numCharacters, const float characterWidth) |
| virtual void | computeHeadingString (const float radHeading, std::string &outString) |
| virtual void | computeCharacterCoords (const unsigned char value, osg::Vec4 &coords) |
| virtual void | initCompassSymbolCharacterDisplay (CompassSymbol &symbol, const std::string &text, DtOverlayRenderer &overlay) |
| virtual void | initPopoutSymbolCharacterDisplay (CompassSymbol &symbol, DtOverlayRenderer &overlay) |
| virtual bool | initCompassSymbolCharacters (CompassSymbol &symbol) |
Static Protected Member Functions | |
| static void | rotate (const DtOsgChannel3dViewCompassInstance::VertexList &in, double rad, DtOsgChannel3dViewCompassInstance::VertexList &out) |
| static void | translate (const DtOsgChannel3dViewCompassInstance::VertexList &in, const osg::Vec2 &translation, DtOsgChannel3dViewCompassInstance::VertexList &out) |
| static void | scale (const DtOsgChannel3dViewCompassInstance::VertexList &in, double s, DtOsgChannel3dViewCompassInstance::VertexList &out) |
|
protected |
This type can be used to provide a list of vertices to the polygon objects.
| makVrv::DtOsgChannel3dViewCompassInstance::DtOsgChannel3dViewCompassInstance | ( | DtDe & | de | ) |
CTOR.
|
virtual |
DTOR.
|
delete |
Default Constructor not implemented.
|
delete |
Copy Constructor not implemented - Copy not allowed.
|
delete |
Assignment Operator not implemented - Assignment not allowed.
|
virtual |
Set the compass to visible or invisible.
Implements makVrv::DtSetVisibilityInterface.
|
virtual |
Return visibility status.
|
virtual |
Set the name of the channel that this compass should be drawn on.
Reimplemented from makVrv::DtChannel3dViewCompassInstance.
|
virtual |
Set the model definition; note that this (potentially) includes all the other parameters enumeration below.
Reimplemented from makVrv::DtChannel3dViewCompassInstance.
|
virtual |
Called anytime any of the compass frame parameters change; calls redraw compass needle.
Implements makVrv::DtChannel3dViewCompassInstance.
|
virtual |
Override base class method to change dark color on all tick marks.
Reimplemented from makVrv::DtChannel3dViewCompassInstance.
|
virtual |
Override base class method to change dark color on all tick marks.
Reimplemented from makVrv::DtChannel3dViewCompassInstance.
|
virtual |
Override base class method to change the symbols file.
Reimplemented from makVrv::DtChannel3dViewCompassInstance.
|
virtual |
Sets the pixel density ratio to scale grid lines on high dpi screens.
|
virtual |
Get the pixel density ratio, this is used to allow VR mode.
|
protectedvirtual |
Called when a channel is created.
|
protectedvirtual |
Called when a channel is about to be destroyed.
|
protectedvirtual |
Redraws the compass if it is associated with the given channel configuration.
|
protectedvirtual |
Redraws the compass if it is associated with the given window configuration.
|
protectedvirtual |
Detect when the unit of measurement to use for a display unit has changed.
|
protectedvirtual |
Updates the compass. Triggered from the renderer post update signal.
|
protectedvirtual |
slot for when the coordinate system changes
|
protected |
Updates a character for the compass. Returns true on success or false on error.
|
protectedvirtual |
Parse settings specific to the compass.
|
protectedvirtual |
Create the compass resources.
|
protected |
delete / clear the DtQuad and DtFilledPolygons, if they exist
|
protected |
Calculates the compass center position based on Location enum, margins, current window size and channel parameters.
|
protected |
Creates a dark line segment used for tick marks.
|
protected |
Creates a light line segment used for tick marks.
|
protectedvirtual |
Updates the orientation units and returns true if it is changed.
|
protectedvirtual |
Updates the compass.
|
protectedvirtual |
Computes horizontal offsets for centering character quads.
| offsets | The output offsets array. |
| numCharacters | The number of characters to display. |
| characterWidth | The character quad width. |
|
protectedvirtual |
Computes the heading string to display.
| radHeading | The heading in radians. |
| outString | The output string to display. |
|
protectedvirtual |
Computes texture coordinates for the given character.
|
protectedvirtual |
Initialize the character display for a symbol. Sets specific characters, initializes quads, and initilizes tick marks for the symbol.
|
protectedvirtual |
Initialize the character display for a popout symbol. Sets default characters and creates quads for the symbol.
|
protectedvirtual |
Initialize the characters for a symbol. Sets texture coordinates and textures for character quads. Returns true on success or false on error.
|
staticprotected |
Utility function to rotate a list of vertices.
|
staticprotected |
Utility function to translate a list of vertices.
|
staticprotected |
Utility function to scale a list of vertices.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
local clone of the system wide coordinate system. for thread safety.