| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/interactionmode.h>

Public Member Functions | |
| InteractionMode () | |
| void | addInteractionTechnique (SO< InteractionTechnique > technique) |
| Adds a new InteractionTechnique. | |
| void | removeInteractionTechnique (SO< InteractionTechnique > technique) |
| Removes a InteractionTechnique. 'technique' must be a previously added technique. | |
| SO< Iterator< SO < InteractionTechnique > > > | interactionTechniqueIterator () const |
| Returns all currently registered interaction techniques. | |
| SO< OrientationConstraint > | getTechniqueConstraint (SO< InteractionTechnique > technique) const |
| For each technique a technique-specific constraint can be defined. | |
| void | setTechniqueConstraint (SO< InteractionTechnique > technique, SO< OrientationConstraint > constraint) |
| Assignes a Constraint for a InteractionTechnique. | |
| void | setActiveInteraction (SO< InteractionTechnique > technique) |
| The active interaction can be chosen explicitly from outside. | |
| SO< InteractionTechnique > | getActiveInteraction () const |
| Returns the currently active InteractionTechnique. | |
| void | selectActiveInteraction (SO< Event > event) |
| Changes the active interaction (if necessary) according to the given event. | |
| void | setDefaultActiveInteraction (SO< InteractionTechnique > technique) |
| 'technique' must be a previously added technique. | |
| void | setPhysicalModelSettings (SO< InteractionTechnique > technique, SO< PhysicalModelSettings > settings) |
| For each InteractionTechnique it can be chosen whether the resulting view parameters should be directly applied or passed to a physical spring model, which provides slightly delayed but always smooth movement and rotation. | |
| SO< PhysicalModelSettings > | getPhysicalModelSettings (SO< InteractionTechnique > technique) const |
| Returns the physical-model settings currently assigned to 'technique'. | |
| SO< InteractionConcept > | getParent () const |
| Provides access to the parent interaction concept. | |
| bool | preservingViewDirectionRequired () const |
| Used to determine whether the view direction must be preserved after a constraintchecker has refused or corrected a movement of this mode. | |
| virtual void | handle (SO< Event > event) |
| Called by the parent InteractionConcept for each incoming event. | |
| VRS_TYPEINFO (InteractionMode, SharedObj) | |
| VRS_SERIALIZABLE (InteractionMode) | |
Friends | |
| class | InteractionConcept |
E.g. a flyer metaphor can be combined with a click-and-fly technique and they can be used both without explicit switching, although at each time only one InteractionTechnique - the active one - has actually contol over the view parameters.
Each InteractionTechnique defines certain user events (e.g. certain mouse buttons or function keys or particular events) that are relevant inputs for it. For each user-event the first interaction in the list, for which the event is relevant, is chosen as active interaction.
Note: Combine only InteractionTechniques that are activated via different controls. E.g. when combining two metaphors each processing the left mouse button, only the first one will be considered.
For each InteractionTechnique, a InteractionMode allows to define a InteractionTechnique-specific constraint. This constraint ensures that the view parameters are always valid to be varied by the InteractionTechnique and it may ensure that the user has always a non-disorienting view. E.g. for a flyer it is useful to prevent the camera from looking into the sky and seeing nothing on the ground. When a InteractionTechnique is activated, the view is checked by the constraint first and corrected if necessary.
The InteractionMode is responsible for choosing the active interaction for each event. It receives the events from a InteractionConcept, selects (if necessary) a new active interaction according to the event type and passes the event to the active interaction.
| VRS::InteractionMode::InteractionMode | ( | ) |
| void VRS::InteractionMode::addInteractionTechnique | ( | SO< InteractionTechnique > | technique | ) |
Adds a new InteractionTechnique.
The first InteractionTechnique is automatically the active one. Note: A NavigationTechnique may be inserted into several modes. However, each NavigationTechnique can only be used in one NavigationConcept.
| void VRS::InteractionMode::removeInteractionTechnique | ( | SO< InteractionTechnique > | technique | ) |
Removes a InteractionTechnique. 'technique' must be a previously added technique.
| SO<Iterator<SO<InteractionTechnique> > > VRS::InteractionMode::interactionTechniqueIterator | ( | ) | const |
Returns all currently registered interaction techniques.
| SO<OrientationConstraint> VRS::InteractionMode::getTechniqueConstraint | ( | SO< InteractionTechnique > | technique | ) | const |
For each technique a technique-specific constraint can be defined.
This constraint avoids views that cannot be handled by the interaction or that leads to disorienting images (like looking to the sky with a flying metaphor).
| void VRS::InteractionMode::setTechniqueConstraint | ( | SO< InteractionTechnique > | technique, | |
| SO< OrientationConstraint > | constraint | |||
| ) |
Assignes a Constraint for a InteractionTechnique.
'technique' must be a previously added InteractionTechnique. Each technique can be associated with at most one constraint. 'constraint' may be NULL. In this case, no constraint is associated with 'technique'.
| void VRS::InteractionMode::setActiveInteraction | ( | SO< InteractionTechnique > | technique | ) |
The active interaction can be chosen explicitly from outside.
However, it will be changed with the first event that wakes up another InteractionTechnique.
| SO<InteractionTechnique> VRS::InteractionMode::getActiveInteraction | ( | ) | const |
Returns the currently active InteractionTechnique.
Changes the active interaction (if necessary) according to the given event.
| void VRS::InteractionMode::setDefaultActiveInteraction | ( | SO< InteractionTechnique > | technique | ) |
'technique' must be a previously added technique.
A InteractionMode with at least one added techniques has always an active interaction. However, when a InteractionMode is activated, there must be a selected InteractionTechnique which to activate. When the active Interaction is removed, the default active InteractionTechnque is selected. When the default active Interaction is removed, the new one is simply the first in the list.
| void VRS::InteractionMode::setPhysicalModelSettings | ( | SO< InteractionTechnique > | technique, | |
| SO< PhysicalModelSettings > | settings | |||
| ) |
For each InteractionTechnique it can be chosen whether the resulting view parameters should be directly applied or passed to a physical spring model, which provides slightly delayed but always smooth movement and rotation.
See phyisicalmodel.h for detailed information. 'technique' must be a previously added InteractionTechnique. 'settings' may be NULL. In this case, no phyiscal model is used (default).
| SO<PhysicalModelSettings> VRS::InteractionMode::getPhysicalModelSettings | ( | SO< InteractionTechnique > | technique | ) | const |
Returns the physical-model settings currently assigned to 'technique'.
'technique' must be a previously added InteractionTechnique.
| SO<InteractionConcept> VRS::InteractionMode::getParent | ( | ) | const |
Provides access to the parent interaction concept.
| bool VRS::InteractionMode::preservingViewDirectionRequired | ( | ) | const |
Used to determine whether the view direction must be preserved after a constraintchecker has refused or corrected a movement of this mode.
Returns the preserving requirement of the active technique or 'false' if there is no active technique.
Called by the parent InteractionConcept for each incoming event.
| VRS::InteractionMode::VRS_TYPEINFO | ( | InteractionMode | , | |
| SharedObj | ||||
| ) |
| VRS::InteractionMode::VRS_SERIALIZABLE | ( | InteractionMode | ) |
friend class InteractionConcept [friend] |