VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
makVrf::DtVrfInputDriver Class Reference

Subclass to allow the channel to change on mouse movement. More...

Inheritance diagram for makVrf::DtVrfInputDriver:
Inheritance graph
[legend]

Public Member Functions

 DtVrfInputDriver (makVrv::DtAgentManager &agentManager, const std::string &instanceName)
 CTOR.
virtual ~DtVrfInputDriver ()
 DTOR.
virtual void setChangeCurrentChannelOnMouseMove (bool)
 Sets a flag that will override the channel changing behavior on mouse movement. Default is false.
bool changeCurrentChannelOnMouseMove () const
virtual bool processMouseEvent (const makVrv::DtMouseEvent &mouseEvent, makVrv::DtChannel *channel)
 handle a mouse event from our listener
- Public Member Functions inherited from makVrv::DtInputDriver
 DtInputDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR.
virtual ~DtInputDriver ()
 DTOR.
virtual bool onStart ()
 Create and initialize our listener.
virtual bool onStop ()
 Uninitialize and destroy our listener.
virtual bool onTick ()
 Tick our keyboard/mouse listener.
virtual const std::string & className () const
 Get the class name for the input driver.
virtual bool processKeyEvent (const DtKeyEvent &keyEvent, DtChannel *channel)
 handle a key event from our listener
virtual bool processPinchGesture (const DtPinchGesture &pinchGesture, DtChannel *channel)
virtual void hideMouse (DtChannel *channel, float mouseX, float mouseY)
 hide the mouse cursor
virtual bool isMouseHidden () const
 Check to see if the mouse is hidden.
virtual void showMouse (DtChannel *channel)
 show the mouse cursor
virtual void centerMouse (DtChannel *channel)
 warp the mouse cursor to the center of the view
virtual void setMousePosition (DtChannel *channel, float x, float y)
 warp the mouse cursor to the given window position
virtual void clearState ()
 clear any remembered keyboard modifiers and stop any observer motion
DtChannelcurrentChannel () const
 the last channel a mouse or keyboard event was received in.
virtual void addEventProcessorToFront (DtEventProcessorInterface *epi)
 This transfers resource management of the event processor to the input driver.
virtual void addEventProcessorToBack (DtEventProcessorInterface *epi)
 Add an event processor to the driver.
virtual EventProcessorListeventProcessorList ()
 Get the list of event processors.
virtual DtEventProcessorInterfacefindEventProcessor (const std::string &className)
 Find an event processor owned by the input driver that has the specified class name.
virtual void removeEventProcessor (DtEventProcessorInterface *epi)
 Remove an event processor from the driver.
bool saveKeyMapToFile (const DtKeyMap &keyMap, const std::string &filename) const
 Save a key map to a file.
DtKeyMaploadKeyMapFromFile (const std::string &filename, bool createBackup=false)
 Save a key map to a file.
void setKeyMap (const std::string &mapName)
 explicitly set a key map
const std::string & keyMap () const
 Get the name of the current keyMap.
DtKeyMapcreateKeyMap (const std::string &mapName)
 create a (blank) key map
DtKeyMapfindKeyMap (const std::string &mapName)
 lookup a key map
void addKeyBinding (DtKeyMap *map, DtKeyState::KeyType key, std::string functionName, DtKeyState::KeyModifier modifiers=DtKeyState::NO_MODIFIER, bool replace=false, DtKeyEvent::KeyEventType eventType=DtKeyEvent::KEY_DOWN)
 bind a key down or key up event (possibly modified) to a function name
void addBinaryKeyBinding (DtKeyMap *map, DtKeyState::KeyType key, std::string binaryName, DtKeyState::KeyModifier modifiers=DtKeyState::NO_MODIFIER, bool replace=false)
 bind the up and down events for a key (possibly modified) to a binary function set
virtual void realizeConfiguration (const DtInputDriverConfiguration &configuration)
 Realize the driver using the configuration.
virtual void realizeObserverConfiguration (const DtObserverConfiguration &configuration)
const ObserverConfigurationMapobserverConfigurations () const
void addObserverConfiguration (const DtObserverConfiguration &config)
 name is already in the config...
void addObserverState (const std::string &observerName, const makArchives::DtObserverStateRecord &stateRecord)
 put this state onto the observerState map and, if the observer currently exists, set its state from this record
