VR-Forces 4.6.1 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::DtOsgChannelCompassInstance Class Reference

vrvGraphics-based implementation of a 2D compass More...

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

Classes

struct  TickMark

Public Member Functions

 DtOsgChannelCompassInstance (DtDe &de)
 CTOR.
virtual ~DtOsgChannelCompassInstance ()
 DTOR.
virtual void setVisible (bool isVisible)
 Set the compass to visible or invisible.
virtual bool visible ()
 Return visibility status.
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.
virtual void setModelDefinition (const std::string &modelDefinition)
 Set the model definition; note that this (potentially) includes all the other parameters enumeration below.
virtual void updateCompass (bool force)
 Called anytime any of the compass frame parameters change; calls redraw compass needle.
void updateLetter (bool &dirtyFlag, const std::string &filename, int tickIndex, DtQuad *letterQuad, osg::ref_ptr< osg::Texture > &letterTexture, bool &force)
virtual void setNorthLetterFilename (const std::string &filename)
 Override base class method to set the dirty flag.
virtual void setSouthLetterFilename (const std::string &filename)
 Override base class method to set the dirty flag.
virtual void setEastLetterFilename (const std::string &filename)
 Override base class method to set the dirty flag.
virtual void setWestLetterFilename (const std::string &filename)
 Override base class method to set the dirty flag.
virtual void setDarkTickColor (float r, float g, float b, float a)
 Override base class method to change dark color on all tick marks.
virtual void setLightTickColor (float r, float g, float b, float a)
 Override base class method to change dark color on all tick marks.
- Public Member Functions inherited from makVrv::DtChannelCompassInstance
 DtChannelCompassInstance ()
 CTOR.
virtual ~DtChannelCompassInstance ()
 DTOR.
virtual void setCompassHeading (double heading)
 set the compass heading
virtual void setLocation (DtChannelCompass::Locations location)
 Set the compass location.
DtChannelCompass::Locations location () const
 Returns the current location of the compass.
virtual void setMargins (unsigned int xMargin, unsigned int yMargin)
 Set the margins, in pixels.
virtual void setCompassRadius (unsigned int radius)
 Set the size of the compass, in pixels.
virtual void setNorthLetterSize (unsigned int width, unsigned int height)
 Set the size of the North Letter, in pixels.
void setSouthLetterSize (unsigned int width, unsigned int height)
 Set the size of the South Letter, in pixels.
virtual void setEastLetterSize (unsigned int width, unsigned int height)
 Set the size of the East Letter, in pixels.
virtual void setWestLetterSize (unsigned int width, unsigned int height)
 Set the size of the West Letter, in pixels.
virtual void showSmallTickMarks (bool show)
 show or hide the smaller (every 15 degrees) tick marks
- 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)
void createCompass ()
void destroyCompass ()
osg::Vec2 calcCenterPosition ()
void slot_update ()
DtLineSegmentcreateDarkSide (DtOverlayRenderer &overlay)
DtLineSegmentcreateLightSide (DtOverlayRenderer &overlay)

Static Protected Member Functions

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

Protected Attributes

DtDemyDe
DtSignalConnectionManager myConnections
DtOsgChannelmyChannel
osg::ref_ptr< osg::Texture > myNorthTexture
osg::ref_ptr< osg::Texture > mySouthTexture
osg::ref_ptr< osg::Texture > myEastTexture
osg::ref_ptr< osg::Texture > myWestTexture
DtQuadmyNorthLetter
DtQuadmySouthLetter
DtQuadmyEastLetter
DtQuadmyWestLetter
osg::Vec2 myCenterPosition
bool myNorthLetterDirty
bool mySouthLetterDirty
bool myEastLetterDirty
bool myWestLetterDirty
TickMark myLargeTickMarks [7]
TickMark mySmallTickMarks [16]
- Protected Attributes inherited from makVrv::DtChannelCompassInstance
std::string myModelDefinitionName
std::string myDisplayEngineName
std::string myWindowName
std::string myChannelName
DtChannelCompass::Locations myLocation
unsigned int myMargins [2]
std::string myNorthLetterFilename
std::string mySouthLetterFilename
std::string myEastLetterFilename
std::string myWestLetterFilename
unsigned int myCompassRadius
double myCompassHeading
unsigned int myNorthLetterSize [2]
unsigned int mySouthLetterSize [2]
unsigned int myEastLetterSize [2]
unsigned int myWestLetterSize [2]
float myDarkTickColor [4]
float myLightTickColor [4]
bool myShowSmallTickMarks

Detailed Description

vrvGraphics-based implementation of a 2D compass

Member Typedef Documentation

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

Constructor & Destructor Documentation

makVrv::DtOsgChannelCompassInstance::DtOsgChannelCompassInstance ( DtDe de)

CTOR.

virtual makVrv::DtOsgChannelCompassInstance::~DtOsgChannelCompassInstance ( )
virtual

DTOR.

Member Function Documentation

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

Set the compass to visible or invisible.

Implements makVrv::DtSetVisibilityInterface.

virtual bool makVrv::DtOsgChannelCompassInstance::visible ( )
virtual

