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 | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtObserverEventProcessor Class Reference

The Scene event processor handles user interaction with the observer and the scene. More...

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

Public Member Functions

 DtObserverEventProcessor (DtInputDriver &inputDriver, DtDe &de)
 CTOR.
virtual ~DtObserverEventProcessor ()
 DTOR.
virtual bool isMouseLooking () const
virtual bool isTerrainDragging () const
virtual bool isTerrainOrbitDragging () const
virtual bool isViewDragging () const
virtual void getHiddenMousePosition (int &mouseX, int &mouseY)
 in the case where the mouse is hidden (because it's being warped to the center of the screen during a drag operation) get the location of the mouse when the operation was initiated (and where the mouse will warp back to on completion).
virtual bool processMouseEvent (const DtMouseEvent &ev, DtChannel &channel)
 Processes a mouse event on the channel.
virtual bool processKeyboardEvent (const DtKeyEvent &ev, DtChannel &channel)
 Processes a keyboard event on the channel.
virtual bool processPinchGesture (const DtPinchGesture &ev, DtChannel &channel)
 Processes a pinch gesture event on the channel.
virtual const std::string & className ()
 Returns the name of the processor class, to be used for identifying an event processor.
- Public Member Functions inherited from makVrv::DtEventProcessorInterface
 DtEventProcessorInterface ()
 CTOR.
virtual ~DtEventProcessorInterface ()
 DTOR.
virtual void setEnabled (bool b)
 Get/set enabled flag.
bool enabled () const

Static Public Member Functions

static bool isJumpToEvent (DtMouseEvent::EventType mouseEventType, DtMouseState::MouseModifier mouseModifiers, DtElementEntry::ObjectType type)
 Check to see if a mouse event is a jumpTo event for the given object type.
static bool isAttachToEvent (DtMouseEvent::EventType mouseEventType, DtMouseState::MouseModifier mouseModifiers, DtElementEntry::ObjectType type)
 Check to see if a mouse event is a attachTo event for the given object type.

Protected Member Functions

virtual void setFlashlightControlEnabled (bool enabled)
virtual void processObjectMousedOn (DtObserver &observer, DtChannel &channel, const DtMouseEvent &mouseEvent, const DtIntersectorResult &isectResult)
virtual void processTerrainMousedOn (DtObserver &observer, DtChannel &channel, const DtMouseEvent &mouseEvent, const DtIntersectorResult &isectResult)
virtual void showMouse (DtChannel &channel)
virtual void hideMouse (DtChannel &channel, const DtMouseEvent &mouseEvent)
virtual void viewDrag (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void startViewDrag (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void continueViewDrag (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void stopViewDrag (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void mouseLook (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void startMouseLook (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void continueMouseLook (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void stopMouseLook (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void dragTerrain (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void startDragTerrain (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void continueDragTerrain (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void stopDragTerrain (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void scrollLevelObserverByWheel (DtObserver &observer, DtChannel &channel, const DtMouseEvent &mouseEvent)
virtual void moveObserverByWheel (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void changeViewMagnificationByWheel (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void changeViewResolutionByWheel (DtObserver &observer, DtChannel &channel, const DtMouseEvent &mouseEvent)
virtual void resetMagnification (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void changeObserverSpeedByWheel (DtObserver &observer, DtChannel &channel, const DtMouseEvent &me)
virtual void moveObserverOverTerrain (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void orbitObserverOverTerrain (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void pickIntoScene (DtObserver &, DtChannel &, const DtMouseEvent &)
virtual void rotate2DObserver (DtObserver &, double xDelta, double yDelta)
virtual DtObserverfindObserverForChannel (const DtChannel &channel)
virtual DtElementEntry::ObjectType typeFromId (const DtUniqueID &id)
 Get the element type by id.

Protected Attributes

DtDemyDe
DtInputDrivermyInputDriver
std::string myName
bool myIsMouseLooking
bool myFlashlightControlOn
bool myIsTerrainDragging
 This bool says we're really terrain dragging.
bool myIsTerrainOrbitDragging
DtMouseEvent myLastTerrainDragMouseEvent
bool myIsViewDragging
double myLastViewDragX
double myLastViewDragY
int myHiddenMouseX
int myHiddenMouseY
double myDragStartX
double myDragStartY
double myDragStartZ
char myQuadrant
 The quadrant the mouse was pressed into – 1 upper left, 2 upper right 3 lower right, 4 lower left.
double myVirtualMouseX
 For 2D rotate, keep a "virtual" mouse to keep the actual mouse centered.
double myVirtualMouseY
double myHalfWindowWidth
double myHalfWindowHeight
DtSignalConnectionManager myConnections
int myMouseLookEventCount
 This variable keep track of the mouse move event(exclued the center mouse event) count during the mouse look.
double myLastMouseDragTime
 variables for keeping track of when the last
double myLastMouseX
double myLastMouseY
- Protected Attributes inherited from makVrv::DtEventProcessorInterface
bool myEnabled

Detailed Description

The Scene event processor handles user interaction with the observer and the scene.

Constructor & Destructor Documentation

makVrv::DtObserverEventProcessor::DtObserverEventProcessor ( DtInputDriver inputDriver,
DtDe de 
)

CTOR.

virtual makVrv::DtObserverEventProcessor::~DtObserverEventProcessor ( )
virtual

DTOR.

Member Function Documentation

virtual bool makVrv::DtObserverEventProcessor::isMouseLooking ( ) const
virtual
virtual bool makVrv::DtObserverEventProcessor::isTerrainDragging ( ) const
virtual
virtual bool makVrv::DtObserverEventProcessor::isTerrainOrbitDragging ( ) const
virtual
virtual bool makVrv::DtObserverEventProcessor::isViewDragging ( ) const
virtual
virtual void makVrv::DtObserverEventProcessor::getHiddenMousePosition ( int mouseX,
int mouseY 
)
virtual

in the case where the mouse is hidden (because it's being warped to the center of the screen during a drag operation) get the location of the mouse when the operation was initiated (and where the mouse will warp back to on completion).

This is only valid when isViewDragging() or isMouseLooking() is true.

virtual bool makVrv::DtObserverEventProcessor::processMouseEvent ( const DtMouseEvent ev,
DtChannel channel 
)
virtual

Processes a mouse event on the channel.

Should return true if the event is handled successfully, and false to reject it and pass it on to the next event processor.

Implements makVrv::DtEventProcessorInterface.

virtual bool makVrv::DtObserverEventProcessor::processKeyboardEvent ( const DtKeyEvent ev,
DtChannel channel 
)
virtual

Processes a keyboard event on the channel.

Should return true if the event is handled successfully, and false to reject it and pass it on to the next event processor.

Implements makVrv::DtEventProcessorInterface.

virtual bool makVrv::DtObserverEventProcessor::processPinchGesture ( const DtPinchGesture ev,
DtChannel channel 
)
virtual

Processes a pinch gesture event on the channel.

Should return true if the event should be consumed, and false to reject it and pass it on to the next event processor.

Reimplemented from makVrv::DtEventProcessorInterface.

virtual const std::string& makVrv::DtObserverEventProcessor::className ( )
virtual

Returns the name of the processor class, to be used for identifying an event processor.

Implements makVrv::DtEventProcessorInterface.

static bool makVrv::DtObserverEventProcessor::isJumpToEvent ( DtMouseEvent::EventType  mouseEventType,
DtMouseState::MouseModifier  mouseModifiers,
DtElementEntry::ObjectType  type 
)
static

Check to see if a mouse event is a jumpTo event for the given object type.

static bool makVrv::DtObserverEventProcessor::isAttachToEvent ( DtMouseEvent::EventType  mouseEventType,
DtMouseState::MouseModifier  mouseModifiers,
DtElementEntry::ObjectType  type 
)
static

Check to see if a mouse event is a attachTo event for the given object type.

virtual void makVrv::DtObserverEventProcessor::setFlashlightControlEnabled ( bool  enabled)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::processObjectMousedOn ( DtObserver observer,
DtChannel channel,
const DtMouseEvent mouseEvent,
const DtIntersectorResult isectResult 
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::processTerrainMousedOn ( DtObserver observer,
DtChannel channel,
const DtMouseEvent mouseEvent,
const DtIntersectorResult isectResult 
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::showMouse ( DtChannel channel)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::hideMouse ( DtChannel channel,
const DtMouseEvent mouseEvent 
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::viewDrag ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::startViewDrag ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::continueViewDrag ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::stopViewDrag ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::mouseLook ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::startMouseLook ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::continueMouseLook ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::stopMouseLook ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::dragTerrain ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::startDragTerrain ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::continueDragTerrain ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::stopDragTerrain ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::scrollLevelObserverByWheel ( DtObserver observer,
DtChannel channel,
const DtMouseEvent mouseEvent 
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::moveObserverByWheel ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::changeViewMagnificationByWheel ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::changeViewResolutionByWheel ( DtObserver observer,
DtChannel channel,
const DtMouseEvent mouseEvent 
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::resetMagnification ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::changeObserverSpeedByWheel ( DtObserver observer,
DtChannel channel,
const DtMouseEvent me 
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::moveObserverOverTerrain ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::orbitObserverOverTerrain ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::pickIntoScene ( DtObserver ,
DtChannel ,
const DtMouseEvent  
)
protectedvirtual
virtual void makVrv::DtObserverEventProcessor::rotate2DObserver ( DtObserver ,
double  xDelta,
double  yDelta 
)
protectedvirtual
virtual DtObserver* makVrv::DtObserverEventProcessor::findObserverForChannel ( const DtChannel channel)
protectedvirtual
virtual DtElementEntry::ObjectType makVrv::DtObserverEventProcessor::typeFromId ( const DtUniqueID id)
protectedvirtual

Get the element type by id.

Member Data Documentation

DtDe& makVrv::DtObserverEventProcessor::myDe
protected
DtInputDriver& makVrv::DtObserverEventProcessor::myInputDriver
protected
std::string makVrv::DtObserverEventProcessor::myName
protected
bool makVrv::DtObserverEventProcessor::myIsMouseLooking
protected
bool makVrv::DtObserverEventProcessor::myFlashlightControlOn
protected
bool makVrv::DtObserverEventProcessor::myIsTerrainDragging
protected

This bool says we're really terrain dragging.

bool makVrv::DtObserverEventProcessor::myIsTerrainOrbitDragging
protected
DtMouseEvent makVrv::DtObserverEventProcessor::myLastTerrainDragMouseEvent
protected
bool makVrv::DtObserverEventProcessor::myIsViewDragging
protected
double makVrv::DtObserverEventProcessor::myLastViewDragX
protected
double makVrv::DtObserverEventProcessor::myLastViewDragY
protected
int makVrv::DtObserverEventProcessor::myHiddenMouseX
protected
int makVrv::DtObserverEventProcessor::myHiddenMouseY
protected
double makVrv::DtObserverEventProcessor::myDragStartX
protected
double makVrv::DtObserverEventProcessor::myDragStartY
protected
double makVrv::DtObserverEventProcessor::myDragStartZ
protected
char makVrv::DtObserverEventProcessor::myQuadrant
protected

The quadrant the mouse was pressed into – 1 upper left, 2 upper right 3 lower right, 4 lower left.

double makVrv::DtObserverEventProcessor::myVirtualMouseX
protected

For 2D rotate, keep a "virtual" mouse to keep the actual mouse centered.

Use the virual mouse for the quadrants

double makVrv::DtObserverEventProcessor::myVirtualMouseY
protected
double makVrv::DtObserverEventProcessor::myHalfWindowWidth
protected
double makVrv::DtObserverEventProcessor::myHalfWindowHeight
protected
DtSignalConnectionManager makVrv::DtObserverEventProcessor::myConnections
protected
int makVrv::DtObserverEventProcessor::myMouseLookEventCount
protected

This variable keep track of the mouse move event(exclued the center mouse event) count during the mouse look.

double makVrv::DtObserverEventProcessor::myLastMouseDragTime
protected

variables for keeping track of when the last

double makVrv::DtObserverEventProcessor::myLastMouseX
protected
double makVrv::DtObserverEventProcessor::myLastMouseY
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)