Viewer component for flying through space, with a constant world up. More...
#include <Inventor/Xt/viewers/SoXtFlyViewer.h>
Public Member Functions | |
SoXtFlyViewer (SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, SoXtFullViewer::BuildFlag flag=SoXtFullViewer::BUILD_ALL, SoXtViewer::Type type=SoXtViewer::BROWSER) | |
~SoXtFlyViewer () | |
virtual void | setViewing (SbBool onOrOff) |
virtual void | resetToHomePosition () |
virtual void | setCamera (SoCamera *cam) |
virtual void | setCursorEnabled (SbBool onOrOff) |
virtual void | setSeekMode (SbBool onOrOff) |
virtual void | setCameraType (SoType type) |
void | setMinSpeed (float speed) |
float | getMinSpeed () |
void | setSpeedMultiplier (float speedInc) |
float | getSpeedMultiplier () |
Viewer component for flying through space, with a constant world up.
Fly Viewer - this viewer is intended to simulate flight through space, with a constant world up direction. The viewer only constrains the camera to keep the user from flying upside down. No mouse buttons need to be pressed in order to fly. The mouse position is used only for steering, while mouse clicks are used to increase or decrease the viewer speed.
The viewer allows you to tilt your head up/down/right/left and move in the direction you are looking (forward or backward). The viewer also supports seek to quickly move the camera to a desired object or point.
!!------------------------------------------------ !! Decorations for Fly Viewer !! !!------------------------------------------------ *IvFlyTitle.labelString: Fly Viewer *IvFlyPrefTitle.labelString: Fly Viewer Preference Sheet *IvFlyPopupTitle.labelString: Fly Viewer *IvFlyIconTitle.labelString: Fly Viewer !! Same for Walk Viewer !! *IvFlyWalkRotate.labelString: Rotate !! Same for Walk Viewer !! *IvFlyWalkTilt.labelString: Tilt !! Same for Walk Viewer !! *IvFlyWalkDolly.labelString: Dolly !!------------------------------------------------ !! Preferences for Fly Viewer !! !!------------------------------------------------ *FlyPreference.FlyingSpeed.labelString: Flying speed: *FlyPreference.Increase.labelString: increase *FlyPreference.Decrease.labelString: decrease
Left Mouse: Click to increase speed.
<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.
Middle Mouse: Click to decrease speed.
Left and Middle Mouse: Click both simultaneously to stop.
Ctrl: Hold the key down to temporarily stop and rotate the viewpoint.
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, SoXtWalkViewer, SoXtExaminerViewer, SoXtPlaneViewer
SoXtFlyViewer::SoXtFlyViewer | ( | 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 page for a description of the viewer types.
SoXtFlyViewer::~SoXtFlyViewer | ( | ) |
Destructor.
float SoXtFlyViewer::getMinSpeed | ( | ) |
float SoXtFlyViewer::getSpeedMultiplier | ( | ) |
virtual void SoXtFlyViewer::resetToHomePosition | ( | ) | [virtual] |
Restores the camera values.
Reimplemented from SoXtConstrainedViewer.
virtual void SoXtFlyViewer::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 SoXtFlyViewer::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 SoXtFlyViewer::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.
void SoXtFlyViewer::setMinSpeed | ( | float | speed | ) |
virtual void SoXtFlyViewer::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 SoXtFlyViewer::setSpeedMultiplier | ( | float | speedInc | ) |
virtual void SoXtFlyViewer::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.