SoXtMPConstrainedViewer Class Reference

Base viewer class which adds camera constraints given a world up direction. More...

#include <Inventor/MP/Xt/viewers/SoXtMPConstrainedViewer.h>

Inheritance diagram for SoXtMPConstrainedViewer:
SoXtMPFullViewer SoXtMPViewer SoXtMPRenderArea SoXtMPGLWidget SoStereoViewer SoXtComponent SoXtMPFlyViewer SoXtMPWalkViewer

List of all members.

Public Member Functions

void setUpDirection (const SbVec3f &newUpDirection)
SbVec3f getUpDirection ()
virtual void setCamera (SoCamera *newCam)
virtual void saveHomePosition ()
virtual void resetToHomePosition ()
virtual void recomputeSceneSize ()

Detailed Description

Base viewer class which adds camera constraints given a world up direction.

This is a base class for the SoXtWalkViewer and SoXtFlyViewer component viewers. This class adds methods and convenience routines available to subclasses to constrain the camera given a world up direction. This prevents the camera from looking upside down. By default the +Y direction is used.

NOTE: This class does not exist in Open Inventor 10.0 and later.

SEE ALSO

SoXtFullViewer, SoXtViewer, SoXtComponent, SoXtRenderArea, SoXtWalkViewer, SoXtFlyViewer


Member Function Documentation

SbVec3f SoXtMPConstrainedViewer::getUpDirection (  )  [inline]

Returns the upward direction of the viewer.

virtual void SoXtMPConstrainedViewer::recomputeSceneSize (  )  [virtual]

This can be used to let the viewer know that the scene graph has changed so that the viewer can recompute things like speed which depend on the scene graph size.

Note: This routine is automatically called whenever setSceneGraph() is called.

Reimplemented from SoXtMPViewer.

virtual void SoXtMPConstrainedViewer::resetToHomePosition (  )  [virtual]

Restores the camera values.

Reimplemented from SoXtMPViewer.

Reimplemented in SoXtMPFlyViewer.

virtual void SoXtMPConstrainedViewer::saveHomePosition (  )  [virtual]

Saves the camera values.

Reimplemented from SoXtMPViewer.

virtual void SoXtMPConstrainedViewer::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 SoXtMPFullViewer.

Reimplemented in SoXtMPFlyViewer, and SoXtMPWalkViewer.

void SoXtMPConstrainedViewer::setUpDirection ( const SbVec3f newUpDirection  ) 

Specifies the upward direction of the viewer.

This up direction is used by the viewers to constrain the camera when tilting up/down, and also used when rotating the camera right/left. The default is the +Y (0,1,0) direction.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/