Viewer component which moves the camera in a plane. More...
#include <Inventor/Xt/viewers/SoXtWalkViewer.h>
Public Member Functions | |
SoXtWalkViewer (SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, SoXtFullViewer::BuildFlag flag=SoXtFullViewer::BUILD_ALL, SoXtViewer::Type type=SoXtViewer::BROWSER) | |
~SoXtWalkViewer () | |
virtual void | setViewing (SbBool onOrOff) |
virtual void | setCamera (SoCamera *cam) |
virtual void | setCursorEnabled (SbBool onOrOff) |
virtual void | setSeekMode (SbBool onOrOff) |
virtual void | setCameraType (SoType type) |
void | setViewerSpeed (float speed) |
float | getViewerSpeed () const |
Viewer component which moves the camera in a plane.
The paradigm for this viewer is a walk-through of an architectural model. Its primary behavior is forward, backward, and left/right turning motion while maintaining a constant "eye level". It is also possible to stop and look around at the scene. The eye level plane can be disabled, allowing the viewer to proceed in the "look at" direction, as if on an escalator. The eye level plane can also be translated up and down - similar to an elevator.
!!------------------------------------------------ !! Decorations for Walk Viewer !! !!------------------------------------------------ *IvWalkTitle.labelString: Walk Viewer *IvWalkPrefTitle.labelString: Walk Viewer Preference Sheet *IvWalkPopupTitle.labelString: Walk Viewer *IvWalkIconTitle.labelString: Walk Viewer *IvLeftTrimForm.IvH.labelString: H !!------------------------------------------------ !! Preferences for Walk Viewer !! !!------------------------------------------------ *IvFormPreference5.IvViewerSpeed.labelString: Viewer speed *IvFormPreference5.IvIncrease.labelString: increase *IvFormPreference5.IvDecrease.labelString: decrease
Left Mouse: Walk mode. Click down and move up and down for forwards and backwards motion. Move right and left for turning. Speed increases exponentially with the distance from the mouse-down origin.
Middle Mouse or
Ctrl + Left Mouse: Translate up, down, left, and right.
Ctrl + Middle Mouse: Tilt the camera up/down and right/left. This allows you to look around while stopped.
<s> + Left Mouse: Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on a target object.
<U> + Left Mouse: Press (but do not hold down) the <U> key, then click on a target object to set the "up" direction to the surface normal. By default +y is the "up" direction.
Right Mouse: Open the popup menu.
ALT: When the viewer is in selection (a.k.a. pick) mode, pressing and holding the ALT key temporarily switches the viewer to viewing mode. When the ALT key is released, the viewer returns to selection mode. Note: If any of the mouse buttons are currently depressed, the ALT key has no effect.
SoXtFullViewer, SoXtViewer, SoXtComponent, SoXtRenderArea, SoXtPlaneViewer, SoXtExaminerViewer, SoXtFlyViewer
SoXtWalkViewer::SoXtWalkViewer | ( | SoWidget | parent = NULL , |
|
const char * | name = NULL , |
|||
SbBool | buildInsideParent = TRUE , |
|||
SoXtFullViewer::BuildFlag | flag = SoXtFullViewer::BUILD_ALL , |
|||
SoXtViewer::Type | type = SoXtViewer::BROWSER | |||
) |
Constructor which specifies the viewer type.
Please refer to the SoXtViewer reference pages for a description of the viewer types.
SoXtWalkViewer::~SoXtWalkViewer | ( | ) |
Destructor.
float SoXtWalkViewer::getViewerSpeed | ( | ) | const [inline] |
Get viewer speed multiplier.
virtual void SoXtWalkViewer::setCamera | ( | SoCamera * | cam | ) | [virtual] |
Sets the edited camera.
Setting the camera is only needed if the first camera found in the scene when setting the scene graph isn't the one the user really wants to edit.
Reimplemented from SoXtConstrainedViewer.
virtual void SoXtWalkViewer::setCameraType | ( | SoType | type | ) | [virtual] |
Sets the camera type that will be created by the viewer if no cameras are found in the scene graph (see SoPerspectiveCamera and SoOrthographicCamera).
By default an SoPerspectiveCamera will be created if no cameras are found.
Note: The set method will only take effect the next time a scene graph is specified (and if no cameras are found).
Reimplemented from SoXtViewer.
virtual void SoXtWalkViewer::setCursorEnabled | ( | SbBool | onOrOff | ) | [virtual] |
Sets whether the viewer is allowed to change the cursor over the renderArea window.
When disabled, the cursor is undefined by the viewer and will not change as the mode of the viewer changes. When re-enabled, the viewer will reset it to the appropriate icon.
Disabling the cursor enables the application to set the cursor directly on the viewer window or on any parent widget of the viewer. This can be used when setting a busy cursor on the application shell.
Reimplemented from SoXtViewer.
virtual void SoXtWalkViewer::setSeekMode | ( | SbBool | onOrOff | ) | [virtual] |
Externally set the viewer into/out off seek mode (default OFF).
Actual seeking will not happen until the viewer decides to (ex: mouse click).
Note: setting the viewer out of seek mode while the camera is being animated will stop the animation to the current location.
Reimplemented from SoXtViewer.
void SoXtWalkViewer::setViewerSpeed | ( | float | speed | ) | [inline] |
Set viewer speed multiplier (default is 1).
virtual void SoXtWalkViewer::setViewing | ( | SbBool | onOrOff | ) | [virtual] |
Sets whether the viewer is turned on or off.
When turned on, events are consumed by the viewer. When viewing is off, events are processed by the viewer's render area. This means events will be sent down to the scene graph for processing (i.e. picking can occur). Note that if the application has registered an event callback, it will be invoked on every message, whether viewing is turned on or not. However, the return value of this callback (which specifies whether the callback handled the event or not) is ignored when viewing is on. That is, the viewer will process the event even if the callback already did. This is to ensure that the viewing paradigm is not broken (default viewing is on).
Reimplemented from SoXtFullViewer.