|
http://www.sim.no http://www.coin3d.org |
#include <Inventor/Xt/viewers/SoXtConstrainedViewer.h>
Inheritance diagram for SoXtConstrainedViewer:

This abstract viewer class adds new methods to keep the camera in an upright position according to some arbitrary up-direction. The up-direction can be decided by either the application programmer (by using SoXtConstrainedViewer::setUpDirection()) or the end-user, through interaction mechanisms defined by the subclasses.
Public Member Functions | |
| void | setUpDirection (const SbVec3f &dir) |
| const SbVec3f & | getUpDirection (void) const |
| virtual void | setCamera (SoCamera *newcam) |
| virtual void | saveHomePosition (void) |
| virtual void | resetToHomePosition (void) |
Protected Member Functions | |
| SoXtConstrainedViewer (Widget parent, const char *const name, SbBool embed, SoXtFullViewer::BuildFlag flag, SoXtViewer::Type type, SbBool build) | |
| ~SoXtConstrainedViewer () | |
| virtual void | tiltCamera (float delta) |
| virtual void | bottomWheelMotion (float value) |
| virtual void | leftWheelMotion (float value) |
| virtual void | changeCameraValues (SoCamera *camera) |
| void | findUpDirection (SbVec2s mouselocation) |
| void | checkForCameraUpConstrain (void) |
| SoXtConstrainedViewer::SoXtConstrainedViewer | ( | Widget | parent, | |
| const char *const | name, | |||
| SbBool | embed, | |||
| SoXtFullViewer::BuildFlag | flag, | |||
| SoXtViewer::Type | type, | |||
| SbBool | build | |||
| ) | [protected] |
Constructor.
| SoXtConstrainedViewer::~SoXtConstrainedViewer | ( | ) | [protected] |
Virtual destructor.
| void SoXtConstrainedViewer::setUpDirection | ( | const SbVec3f & | dir | ) |
Set up-direction vector for the camera viewpoint.
| const SbVec3f & SoXtConstrainedViewer::getUpDirection | ( | void | ) | const |
Return up-direction vector for the camera viewpoint.
| void SoXtConstrainedViewer::setCamera | ( | SoCamera * | newcam | ) | [virtual] |
Set the camera we want the viewer to manipulate when interacting with the viewer controls.
The camera passed in as an argument to this method must already be part of the viewer's scenegraph. You do not inject viewpoint cameras to the viewer with this method.
You should rather insert a camera into the scene graph first (if necessary, often one will be present already), then register it as the camera used by the viewer controls with this method.
If the application code doesn't explicitly set up a camera through this method, the viewer will automatically scan through the scenegraph to find a camera to use. If no camera is available in the scenegraph at all, it will set up it's own camera.
Reimplemented from SoXtViewer.
Reimplemented in SoXtFlyViewer.
| void SoXtConstrainedViewer::saveHomePosition | ( | void | ) | [virtual] |
Store the current camera settings for later retrieval with resetToHomePosition().
Reimplemented from SoXtViewer.
| void SoXtConstrainedViewer::resetToHomePosition | ( | void | ) | [virtual] |
Restore the saved camera settings.
Reimplemented from SoXtViewer.
Reimplemented in SoXtFlyViewer.
| void SoXtConstrainedViewer::tiltCamera | ( | float | delta | ) | [protected, virtual] |
This method tilts the camera delta degrees closer to the up direction.
| void SoXtConstrainedViewer::bottomWheelMotion | ( | float | value | ) | [protected, virtual] |
Called repeatedly as the user drags the thumbwheel in the bottom frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.
Reimplemented from SoXtFullViewer.
| void SoXtConstrainedViewer::leftWheelMotion | ( | float | value | ) | [protected, virtual] |
Called repeatedly as the user drags the thumbwheel in the left frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.
Reimplemented from SoXtFullViewer.
| void SoXtConstrainedViewer::changeCameraValues | ( | SoCamera * | camera | ) | [protected, virtual] |
Copies the settings of camera into our current camera. Cameras must be of the same class type.
Reimplemented from SoXtViewer.
| void SoXtConstrainedViewer::findUpDirection | ( | SbVec2s | mouselocation | ) | [protected] |
Executes a raypick at the given mousepointer location and sets the viewer's camera up-vector direction to the normal vector of the picked geometry.
| void SoXtConstrainedViewer::checkForCameraUpConstrain | ( | void | ) | [protected] |
If necessary, "tilts" the camera sideways so the up-direction is heeded.
Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.
Generated on Tue Dec 2 23:15:45 2008 for SoXt by Doxygen. 1.4.7