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

The DtTacticalGraphicModelUpdaterManager class manages tactical graphics that want to be updated by changes to camera orientation or zoom level. More...

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

Classes

struct  ChannelUpdateData
 Structure used to supply data to callback. More...

Public Types

typedef boost::function< void(ChannelUpdateData)> ChannelUpdateCallback
 Function prototype for adding callback method to the model update manager.

Public Member Functions

 DtTacticalGraphicModelUpdaterManager (DtDe &)
 CTOR.
virtual ~DtTacticalGraphicModelUpdaterManager ()
 DTOR.
virtual void add (int identifier, ChannelUpdateCallback)
 Adds a new item to be notified on channel update.
virtual void remove (int)
 Removes an item to be notified on channel update.
virtual bool isRegistered (int) const
 Return true if this identifier is registered with the manager.
virtual double viewResolution (DtChannel *)
 Returns the current camera view resolution for the given channel.
virtual ChannelUpdateData channelUpdateData (DtChannel *)
 Given a channel return an update data structure that would be sent if that channel were updated.
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static
DtTacticalGraphicModelUpdaterManager
instance (DtDe &de)
 Get the creator instance for this IG object.
static void registerInstance (DtDe &de, DtTacticalGraphicModelUpdaterManager *anInstance)
 Register the creator instance with an IG.

Protected Types

typedef std::map< int,
ChannelUpdateCallback
CallbacksList
typedef std::map< DtChannel
*, ChannelUpdateData
ChannelUpdateDataMap
 Current channel update data such that can check if channel updates need to be called.

Protected Member Functions

virtual void slot_channelUpdated (DtChannelManager *, DtChannel *channel)
 Slot called each tick for current camera.
virtual void slot_channelToBeDestroyed (DtChannelManager *, DtChannel *channel)
 Called when a channel is about to be destroyed will clean up any channel update data.
void initializeTerrainInformation ()
 Stores terrain information, if exists, and adds callbacks for patches added and removed to update terrain bounds information.
virtual void terrainChanged (const DtTerrainPatch &)
 Called when a terrain patch is added or deleted, will set compute flag to true to recompute bounding volume.
virtual double computeHighestTerrainPoint (DtChannel *) const
 Computes highest point of terrain.

Protected Attributes

DtDemyDe
CallbacksList myCallbacks
ChannelUpdateDataMap myChannelUpdateData
double myHighestTerrainPoint
 Calculated height above terrain of the highest point of the terrain based on its bounding sphere.
bool myComputeHighestTerrainPoint
 Set to true if bounding volume of terrain needs to be recalculated on next access.

Detailed Description

The DtTacticalGraphicModelUpdaterManager class manages tactical graphics that want to be updated by changes to camera orientation or zoom level.

The items will only be notified if either of those changes occur

Member Typedef Documentation

Function prototype for adding callback method to the model update manager.

Current channel update data such that can check if channel updates need to be called.

Constructor & Destructor Documentation

makVrv::DtTacticalGraphicModelUpdaterManager::DtTacticalGraphicModelUpdaterManager ( DtDe )

CTOR.

virtual makVrv::DtTacticalGraphicModelUpdaterManager::~DtTacticalGraphicModelUpdaterManager ( )
virtual

DTOR.

Member Function Documentation

static DtTacticalGraphicModelUpdaterManager& makVrv::DtTacticalGraphicModelUpdaterManager::instance ( DtDe de)
static

Get the creator instance for this IG object.

Exceptions
DtCorruptedStateif it is unable to get the instance.
static void makVrv::DtTacticalGraphicModelUpdaterManager::registerInstance ( DtDe de,
DtTacticalGraphicModelUpdaterManager anInstance 
)
static

Register the creator instance with an IG.

virtual void makVrv::DtTacticalGraphicModelUpdaterManager::add ( int  identifier,
ChannelUpdateCallback   
)
virtual

Adds a new item to be notified on channel update.

Will check identifier to see if there is already a callback for it, and, if there is, will not replace

virtual void makVrv::DtTacticalGraphicModelUpdaterManager::remove ( int  )
virtual

Removes an item to be notified on channel update.

virtual bool makVrv::DtTacticalGraphicModelUpdaterManager::isRegistered ( int  ) const
virtual

Return true if this identifier is registered with the manager.

virtual double makVrv::DtTacticalGraphicModelUpdaterManager::viewResolution ( DtChannel )
virtual

Returns the current camera view resolution for the given channel.

virtual ChannelUpdateData makVrv::DtTacticalGraphicModelUpdaterManager::channelUpdateData ( DtChannel )
virtual

Given a channel return an update data structure that would be sent if that channel were updated.

virtual void makVrv::DtTacticalGraphicModelUpdaterManager::slot_channelUpdated ( DtChannelManager ,
DtChannel channel 
)
protectedvirtual

Slot called each tick for current camera.

Will only go through notification list if changed since last tick

virtual void makVrv::DtTacticalGraphicModelUpdaterManager::slot_channelToBeDestroyed ( DtChannelManager ,
DtChannel channel 
)
protectedvirtual

Called when a channel is about to be destroyed will clean up any channel update data.

void makVrv::DtTacticalGraphicModelUpdaterManager::initializeTerrainInformation ( )
protected

Stores terrain information, if exists, and adds callbacks for patches added and removed to update terrain bounds information.

virtual void makVrv::DtTacticalGraphicModelUpdaterManager::terrainChanged ( const DtTerrainPatch )
protectedvirtual

Called when a terrain patch is added or deleted, will set compute flag to true to recompute bounding volume.

virtual double makVrv::DtTacticalGraphicModelUpdaterManager::computeHighestTerrainPoint ( DtChannel ) const
protectedvirtual

Computes highest point of terrain.

If terrain is a global terrain use earth radius

Member Data Documentation

DtDe& makVrv::DtTacticalGraphicModelUpdaterManager::myDe
protected
CallbacksList makVrv::DtTacticalGraphicModelUpdaterManager::myCallbacks
protected
ChannelUpdateDataMap makVrv::DtTacticalGraphicModelUpdaterManager::myChannelUpdateData
protected
double makVrv::DtTacticalGraphicModelUpdaterManager::myHighestTerrainPoint
protected

Calculated height above terrain of the highest point of the terrain based on its bounding sphere.

bool makVrv::DtTacticalGraphicModelUpdaterManager::myComputeHighestTerrainPoint
protected

Set to true if bounding volume of terrain needs to be recalculated on next access.


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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)