Return visibility status.

virtual void makVrv::DtOsgChannelCompassInstance::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::DtChannelCompassInstance.

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

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

Reimplemented from makVrv::DtChannelCompassInstance.

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

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

Implements makVrv::DtChannelCompassInstance.

void makVrv::DtOsgChannelCompassInstance::updateLetter ( bool dirtyFlag,
const std::string &  filename,
int  tickIndex,
DtQuad letterQuad,
osg::ref_ptr< osg::Texture > &  letterTexture,
bool force 
)
virtual void makVrv::DtOsgChannelCompassInstance::setNorthLetterFilename ( const std::string &  filename)
virtual

Override base class method to set the dirty flag.

Reimplemented from makVrv::DtChannelCompassInstance.

virtual void makVrv::DtOsgChannelCompassInstance::setSouthLetterFilename ( const std::string &  filename)
virtual

Override base class method to set the dirty flag.

Reimplemented from makVrv::DtChannelCompassInstance.

virtual void makVrv::DtOsgChannelCompassInstance::setEastLetterFilename ( const std::string &  filename)
virtual

Override base class method to set the dirty flag.

Reimplemented from makVrv::DtChannelCompassInstance.

virtual void makVrv::DtOsgChannelCompassInstance::setWestLetterFilename ( const std::string &  filename)
virtual

Override base class method to set the dirty flag.

Reimplemented from makVrv::DtChannelCompassInstance.

virtual void makVrv::DtOsgChannelCompassInstance::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::DtChannelCompassInstance.

virtual void makVrv::DtOsgChannelCompassInstance::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::DtChannelCompassInstance.

virtual void makVrv::DtOsgChannelCompassInstance::slot_channelCreated ( DtChannelManager ,
DtChannel  
)
protectedvirtual
virtual void makVrv::DtOsgChannelCompassInstance::slot_channelToBeDestroyed ( DtChannelManager ,
DtChannel  
)
protectedvirtual
virtual void makVrv::DtOsgChannelCompassInstance::slot_channelConfigurationModified ( const std::string &  deName,
const std::string &  winName,
const std::string &  oldChannelName,
const DtChannelConfiguration config 
)
protectedvirtual
virtual void makVrv::DtOsgChannelCompassInstance::slot_windowConfigurationModified ( const std::string &  deName,
const std::string &  winName,
const DtWindowConfiguration config 
)
protectedvirtual
void makVrv::DtOsgChannelCompassInstance::createCompass ( )
protected
void makVrv::DtOsgChannelCompassInstance::destroyCompass ( )
protected
osg::Vec2 makVrv::DtOsgChannelCompassInstance::calcCenterPosition ( )
protected
void makVrv::DtOsgChannelCompassInstance::slot_update ( )
protected
DtLineSegment* makVrv::DtOsgChannelCompassInstance::createDarkSide ( DtOverlayRenderer overlay)
protected
DtLineSegment* makVrv::DtOsgChannelCompassInstance::createLightSide ( DtOverlayRenderer overlay)
protected
static void makVrv::DtOsgChannelCompassInstance::rotate ( const DtOsgChannelCompassInstance::VertexList in,
double  rad,
DtOsgChannelCompassInstance::VertexList out 
)
staticprotected

Utility function to rotate a list of vertices.

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

Utility function to translate a list of vertices.

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

Member Data Documentation

DtDe& makVrv::DtOsgChannelCompassInstance::myDe
protected
DtSignalConnectionManager makVrv::DtOsgChannelCompassInstance::myConnections
protected
DtOsgChannel* makVrv::DtOsgChannelCompassInstance::myChannel
protected
osg::ref_ptr<osg::Texture> makVrv::DtOsgChannelCompassInstance::myNorthTexture
protected
osg::ref_ptr<osg::Texture> makVrv::DtOsgChannelCompassInstance::mySouthTexture
protected
osg::ref_ptr<osg::Texture> makVrv::DtOsgChannelCompassInstance::myEastTexture
protected
osg::ref_ptr<osg::Texture> makVrv::DtOsgChannelCompassInstance::myWestTexture
protected
DtQuad* makVrv::DtOsgChannelCompassInstance::myNorthLetter
protected
DtQuad* makVrv::DtOsgChannelCompassInstance::mySouthLetter
protected
DtQuad* makVrv::DtOsgChannelCompassInstance::myEastLetter
protected
DtQuad* makVrv::DtOsgChannelCompassInstance::myWestLetter
protected
osg::Vec2 makVrv::DtOsgChannelCompassInstance::myCenterPosition
protected
bool makVrv::DtOsgChannelCompassInstance::myNorthLetterDirty
protected
bool makVrv::DtOsgChannelCompassInstance::mySouthLetterDirty
protected
bool makVrv::DtOsgChannelCompassInstance::myEastLetterDirty
protected
bool makVrv::DtOsgChannelCompassInstance::myWestLetterDirty
protected
TickMark makVrv::DtOsgChannelCompassInstance::myLargeTickMarks[7]
protected
TickMark makVrv::DtOsgChannelCompassInstance::mySmallTickMarks[16]
protected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)