void initializeObserver (DtObserver *observer, const makArchives::DtObserverStateRecord &stateRecord)
 set the state of the specified observer from stateRecord.
virtual void addObserver (DtObserver *observer)
 Observer Management.
virtual void removeObserver (DtObserver *observer)
 Remove an observer object from the manager.
virtual void removeObserver (const std::string &name)
 Remove an observer object from the manager.
virtual std::vector< DtObserver * > observers () const
 Get a list of all observers.
void setCurrentObserver (const std::string &observerName)
 Set the current observer by name.
DtObservercurrentObserver () const
 Get the current observer.
void setTerrainContextEnabled (bool enabled)
 Set whether terrain context menus are enabed.
bool terrainContextEnabled () const
virtual void performObserverAction (DtViewStateProcessor::ObserverAction &action)
 View controls:
virtual void toggleTerrainScaling ()
 Toggle terrain scaling on or off.
virtual void incrementTerrainScaleFactor ()
 Increment terrain scale factor.
virtual void decrementTerrainScaleFactor ()
 Decrement terrain scale factor.
virtual void toggleEntityLabels ()
 Toggle entity labels on or off.
virtual void toggleRotateEntitySymbols ()
 Toggle entity symbol rotate on or off.
virtual void toggleTacticalGraphics ()
 Toggle tactical graphics display on or off.
virtual void toggleEntityHatLines ()
 Toggle entity height above terrain lines display on or off.
virtual void toggleTacticalGraphicsHatLines ()
 Toggle tactical graphics height above terrain lines display on or off.
virtual void toggleEntityHatMode ()
 Toggle entity height above terrain mode.
virtual void toggleTacticalGraphicsHatMode ()
 Toggle tactical graphics height above terrain mode.
virtual void togglePropTransparencySelected ()
 Toggles the transparency of all selected props.
virtual void toggleViewControl ()
 Toggle global listening to view controls (does not affect VR-Link driver view control listening overrides)
void resetObservers (DtUniqueID id)
 Reset all of the observers to the unique id.
void setAllowObserverReset (bool allow)
 Control whether reset observers functions or not.
void saveObservers (const std::string &filename)
 Create an observer settings file.
void loadObservers (const std::string &filename, bool force=false)
 Load an observer settings file.
DtElementEntry::ObjectType typeFromId (const DtUniqueID &id)
virtual void animateObserver (DtObserverAnimator *newAnimator)
 Animate an observer to a given absolute location and orientation.
virtual void removeAnimatorFromObserver (DtObserver *observer)
 Remove the animator associated with the specified observer.
virtual DtObserverfindObserverByName (const std::string &name)
 Find an observer by its name.
virtual const DtObserverfindObserverByName (const std::string &name) const
 Find an observer by its name.
- Public Member Functions inherited from makVrv::DtDriver
 DtDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR.
virtual ~DtDriver ()
 DTOR.
virtual void realizeConfiguration (const DtConfiguration &configuration)
 Realize the driver using the configuration.
virtual DtConfiguration createConfiguration () const
 Create a configuration for the driver.
DtAgentManageragentManager ()
 Get the master scene for this host.
virtual DtAgentManagerInterfacesceneInterface ()
 Get the scene manager interface for creating agents.
bool started () const
 Get this driver's active state.
virtual const std::string & instanceName () const
 Get this driver's instance name.
virtual bool autoStart () const
 Get whether this driver is set to automatically start if it is persistent.
virtual void setAutoStart (bool autoStart)
 Set whether this driver automatically starts if it is persistent.
virtual bool isWindowDependent () const
 Get whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.
virtual void setIsWindowDependent (bool dep)
 Set whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.
virtual void setIsUserControllable (bool)
 Set whether this driver can be started and stopped by the user.
virtual bool isUserControllable () const
 Get whether this driver can be started and stopped by the user.
virtual void setIsPersistent (bool per)
 Set if the driver is persistent and should be saved between runs.
virtual bool isPersistent () const
 Get if the driver is persistent and should be saved between runs.
virtual bool isOnDriverSelectionList () const
 Returns whether or not this driver is to be automatically started/stopped from the driver selection list.
virtual void setOnDriverSelectionList (bool)
 Sets whether or not this item is on the driver selection list.
bool objectFromAgentManager (const DtUniqueID &id) const
 check to see if the object was created using this driver's agent manager.

Protected Attributes

