VR-Forces 4.0.4 Class Documentation
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]

List of all members.

Public Member Functions

 DtObserverEventProcessor (DtInputDriver &inputDriver, DtDe &de)
 CTOR.
virtual ~DtObserverEventProcessor ()
 DTOR.
bool isMouseLooking () const
bool isTerrainDragging () const
bool isTerrainOrbitDragging () const
bool isViewDragging () const
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 const std::string & className ()
 Returns the name of the processor class, to be used for identifying an event processor.
void processRightClickOnSelection (DtChannel &channel, const DtUniqueID &objectId, const DtMouseState &mouseState)
 Process a mouse right click on selection event.

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

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

Protected Attributes

DtDemyDe
DtInputDrivermyInputDriver
std::string myName
bool myIsMouseLooking
double myLastMouseLookX
double myLastMouseLookY
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

Detailed Description

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


Constructor & Destructor Documentation

CTOR.

DTOR.


Member Function Documentation

void makVrv::DtObserverEventProcessor::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).

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 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.

void makVrv::DtObserverEventProcessor::processRightClickOnSelection ( DtChannel channel,
const DtUniqueID objectId,
const DtMouseState mouseState 
)

Process a mouse right click on selection event.

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

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

void makVrv::DtObserverEventProcessor::processObjectMousedOn ( DtObserver observer,
DtChannel channel,
const DtMouseEvent mouseEvent,
const DtIntersectorResult isectResult 
) [protected]
void makVrv::DtObserverEventProcessor::processTerrainMousedOn ( DtObserver observer,
DtChannel channel,
const DtMouseEvent mouseEvent,
const DtIntersectorResult isectResult 
) [protected]
void makVrv::DtObserverEventProcessor::showMouse ( DtChannel channel) [protected]
void makVrv::DtObserverEventProcessor::hideMouse ( DtChannel channel,
const DtMouseEvent mouseEvent 
) [protected]
void makVrv::DtObserverEventProcessor::viewDrag ( DtObserver ,
DtChannel ,
const DtMouseEvent  
) [protected]
void makVrv::DtObserverEventProcessor::mouseLook ( DtObserver ,
DtChannel ,
const DtMouseEvent  
) [protected]
void makVrv::DtObserverEventProcessor::dragTerrain ( DtObserver ,
DtChannel ,
const DtMouseEvent  
) [protected]
void makVrv::DtObserverEventProcessor::scrollLevelObserverByWheel ( DtObserver observer,
DtChannel channel,
const DtMouseEvent mouseEvent 
) [protected]
void makVrv::DtObserverEventProcessor::changeViewResolutionByWheel ( DtObserver observer,
DtChannel channel,
const DtMouseEvent mouseEvent 
) [protected]
void makVrv::DtObserverEventProcessor::changeObserverSpeedByWheel ( DtObserver observer,
DtChannel channel,
const DtMouseEvent me 
) [protected]
void makVrv::DtObserverEventProcessor::rotate2DObserver ( DtObserver ,
double  xDelta,
double  yDelta 
) [protected]

Get the element type by id.


Member Data Documentation

This bool says we're really terrain dragging.

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

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

Use the virual mouse for the quadrants


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)