VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes
makVrv::DtOsgChannel3dViewCompassInstance Class Reference

vrvGraphics-based implementation of a model-like object that draws a 3d view first person shooter style compass on a channel. More...

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

Classes

struct  CompassSymbol
 
struct  TickMark
 

Public Member Functions

 DtOsgChannel3dViewCompassInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtOsgChannel3dViewCompassInstance ()
 DTOR. More...
 
 DtOsgChannel3dViewCompassInstance ()=delete
 Default Constructor not implemented. More...
 
 DtOsgChannel3dViewCompassInstance (const DtOsgChannel3dViewCompassInstance &other)=delete
 Copy Constructor not implemented - Copy not allowed. More...
 
DtOsgChannel3dViewCompassInstanceoperator= (const DtOsgChannel3dViewCompassInstance &other)=delete
 Assignment Operator not implemented - Assignment not allowed. More...
 
virtual void setVisible (bool isVisible)
 Set the compass to visible or invisible. More...
 
virtual bool visible ()
 Return visibility status. More...
 
virtual void setChannelName (const std::string &deName, const std::string &winName, const std::string &channelName)
 Set the name of the channel that this compass should be drawn on. More...
 
virtual void setModelDefinition (const std::string &modelDefinition)
 Set the model definition; note that this (potentially) includes all the other parameters enumeration below. More...
 
virtual void updateCompass (bool force)
 Called anytime any of the compass frame parameters change; calls redraw compass needle. More...
 
virtual void setDarkTickColor (float r, float g, float b, float a)
 Override base class method to change dark color on all tick marks. More...
 
virtual void setLightTickColor (float r, float g, float b, float a)
 Override base class method to change dark color on all tick marks. More...
 
virtual void setSymbolsFilename (const std::string &filename)
 Override base class method to change the symbols file. More...
 
virtual void setPixelRatio (float pixelRatio)
 Sets the pixel density ratio to scale grid lines on high dpi screens. More...
 
- Public Member Functions inherited from makVrv::DtChannel3dViewCompassInstance
 DtChannel3dViewCompassInstance ()
 CTOR. More...
 
virtual ~DtChannel3dViewCompassInstance ()
 DTOR. More...
 
 DtChannel3dViewCompassInstance (const DtChannel3dViewCompassInstance &other)=delete
 Copy Constructor not implemented - Copy not allowed. More...
 
DtChannel3dViewCompassInstanceoperator= (const DtChannel3dViewCompassInstance &other)=delete
 Assignment Operator not implemented - Assignment not allowed. More...
 
virtual void setCompassHeading (double heading)
 set the compass heading More...
 
virtual void setMargins (int xMargin, int yMargin)
 Set the margins, in pixels. More...
 
virtual void setSymbolColor (float r, float g, float b, float a)
 set the color to use for the symbols More...
 
virtual void setPopoutSymbolColor (float r, float g, float b, float a)
 set the color to use for the popout (center) symbols More...
 
virtual void setWidth (unsigned int width)
 Set the compass width. More...
 
virtual void setSymbolSize (unsigned int size)
 Set the size in pixels for the symbols. More...
 
virtual void setPopoutSymbolSize (unsigned int size)
 Set the size in pixels for the popout (center) symbols. More...
 
- 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_update ()
 
bool updateCompassCharacter (const std::string &filename, DtQuad *quad, osg::ref_ptr< osg::Texture > &texture, const osg::Vec4 &texCoords)
 Updates a character for the compass. More...
 
virtual void parseModelDefinition (DtModelDefinition *definition)
 
virtual void createCompass ()
 
void destroyCompass ()
 
osg::Vec2 calcCompassCenterPosition ()
 
DtLineSegmentcreateDarkSide (DtOverlayRenderer &overlay)
 
DtLineSegmentcreateLightSide (DtOverlayRenderer &overlay)
 
virtual void updateCompass ()
 Updates the compass. More...
 
virtual void computeCharacterCoords (const unsigned char value, osg::Vec4 &coords)
 
virtual void initCompassSymbolCharacterDisplay (CompassSymbol &symbol, unsigned char charA, unsigned char charB, unsigned char charC, DtOverlayRenderer &overlay)
 Initialize the character display for a symbol. More...
 
virtual void initPopoutSymbolCharacterDisplay (CompassSymbol &symbol, unsigned char charA, unsigned char charB, unsigned char charC, DtOverlayRenderer &overlay)
 Initialize the character display for a popout symbol. More...
 
virtual bool initCompassSymbolCharacters (CompassSymbol &symbol)
 Initialize the characters for a symbol. More...
 

Static Protected Member Functions

static void rotate (const DtOsgChannel3dViewCompassInstance::VertexList &in, double rad, DtOsgChannel3dViewCompassInstance::VertexList &out)
 Utility function to rotate a list of vertices. More...
 