bool myChangeCurrentChannelOnMouseMove
- Protected Attributes inherited from makVrv::DtInputDriver
DtDemyDe
EventProcessorList myEventProcessors
ObserversMap myObservers
DtObserverControllermyObserverController
ObserverConfigurationMap myObserverConfigurations
ObserverStateMap myObserverStates
std::string myClassName
DtKeyAndMouseEventListenermyKeyAndMouseEventListener
DtObservermyCurrentObserver
 Temp, so we can look this up ONCE each event.
bool myAllowResetFlag
 Control whether observers can be reset.
bool myIsTerrainContextEnabled
 Switch to enable or disable terrain context menus;.
DtChannelmyCurrentChannel
DtKeyMapManagermyCachedKeyMapManager
bool mySyncingObservers
std::list< DtObserverAnimator * > myAnimatingObservers
- Protected Attributes inherited from makVrv::DtDriver
DtAgentManagermyAgentManager
bool myStartedFlag
std::string myName
DtConfiguration myConfiguration
bool myPersistentFlag
bool myUserControllableFlag
bool myRequestStateDiffPendingFlag
DtElementChanges myChanges

Additional Inherited Members

- Public Types inherited from makVrv::DtInputDriver
typedef std::list
< DtEventProcessorInterface * > 
EventProcessorList
 A list of DtEventProcessorInterface, called in order for each event until one handles it.
typedef std::map< std::string,
makArchives::DtObserverStateRecord
ObserverStateMap
 A map of observer names, to DtObserverStateRecords.
typedef std::map< std::string,
DtObserverConfiguration
ObserverConfigurationMap
 A map of observer names, to DtObserverConfigurations.
- Protected Types inherited from makVrv::DtInputDriver
typedef std::map< std::string,
DtObserver * > 
ObserversMap
 Observer Manager bound.
- Protected Member Functions inherited from makVrv::DtInputDriver
void setCurrentObserver (DtObserver *observer)
virtual void initializeKeyMapManager (const std::string &defaultKeyMap)
 This will eventually load up key maps.
virtual void bindFunctions ()
virtual void createMaps ()
 This creates the default key maps by hand. Kept around for now.
virtual void loadMaps (bool loadFromFactory=false)
 Load all the key maps (*.kmpx) files in the $APP_DIR/settings directory.
void removeObserver (ObserversMap &observers, DtObserver *observer)
void removeObserver (ObserversMap &observers, const std::string &name)
void destroyObservers ()
bool setCurrentObserverFromChannel (const DtChannel &channel)
void slot_channelCreated (DtChannelManager *channelManager, DtChannel *channel)
void slot_channelDestroyed (DtChannelManager *channelManager, DtChannel *channel)
void slot_channelConfigurationModified (const std::string &deName, const std::string &winName, const std::string &oldChannelName, const DtChannelConfiguration &config)
void slot_attachedToChanged (DtObserver *observer)
void createRequiredObservers (const std::string &engineName)
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 Called when a display engine is added. Restarts this driver.
std::string restoreObserversPart1 ()
 Create a temporary observer settings file using a default filename - called when a display engine is added, before shutting down.
void restoreObserversPart2 (const std::string &filename)
 Loads a temporary observer settings file and deletes the file.
virtual void slot_displayEngineRealized (const std::string &, const std::string &engineName)

Detailed Description

Subclass to allow the channel to change on mouse movement.

Constructor & Destructor Documentation

makVrf::DtVrfInputDriver::DtVrfInputDriver ( makVrv::DtAgentManager agentManager,
const std::string &  instanceName 
)

CTOR.

virtual makVrf::DtVrfInputDriver::~DtVrfInputDriver ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrf::DtVrfInputDriver::setChangeCurrentChannelOnMouseMove ( bool  )
virtual

Sets a flag that will override the channel changing behavior on mouse movement. Default is false.

bool makVrf::DtVrfInputDriver::changeCurrentChannelOnMouseMove ( ) const
inline
virtual bool makVrf::DtVrfInputDriver::processMouseEvent ( const makVrv::DtMouseEvent mouseEvent,
makVrv::DtChannel channel 
)
virtual

handle a mouse event from our listener

Reimplemented from makVrv::DtInputDriver.

Member Data Documentation

bool makVrf::DtVrfInputDriver::myChangeCurrentChannelOnMouseMove
protected

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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)