VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtOsgGlStudioCockpit Class Reference

DtOsgGlStudioCockpit is the implementation of the distributed object of the same name (and under our current naming conventions, would more correctly be named DtOsgGlStudioCockpitObject).

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

Public Types

enum  DtPerspective { Dt2D, Dt3D }
 
typedef std::map< std::string,
DtGlStudioAttributeUpdater * > 
DtAttributeUpdateMap
 
- Public Types inherited from makVrv::DtTickable
enum  TickableListState { TickableNotOnList, TickableOnMainList, TickableOnThreadSafeList }
 

Public Member Functions

 DtOsgGlStudioCockpit (DtDe &de, DtUniqueID id)
 
virtual ~DtOsgGlStudioCockpit ()
 
virtual bool needsUpdate (DtTime tNow)
 
virtual void update (DtTime tNow)
 
virtual DtPerspective perspective (void) const
 
virtual void createCockpit (const std::string &filename, const std::string &rsoName, DtPerspective p, DtUniqueID attachedEntityElementId=0)
 
virtual void removeCockpit ()
 
virtual void setProperty (const std::string &prop, const std::string &val)
 
virtual void setChannelKeyword (const std::string &channelKeyword)
 
virtual void setPerspective (const double &width, const double &height)
 
virtual void setOffset (const double &x, const double &y, const double &z)
 
virtual void setDynamicScale (const double &x, const double &y, const double &z)
 
virtual void setDynamicRotate (const double &x, const double &y, const double &z)
 
virtual void setVisible (bool vis)
 
virtual void addUpdater (const std::string &name, const std::string &type)
 
virtual void updateTSPI (const DtVector &loc, const DtVector &vel, const DtVector &accel, const DtTaitBryan &orient, const DtVector &rotVel, int algorithm)
 
virtual void setObserverName (const std::string &obsName)
 
virtual std::string observerName () const
 
virtual void setRenderCockpitOnly (bool cockpitOnly)
 
virtual bool renderCockpitOnly ()
 
virtual void setRenderAsOverlay (bool renderAsOverlay)
 
virtual bool renderAsOverlay ()
 
virtual std::string className () const
 
DtUniqueID uniqueID () const
 
virtual void updateMatrixTransform ()
 
virtual bool handleMouseInput (const DtMouseEvent &ea)
 
virtual double update ()
 
- Public Member Functions inherited from makVrv::DtTickable
virtual bool updateIfNeeded (DtTime tNow)
 
virtual ~DtTickable ()
 
virtual void setTickableEnabled (bool enabled)
 
virtual void setIsThreadSafe (bool safe)
 
virtual bool isThreadSafe () const
 
virtual void setTickableListState (TickableListState safeList)
 
virtual TickableListState tickableListState () const
 
virtual void setUpdatePeriod (unsigned int period)
 
virtual unsigned int updatePeriod () const
 
virtual bool adaptiveTickLodEnabled () const
 

Protected Member Functions

virtual void initGlStudio ()
 
virtual osg::Group * createOverlayObjects ()
 
virtual osg::Group * createChannelNode ()
 
virtual void deepRemoveChildren (osg::Group *g)
 
virtual void slot_channelAdded (DtChannelManager *mgr, DtChannel *channel)
 
virtual void slot_channelDestroyed (DtChannelManager *mgr, DtChannel *channel)
 
virtual void slot_channelModified (const std::string &deName, const std::string &windowName, const std::string &channelName, const DtChannelConfiguration &config)
 
virtual void slot_smoothingEnabled (bool smooth)
 
virtual void slot_smoothingPeriod (const double &period)
 
virtual void slot_projectionChanged (DtObserverObject *, bool is2D)
 
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 
 DtTickable ()=delete
 
virtual void slot_managerAboutToBeDeleted ()
 

Protected Attributes

DtAttributeUpdateMap myAttributeUpdaters
 
DtDemyDe
 
DtUniqueID myId
 
std::string myRsoName
 
std::string myFilename
 
double myWidth
 
double myHeight
 
DtPerspective myPerspective
 
bool myRenderAsOverlay
 
std::string myChannelKeyword
 
