SoQtFlyViewer Class Reference
[Qt]

VSG extension Viewer component for flying through space, with a constant world up. More...

#include <Inventor/Qt/viewers/SoQtFlyViewer.h>

Inheritance diagram for SoQtFlyViewer:
SoQtConstrainedViewer SoQtFullViewer SoQtViewer SoQtRenderArea SoStereoViewer SoQtGLWidget SoQtComponent

List of all members.

Public Member Functions

 SoQtFlyViewer (QWidget *parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, SoQtFullViewer::BuildFlag flag=SoQtFullViewer::BUILD_ALL, SoQtViewer::Type type=SoQtViewer::BROWSER)
 ~SoQtFlyViewer ()
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 ()

Detailed Description

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

USAGE

SEE ALSO

SoQtFullViewer, SoQtViewer, SoQtComponent, SoQtRenderArea, SoQtWalkViewer, SoQtExaminerViewer, SoQtPlaneViewer


Constructor & Destructor Documentation

SoQtFlyViewer::SoQtFlyViewer ( QWidget *  parent = NULL,
const char *  name = NULL,
SbBool  buildInsideParent = TRUE,
SoQtFullViewer::BuildFlag  flag = SoQtFullViewer::BUILD_ALL,
SoQtViewer::Type  type = SoQtViewer::BROWSER 
)

Constructor which specifies the viewer type.

Please refer to SoQtViewer for a description of the viewer types.

NOTES

    On Windows, the constructor will not create a new top level window -- you must pass a valid window handle for the parent parameter and pass TRUE for buildInsideParent .

SoQtFlyViewer::~SoQtFlyViewer (  ) 

Destructor.


Member Function Documentation

float SoQtFlyViewer::getMinSpeed (  ) 

Returns the minimum speed.

float SoQtFlyViewer::getSpeedMultiplier (  ) 

Returns the speed multiplier.

virtual void SoQtFlyViewer::resetToHomePosition (  )  [virtual]

Restores the camera values.

Reimplemented from SoQtConstrainedViewer.

virtual void SoQtFlyViewer::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 SoQtConstrainedViewer.

virtual void SoQtFlyViewer::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 SoQtViewer.

virtual void SoQtFlyViewer::setCursorEnabled ( SbBool  onOrOff  )  [virtual]

Sets whether the viewer is allowed to change the cursor over the renderArea window.

When disabled, the cursor is not defined 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 SoQtViewer.

void SoQtFlyViewer::setMinSpeed ( float  speed  ) 

Sets the minimum speed in world coodinate / second.

Default value is 0, meaning the minimum speed is computed according to scene graph extent.

virtual void SoQtFlyViewer::setSeekMode ( SbBool  onOrOff  )  [virtual]

Set the viewer into/out of seek mode (default OFF).

Actual seeking will not happen until the viewer decides to, for example, on a mouse click.

Note: Setting the viewer out of seek mode while the camera is being animated will stop the animation at the current location.

Reimplemented from SoQtViewer.

void SoQtFlyViewer::setSpeedMultiplier ( float  speedInc  ) 

Sets the speed multiplier.

Default value is 1.5.

virtual void SoQtFlyViewer::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 SoQtFullViewer.


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

Open Inventor Toolkit reference manual, generated on 18 Apr 2021
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/