static void translate (const DtOsgChannel3dViewCompassInstance::VertexList &in, const osg::Vec2 &translation, DtOsgChannel3dViewCompassInstance::VertexList &out)
 Utility function to translate a list of vertices. More...
 
static void scale (const DtOsgChannel3dViewCompassInstance::VertexList &in, double s, DtOsgChannel3dViewCompassInstance::VertexList &out)
 Utility function to scale a list of vertices. More...
 

Protected Attributes

DtDemyDe
 
DtSignalConnectionManager myConnections
 
DtSignalConnectionManager myPixelRatioConnection
 
DtOsgChannelmyChannel
 
bool myCompassIsMagnetic
 
int myCreateState
 
float myPixelRatio
 
osg::ref_ptr< osg::Texture > myCompassSymbolsTexture
 
osg::Vec2 myCompassCenterPosition
 
CompassSymbol myCompassSymbols [24]
 
CompassSymbol myPopoutSymbol
 
TickMark myPopoutL
 
TickMark myPopoutR
 
bool myCompassDirty
 
- Protected Attributes inherited from makVrv::DtChannel3dViewCompassInstance
std::string myModelDefinitionName
 
std::string myDisplayEngineName
 
std::string myWindowName
 
std::string myChannelName
 
int myMargins [2]
 
double myCompassHeading
 
double myCompassDeclination
 
float myDarkTickColor [4]
 
float myLightTickColor [4]
 
unsigned int myCompassWidth
 
unsigned int myCompassSymbolSize
 
unsigned int myCompassPopoutSymbolSize
 
std::string myCompassSymbolsFilename
 
float mySymbolColor [4]
 
float myPopoutSymbolColor [4]
 

Detailed Description

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 sudo 3d view where directions rotate into a popout center. The compass is located at the top center of the display.

Member Typedef Documentation

typedef std::vector<float> makVrv::DtOsgChannel3dViewCompassInstance::VertexList
protected

Constructor & Destructor Documentation

makVrv::DtOsgChannel3dViewCompassInstance::DtOsgChannel3dViewCompassInstance ( DtDe de)

CTOR.

virtual makVrv::DtOsgChannel3dViewCompassInstance::~DtOsgChannel3dViewCompassInstance ( )
virtual

DTOR.

makVrv::DtOsgChannel3dViewCompassInstance::DtOsgChannel3dViewCompassInstance ( )
delete

Default Constructor not implemented.

makVrv::DtOsgChannel3dViewCompassInstance::DtOsgChannel3dViewCompassInstance ( const DtOsgChannel3dViewCompassInstance other)
delete

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

DtOsgChannel3dViewCompassInstance& makVrv::DtOsgChannel3dViewCompassInstance::operator= ( const DtOsgChannel3dViewCompassInstance other)
delete

Assignment Operator not implemented - Assignment not allowed.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::setVisible ( bool  isVisible)
virtual

Set the compass to visible or invisible.

Implements makVrv::DtSetVisibilityInterface.

virtual bool makVrv::DtOsgChannel3dViewCompassInstance::visible ( )
virtual

Return visibility status.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::setChannelName ( const std::string &  deName,
const std::string &  winName,
const std::string &  channelName 
)
virtual

Set the name of the channel that this compass should be drawn on.

Reimplemented from makVrv::DtChannel3dViewCompassInstance.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::setModelDefinition ( const std::string &  modelDefinition)
virtual

Set the model definition; note that this (potentially) includes all the other parameters enumeration below.

Reimplemented from makVrv::DtChannel3dViewCompassInstance.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::updateCompass ( bool  force)
virtual

Called anytime any of the compass frame parameters change; calls redraw compass needle.

Implements makVrv::DtChannel3dViewCompassInstance.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::setDarkTickColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Override base class method to change dark color on all tick marks.

Reimplemented from makVrv::DtChannel3dViewCompassInstance.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::setLightTickColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Override base class method to change dark color on all tick marks.

Reimplemented from makVrv::DtChannel3dViewCompassInstance.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::setSymbolsFilename ( const std::string &  filename)
virtual

Override base class method to change the symbols file.

Reimplemented from makVrv::DtChannel3dViewCompassInstance.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::setPixelRatio ( float  pixelRatio)
virtual

Sets the pixel density ratio to scale grid lines on high dpi screens.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::slot_channelCreated ( DtChannelManager ,
DtChannel  
)
protectedvirtual
virtual void makVrv::DtOsgChannel3dViewCompassInstance::slot_channelToBeDestroyed ( DtChannelManager ,
DtChannel  
)
protectedvirtual
virtual void makVrv::DtOsgChannel3dViewCompassInstance::slot_channelConfigurationModified ( const std::string &  deName,
const std::string &  winName,
const std::string &  oldChannelName,
const DtChannelConfiguration config 
)
protectedvirtual
virtual void makVrv::DtOsgChannel3dViewCompassInstance::slot_windowConfigurationModified ( const std::string &  deName,
const std::string &  winName,
const DtWindowConfiguration config 
)
protectedvirtual
virtual void makVrv::DtOsgChannel3dViewCompassInstance::slot_update ( )
protectedvirtual
bool makVrv::DtOsgChannel3dViewCompassInstance::updateCompassCharacter ( const std::string &  filename,
DtQuad quad,
osg::ref_ptr< osg::Texture > &  texture,
const osg::Vec4 &  texCoords 
)
protected