double myOffsetX
 
double myOffsetY
 
double myOffsetZ
 
double myDynamicScaleX
 
double myDynamicScaleY
 
double myDynamicScaleZ
 
double myDynamicRotateX
 
double myDynamicRotateY
 
double myDynamicRotateZ
 
std::string myObserverName
 
bool myIsVisible
 
bool myObserverIs2D
 
bool myRenderCockpitOnly
 
osg::ref_ptr< osg::Group > myGlStudioGroup
 
osg::ref_ptr< osg::Group > myGlStudioPost2DGroup
 
osg::ref_ptr< osg::Group > myGlStudio3DGroup
 
osg::ref_ptr< osg::Switch > myViewSwitchNode
 
osg::ref_ptr
< osg::MatrixTransform > 
myMatrixTransform
 
DtChannelSpecificGroupmyChannelNode
 
DtGlStudioDrawablemyGlStudioComponent
 
DtGlStudioEventProcessormyEventProcessor
 
DtSceneObjectmyHostSceneObject
 
bool myHasSmootherValues
 
DtExponentialSmoother mySmoother
 
DtClock myClock
 
double myPreviousTime
 
double myCurrentTime
 
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 
DtSignalConnectionManager myConnections
 
unsigned int myFrameCounter
 
unsigned int myFrameToUpdate
 
unsigned int myUpdatePeriod
 
unsigned int myTickableIndex
 
DtTime myLastUpdateTime
 
bool myIsThreadSafe
 
TickableListState myTickableListState
 

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
Dt2D 
Dt3D 

Constructor & Destructor Documentation

makVrv::DtOsgGlStudioCockpit::DtOsgGlStudioCockpit ( DtDe de,
DtUniqueID  id 
)
virtual makVrv::DtOsgGlStudioCockpit::~DtOsgGlStudioCockpit ( )
virtual

Member Function Documentation

virtual void makVrv::DtOsgGlStudioCockpit::createCockpit ( const std::string &  filename,
const std::string &  rsoName,
DtPerspective  p,
DtUniqueID  attachedEntityElementId = 0 
)
virtual

Override the set model definition function to load the right cockpit element for the attached object and channel. The attachedEntityElementId parameter is only required for 3D cockpits (i.e. with p = Dt3D) and is used to set myHostSceneObject.

virtual void makVrv::DtOsgGlStudioCockpit::removeCockpit ( )
virtual

Override the set model definition function to load the right cockpit element for the attached object and channel. The attachedEntityElementId parameter is only required for 3D cockpits (i.e. with p = Dt3D) and is used to set myHostSceneObject.

virtual void makVrv::DtOsgGlStudioCockpit::setProperty ( const std::string &  prop,
const std::string &  val 
)
virtual

sets a property with the value (in string form)

virtual void makVrv::DtOsgGlStudioCockpit::setChannelKeyword ( const std::string &  channelKeyword)
virtual

sets the channel keyword that it will display on

virtual void makVrv::DtOsgGlStudioCockpit::setPerspective ( const double width,
const double height 
)
virtual

sets the projection perspective for drawing the HUD

virtual void makVrv::DtOsgGlStudioCockpit::setOffset ( const double x,
const double y,
const double z 
)
virtual

sets the offset of the HUD with respect to the entity

virtual void makVrv::DtOsgGlStudioCockpit::setDynamicScale ( const double x,
const double y,
const double z 
)
virtual

Sets the values of the DynamicScale call into GL Studio.

virtual void makVrv::DtOsgGlStudioCockpit::setDynamicRotate ( const double x,
const double y,
const double z 
)
virtual

Sets the values of the DynamicRotate call into GL Studio.

virtual void makVrv::DtOsgGlStudioCockpit::setVisible ( bool  vis)
virtual

sets the cockpit to be visible or not

virtual void makVrv::DtOsgGlStudioCockpit::addUpdater ( const std::string &  name,
const std::string &  type 
)
virtual

adds an attribute updater to the local updaters

virtual void makVrv::DtOsgGlStudioCockpit::updateTSPI ( const DtVector loc,
const DtVector vel,
const DtVector accel,
const DtTaitBryan &  orient,
const DtVector rotVel,
int  algorithm 
)
virtual

