Viewer component which moves the camera in a plane. More...
#include <Inventor/Xt/viewers/SoXtPlaneViewer.h>
Public Member Functions | |
SoXtPlaneViewer (SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, SoXtFullViewer::BuildFlag flag=SoXtFullViewer::BUILD_ALL, SoXtViewer::Type type=SoXtViewer::BROWSER) | |
~SoXtPlaneViewer () | |
void | setPlane (const SbVec3f &newNormal, const SbVec3f &newRight) |
virtual void | setViewing (SbBool onOrOff) |
virtual void | setCamera (SoCamera *cam) |
virtual void | setCursorEnabled (SbBool onOrOff) |
virtual void | setSeekMode (SbBool onOrOff) |
Viewer component which moves the camera in a plane.
The Plane viewer component allows the user to translate the camera in the viewing plane, as well as dolly (move foward/backward) and zoom in and out. The viewer also allows the user to roll the camera (rotate around the forward direction) and seek to objects which will specify a new viewing plane. This viewer could be used for modeling, in drafting, and architectural work. The camera can be aligned to the X, Y or Z axes.
!!------------------------------------------------ !! Decorations for Plane Viewer !! !!------------------------------------------------ *IvPlaneTitle.labelString: Plane Viewer *IvPlanePrefTitle.labelString: Plane Viewer Preference Sheet *IvPlanePopupTitle.labelString: Plane Viewer *IvPlaneIconTitle.labelString: Plane Viewer *IvPlaneTransx.labelString: transX *IvPlaneTransy.labelString: transY *IvPlaneZoom.labelString: Zoom *IvPlaneDolly.labelString: Dolly
Left Mouse or
Left + Middle Mouse: Dolly in and out (gets closer to and further away from the object) (Perspective camera) or zoom in and out (Orthographic camera).
Middle Mouse or
Ctrl + Left Mouse: Translate up, down, left and right.
Ctrl + Middle Mouse: Used for roll action (rotates around the viewer forward direction).
<s> + Left Mouse: Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on a target object.
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.
Mouse Wheel: Dolly/zoom camera
Rotating the mouse wheel does a camera "dolly" operation on a perspective camera (moving the camera closer or farther away from the scene, which visually zoom) or a camera "zoom" operation on an orthographic camera (changing the view volume height).
Note that many users find the default dolly speed with the mouse wheel to be too slow. The user can hold down the Shift key to make the mouse wheel dolly go 2X faster. To increase the base speed set the environment variable OIV_WHEEL_DELTA. Mouse wheel events contain a "delta" that is a multiple of 120. The viewer divides this value by OIV_WHEEL_DELTA to compute the camera dolly increment. The default value for OIV_WHEEL_DELTA is 120. So, for example, setting OIV_WHEEL_DELTA to 12 makes the mouse wheel dolly go 10X faster.
SoXtFullViewer, SoXtViewer, SoXtComponent, SoXtRenderArea, SoXtWalkViewer, SoXtExaminerViewer, SoXtFlyViewer
SoXtPlaneViewer::SoXtPlaneViewer | ( | 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 pages for a description of the viewer types.
SoXtPlaneViewer::~SoXtPlaneViewer | ( | ) |
Destructor.
virtual void SoXtPlaneViewer::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 SoXtFullViewer.
virtual void SoXtPlaneViewer::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.
Moves the camera to be aligned with the given plane.
virtual void SoXtPlaneViewer::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.
virtual void SoXtPlaneViewer::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.