![]() |
VR-Forces 4.0.4 Class Documentation
|
The Scene event processor handles user interaction with the observer and the scene. More...

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 | |
| DtDe & | myDe |
| DtInputDriver & | myInputDriver |
| 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 |
The Scene event processor handles user interaction with the observer and the scene.
| makVrv::DtObserverEventProcessor::DtObserverEventProcessor | ( | DtInputDriver & | inputDriver, |
| DtDe & | de | ||
| ) |
CTOR.
| virtual makVrv::DtObserverEventProcessor::~DtObserverEventProcessor | ( | ) | [virtual] |
DTOR.
| 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.
| 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.
| 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::startViewDrag | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::continueViewDrag | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::stopViewDrag | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::mouseLook | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::startMouseLook | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::continueMouseLook | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::stopMouseLook | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::dragTerrain | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::startDragTerrain | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::continueDragTerrain | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::stopDragTerrain | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::scrollLevelObserverByWheel | ( | DtObserver & | observer, |
| DtChannel & | channel, | ||
| const DtMouseEvent & | mouseEvent | ||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::moveObserverByWheel | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::changeViewMagnificationByWheel | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::changeViewResolutionByWheel | ( | DtObserver & | observer, |
| DtChannel & | channel, | ||
| const DtMouseEvent & | mouseEvent | ||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::resetMagnification | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::changeObserverSpeedByWheel | ( | DtObserver & | observer, |
| DtChannel & | channel, | ||
| const DtMouseEvent & | me | ||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::moveObserverOverTerrain | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::orbitObserverOverTerrain | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::pickIntoScene | ( | DtObserver & | , |
| DtChannel & | , | ||
| const DtMouseEvent & | |||
| ) | [protected] |
| void makVrv::DtObserverEventProcessor::rotate2DObserver | ( | DtObserver & | , |
| double | xDelta, | ||
| double | yDelta | ||
| ) | [protected] |
| DtElementEntry::ObjectType makVrv::DtObserverEventProcessor::typeFromId | ( | const DtUniqueID & | id | ) | [protected] |
Get the element type by id.
DtDe& makVrv::DtObserverEventProcessor::myDe [protected] |
std::string makVrv::DtObserverEventProcessor::myName [protected] |
double makVrv::DtObserverEventProcessor::myLastMouseLookX [protected] |
double makVrv::DtObserverEventProcessor::myLastMouseLookY [protected] |
This bool says we're really terrain dragging.
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] |