.TH "SoQtConstrainedViewer" 3 "Thu May 26 2016" "Version 1.6.0a" "SoQt" \" -*- nroff -*- .ad l .nh .SH NAME SoQtConstrainedViewer \- The \fBSoQtConstrainedViewer\fP class is the superclass for viewers with constrains on the viewpoint\&. .PP 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 \fBSoQtConstrainedViewer::setUpDirection()\fP) or the end-user, through interaction mechanisms defined by the subclasses\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoQtFullViewer\fP\&. .PP Inherited by \fBSoQtFlyViewer\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "void \fBsetUpDirection\fP (const SbVec3f &dir)" .br .ti -1c .RI "const SbVec3f & \fBgetUpDirection\fP (void) const " .br .ti -1c .RI "virtual void \fBsetCamera\fP (SoCamera *newcam)" .br .ti -1c .RI "virtual void \fBsaveHomePosition\fP (void)" .br .ti -1c .RI "virtual void \fBresetToHomePosition\fP (void)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBSoQtConstrainedViewer\fP (QWidget *parent, const char *const name, SbBool embed, \fBSoQtFullViewer::BuildFlag\fP flag, \fBSoQtViewer::Type\fP type, SbBool build)" .br .ti -1c .RI "\fB~SoQtConstrainedViewer\fP ()" .br .ti -1c .RI "virtual void \fBtiltCamera\fP (float delta)" .br .ti -1c .RI "virtual void \fBbottomWheelMotion\fP (float value)" .br .ti -1c .RI "virtual void \fBleftWheelMotion\fP (float value)" .br .ti -1c .RI "virtual void \fBchangeCameraValues\fP (SoCamera *camera)" .br .ti -1c .RI "void \fBfindUpDirection\fP (SbVec2s mouselocation)" .br .ti -1c .RI "void \fBcheckForCameraUpConstrain\fP (void)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoQtConstrainedViewer\fP class is the superclass for viewers with constrains on the viewpoint\&. .PP 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 \fBSoQtConstrainedViewer::setUpDirection()\fP) or the end-user, through interaction mechanisms defined by the subclasses\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoQtConstrainedViewer::SoQtConstrainedViewer (QWidget * parent, const char *const name, SbBool embed, \fBSoQtFullViewer::BuildFlag\fP flag, \fBSoQtViewer::Type\fP type, SbBool build)\fC [protected]\fP" Constructor\&. .PP References SoQtComponent::getParentWidget(), SoQtComponent::setBaseWidget(), SoQtFullViewer::setBottomWheelString(), SoQtComponent::setClassName(), SoQtFullViewer::setLeftWheelString(), and SoQtFullViewer::setRightWheelString()\&. .SS "SoQtConstrainedViewer::~SoQtConstrainedViewer ()\fC [protected]\fP" Virtual destructor\&. .SH "Member Function Documentation" .PP .SS "void SoQtConstrainedViewer::setUpDirection (const SbVec3f & dir)" Set up-direction vector for the camera viewpoint\&. .PP References checkForCameraUpConstrain(), and SoQtViewer::getCamera()\&. .PP Referenced by findUpDirection()\&. .SS "const SbVec3f & SoQtConstrainedViewer::getUpDirection (void) const" Return up-direction vector for the camera viewpoint\&. .PP Referenced by tiltCamera()\&. .SS "void SoQtConstrainedViewer::setCamera (SoCamera * cam)\fC [virtual]\fP" Set the camera we want the viewer to manipulate when interacting with the viewer controls\&. .PP The camera passed in as an argument to this method \fImust\fP already be part of the viewer's scenegraph\&. You do \fInot\fP inject viewpoint cameras to the viewer with this method\&. .PP 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\&. .PP 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\&. .PP \fBSee also:\fP .RS 4 \fBgetCamera()\fP .RE .PP .PP Reimplemented from \fBSoQtViewer\fP\&. .PP Reimplemented in \fBSoQtFlyViewer\fP\&. .PP References checkForCameraUpConstrain()\&. .SS "void SoQtConstrainedViewer::saveHomePosition (void)\fC [virtual]\fP" Store the current camera settings for later retrieval with \fBresetToHomePosition()\fP\&. .PP \fBSee also:\fP .RS 4 \fBresetToHomePosition()\fP .RE .PP .PP Reimplemented from \fBSoQtViewer\fP\&. .SS "void SoQtConstrainedViewer::resetToHomePosition (void)\fC [virtual]\fP" Restore the saved camera settings\&. .PP \fBSee also:\fP .RS 4 \fBsaveHomePosition()\fP .RE .PP .PP Reimplemented from \fBSoQtViewer\fP\&. .PP Reimplemented in \fBSoQtFlyViewer\fP\&. .SS "void SoQtConstrainedViewer::tiltCamera (float delta)\fC [protected]\fP, \fC [virtual]\fP" This method tilts the camera \fIdelta\fP degrees closer to the up direction\&. .PP References SoQtViewer::getCamera(), and getUpDirection()\&. .PP Referenced by leftWheelMotion()\&. .SS "void SoQtConstrainedViewer::bottomWheelMotion (float value)\fC [protected]\fP, \fC [virtual]\fP" 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\&. .PP \fBSee also:\fP .RS 4 \fBbottomWheelStart()\fP, \fBbottomWheelFinish()\fP .PP \fBleftWheelStart()\fP, \fBrightWheelStart()\fP .RE .PP .PP Reimplemented from \fBSoQtFullViewer\fP\&. .PP References SoQtFullViewer::getBottomWheelValue()\&. .SS "void SoQtConstrainedViewer::leftWheelMotion (float value)\fC [protected]\fP, \fC [virtual]\fP" 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\&. .PP \fBSee also:\fP .RS 4 \fBleftWheelStart()\fP, \fBleftWheelFinish()\fP .PP \fBbottomWheelStart()\fP, \fBrightWheelStart()\fP .RE .PP .PP Reimplemented from \fBSoQtFullViewer\fP\&. .PP References SoQtFullViewer::getLeftWheelValue(), and tiltCamera()\&. .SS "void SoQtConstrainedViewer::changeCameraValues (SoCamera * camera)\fC [protected]\fP, \fC [virtual]\fP" Copies the settings of \fIcamera\fP into our current camera\&. Cameras must be of the same class type\&. .PP Reimplemented from \fBSoQtViewer\fP\&. .PP References checkForCameraUpConstrain()\&. .SS "void SoQtConstrainedViewer::findUpDirection (SbVec2s mouselocation)\fC [protected]\fP" 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\&. .PP References SoQtRenderArea::getSceneManager(), SoQtRenderArea::getViewportRegion(), and setUpDirection()\&. .SS "void SoQtConstrainedViewer::checkForCameraUpConstrain (void)\fC [protected]\fP" If necessary, 'tilts' the camera sideways so the up-direction is heeded\&. .PP References SoQtViewer::getCamera()\&. .PP Referenced by changeCameraValues(), setCamera(), and setUpDirection()\&. .SH "Author" .PP Generated automatically by Doxygen for SoQt from the source code\&.