Updates a character for the compass.

Returns true on success or false on error.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::parseModelDefinition ( DtModelDefinition definition)
protectedvirtual
virtual void makVrv::DtOsgChannel3dViewCompassInstance::createCompass ( )
protectedvirtual
void makVrv::DtOsgChannel3dViewCompassInstance::destroyCompass ( )
protected
osg::Vec2 makVrv::DtOsgChannel3dViewCompassInstance::calcCompassCenterPosition ( )
protected
DtLineSegment* makVrv::DtOsgChannel3dViewCompassInstance::createDarkSide ( DtOverlayRenderer overlay)
protected
DtLineSegment* makVrv::DtOsgChannel3dViewCompassInstance::createLightSide ( DtOverlayRenderer overlay)
protected
virtual void makVrv::DtOsgChannel3dViewCompassInstance::updateCompass ( )
protectedvirtual

Updates the compass.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::computeCharacterCoords ( const unsigned char  value,
osg::Vec4 &  coords 
)
protectedvirtual
virtual void makVrv::DtOsgChannel3dViewCompassInstance::initCompassSymbolCharacterDisplay ( CompassSymbol symbol,
unsigned char  charA,
unsigned char  charB,
unsigned char  charC,
DtOverlayRenderer overlay 
)
protectedvirtual

Initialize the character display for a symbol.

virtual void makVrv::DtOsgChannel3dViewCompassInstance::initPopoutSymbolCharacterDisplay ( CompassSymbol symbol,
unsigned char  charA,
unsigned char  charB,
unsigned char  charC,
DtOverlayRenderer overlay 
)
protectedvirtual

Initialize the character display for a popout symbol.

virtual bool makVrv::DtOsgChannel3dViewCompassInstance::initCompassSymbolCharacters ( CompassSymbol symbol)
protectedvirtual

Initialize the characters for a symbol.

Returns true on success or false on error.

static void makVrv::DtOsgChannel3dViewCompassInstance::rotate ( const DtOsgChannel3dViewCompassInstance::VertexList in,
double  rad,
DtOsgChannel3dViewCompassInstance::VertexList out 
)
staticprotected

Utility function to rotate a list of vertices.

static void makVrv::DtOsgChannel3dViewCompassInstance::translate ( const DtOsgChannel3dViewCompassInstance::VertexList in,
const osg::Vec2 &  translation,
DtOsgChannel3dViewCompassInstance::VertexList out 
)
staticprotected

Utility function to translate a list of vertices.

static void makVrv::DtOsgChannel3dViewCompassInstance::scale ( const DtOsgChannel3dViewCompassInstance::VertexList in,
double  s,
DtOsgChannel3dViewCompassInstance::VertexList out 
)
staticprotected

Utility function to scale a list of vertices.

Member Data Documentation

DtDe& makVrv::DtOsgChannel3dViewCompassInstance::myDe
protected
DtSignalConnectionManager makVrv::DtOsgChannel3dViewCompassInstance::myConnections
protected
DtSignalConnectionManager makVrv::DtOsgChannel3dViewCompassInstance::myPixelRatioConnection
protected
DtOsgChannel* makVrv::DtOsgChannel3dViewCompassInstance::myChannel
protected
bool makVrv::DtOsgChannel3dViewCompassInstance::myCompassIsMagnetic
protected
int makVrv::DtOsgChannel3dViewCompassInstance::myCreateState
protected
float makVrv::DtOsgChannel3dViewCompassInstance::myPixelRatio
protected
osg::ref_ptr<osg::Texture> makVrv::DtOsgChannel3dViewCompassInstance::myCompassSymbolsTexture
protected
osg::Vec2 makVrv::DtOsgChannel3dViewCompassInstance::myCompassCenterPosition
protected
CompassSymbol makVrv::DtOsgChannel3dViewCompassInstance::myCompassSymbols[24]
protected
CompassSymbol makVrv::DtOsgChannel3dViewCompassInstance::myPopoutSymbol
protected
TickMark makVrv::DtOsgChannel3dViewCompassInstance::myPopoutL
protected
TickMark makVrv::DtOsgChannel3dViewCompassInstance::myPopoutR
protected
bool makVrv::DtOsgChannel3dViewCompassInstance::myCompassDirty
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)