updates location/orientation info about the attached entity for the smoother to use

virtual void makVrv::DtOsgGlStudioCockpit::setObserverName ( const std::string &  obsName)
virtual

set the name of the observer this HUD object is supporting

virtual std::string makVrv::DtOsgGlStudioCockpit::observerName ( ) const
virtual

Override the set model definition function to load the right cockpit element for the attached object and channel. The attachedEntityElementId parameter is only required for 3D cockpits (i.e. with p = Dt3D) and is used to set myHostSceneObject.

virtual void makVrv::DtOsgGlStudioCockpit::setRenderCockpitOnly ( bool  cockpitOnly)
virtual

Sets the DtOsgChannel's scene data to be the cockpit's channel node (which causes it to render only the cockpit and not the rest of the scene).

virtual bool makVrv::DtOsgGlStudioCockpit::renderCockpitOnly ( )
virtual

Override the set model definition function to load the right cockpit element for the attached object and channel. The attachedEntityElementId parameter is only required for 3D cockpits (i.e. with p = Dt3D) and is used to set myHostSceneObject.

virtual void makVrv::DtOsgGlStudioCockpit::setRenderAsOverlay ( bool  renderAsOverlay)
virtual

Set the glstudio cockpit to be rendered as part of the overlay camera instead of the main camera. This pushes the glstudio huds to be rendered after the post processor effects.

virtual bool makVrv::DtOsgGlStudioCockpit::renderAsOverlay ( )
virtual

Override the set model definition function to load the right cockpit element for the attached object and channel. The attachedEntityElementId parameter is only required for 3D cockpits (i.e. with p = Dt3D) and is used to set myHostSceneObject.

virtual std::string makVrv::DtOsgGlStudioCockpit::className ( ) const
virtual

Get the class name of the model instance owner. This is used to control how model instances are created.

DtUniqueID makVrv::DtOsgGlStudioCockpit::uniqueID ( ) const

Get the unique id of the object.

virtual void makVrv::DtOsgGlStudioCockpit::updateMatrixTransform ( )
virtual

updates myMatrixTransform to the location of myHostSceneObject plus the myOffset values.

virtual bool makVrv::DtOsgGlStudioCockpit::handleMouseInput ( const DtMouseEvent ea)
virtual

event handling function

virtual double makVrv::DtOsgGlStudioCockpit::update ( )
virtual

update callback function

virtual bool makVrv::DtOsgGlStudioCockpit::needsUpdate ( DtTime  tNow)
virtual

Always calls update.

Reimplemented from makVrv::DtTickable.

virtual void makVrv::DtOsgGlStudioCockpit::update ( DtTime  tNow)
virtual

Calls updateMatrixTransform.

Implements makVrv::DtTickable.

virtual DtPerspective makVrv::DtOsgGlStudioCockpit::perspective ( void  ) const
virtual

retrieve the perspective

virtual void makVrv::DtOsgGlStudioCockpit::initGlStudio ( )
protectedvirtual

initializes GL studio

virtual osg::Group* makVrv::DtOsgGlStudioCockpit::createOverlayObjects ( )
protectedvirtual

actually creates the HUD object and supporting nodes

virtual osg::Group* makVrv::DtOsgGlStudioCockpit::createChannelNode ( )
protectedvirtual

creates a channel specific node and sets whether the HUD should be added to the channels or not

virtual void makVrv::DtOsgGlStudioCockpit::deepRemoveChildren ( osg::Group *  g)
protectedvirtual

recursively removes nodes from a group to prevent memory leaks

virtual void makVrv::DtOsgGlStudioCockpit::slot_channelAdded ( DtChannelManager mgr,
DtChannel channel 
)
protectedvirtual

slot to be called when a new channel is added

virtual void makVrv::DtOsgGlStudioCockpit::slot_channelDestroyed ( DtChannelManager mgr,
DtChannel channel 
)
protectedvirtual

slot to be called when a channel is removed

virtual void makVrv::DtOsgGlStudioCockpit::slot_channelModified ( const std::string &  deName,
const std::string &  windowName,
const std::string &  channelName,
const DtChannelConfiguration config 
)
protectedvirtual

slot to be called when a channel configuration is modified

virtual void makVrv::DtOsgGlStudioCockpit::slot_smoothingEnabled ( bool  smooth)
protectedvirtual

slot to be called when the smooth is enabled or disabled

virtual void makVrv::DtOsgGlStudioCockpit::slot_smoothingPeriod ( const double period)
protectedvirtual

slot to be called when the smoothing period changes

virtual void makVrv::DtOsgGlStudioCockpit::slot_projectionChanged ( DtObserverObject ,
bool  is2D 
)
protectedvirtual

Member Data Documentation

DtAttributeUpdateMap makVrv::DtOsgGlStudioCockpit::myAttributeUpdaters
protected
DtDe& makVrv::DtOsgGlStudioCockpit::myDe
protected
DtUniqueID makVrv::DtOsgGlStudioCockpit::myId
protected
std::string makVrv::DtOsgGlStudioCockpit::myRsoName
protected
std::string makVrv::DtOsgGlStudioCockpit::myFilename
protected
double makVrv::DtOsgGlStudioCockpit::myWidth
protected
double makVrv::DtOsgGlStudioCockpit::myHeight
protected
DtPerspective makVrv::DtOsgGlStudioCockpit::myPerspective
protected
bool makVrv::DtOsgGlStudioCockpit::myRenderAsOverlay
protected
std::string makVrv::DtOsgGlStudioCockpit::myChannelKeyword
protected
double makVrv::DtOsgGlStudioCockpit::myOffsetX
protected
double makVrv::DtOsgGlStudioCockpit::myOffsetY
protected
double makVrv::DtOsgGlStudioCockpit::myOffsetZ
protected
double makVrv::DtOsgGlStudioCockpit::myDynamicScaleX
protected
double makVrv::DtOsgGlStudioCockpit::myDynamicScaleY
protected
double makVrv::DtOsgGlStudioCockpit::myDynamicScaleZ
protected
double makVrv::DtOsgGlStudioCockpit::myDynamicRotateX
protected
double makVrv::DtOsgGlStudioCockpit::myDynamicRotateY
protected
double makVrv::DtOsgGlStudioCockpit::myDynamicRotateZ
protected
std::string makVrv::DtOsgGlStudioCockpit::myObserverName
protected
bool makVrv::DtOsgGlStudioCockpit::myIsVisible
protected
bool makVrv::DtOsgGlStudioCockpit::myObserverIs2D
protected
bool makVrv::DtOsgGlStudioCockpit::myRenderCockpitOnly
protected
osg::ref_ptr<osg::Group> makVrv::DtOsgGlStudioCockpit::myGlStudioGroup
protected
osg::ref_ptr<osg::Group> makVrv::DtOsgGlStudioCockpit::myGlStudioPost2DGroup
protected
osg::ref_ptr<osg::Group> makVrv::DtOsgGlStudioCockpit::myGlStudio3DGroup
protected
osg::ref_ptr<osg::Switch> makVrv::DtOsgGlStudioCockpit::myViewSwitchNode
protected
osg::ref_ptr<osg::MatrixTransform> makVrv::DtOsgGlStudioCockpit::myMatrixTransform
protected
DtChannelSpecificGroup* makVrv::DtOsgGlStudioCockpit::myChannelNode
protected
DtGlStudioDrawable* makVrv::DtOsgGlStudioCockpit::myGlStudioComponent
protected
DtGlStudioEventProcessor* makVrv::DtOsgGlStudioCockpit::myEventProcessor
protected
DtSceneObject* makVrv::DtOsgGlStudioCockpit::myHostSceneObject
protected
bool makVrv::DtOsgGlStudioCockpit::myHasSmootherValues
protected
DtExponentialSmoother makVrv::DtOsgGlStudioCockpit::mySmoother
protected
DtClock makVrv::DtOsgGlStudioCockpit::myClock
protected
double makVrv::DtOsgGlStudioCockpit::myPreviousTime
protected
double makVrv::DtOsgGlStudioCockpit::myCurrentTime
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)