Base viewer class which adds a decoration around the rendering area. More...
#include <Inventor/MP/Xt/viewers/SoXtMPFullViewer.h>
Public Types | |
enum | BuildFlag { BUILD_NONE = 0x00, BUILD_DECORATION = 0x01, BUILD_POPUP = 0x02, BUILD_ALL = 0xff } |
Public Member Functions | |
void | setDecoration (SbBool onOrOff) |
SbBool | isDecoration () |
void | setPopupMenuEnabled (SbBool trueOrFalse) |
SbBool | isPopupMenuEnabled () |
SoWidget | getAppPushButtonParent () const |
void | addAppPushButton (SoWidget newButton) |
void | insertAppPushButton (SoWidget newButton, int index) |
void | removeAppPushButton (SoWidget oldButton) |
int | findAppPushButton (SoWidget oldButton) |
int | lengthAppPushButton () |
SoWidget | getRenderAreaWidget () |
virtual void | setViewing (SbBool onOrOff) |
virtual void | setHeadlight (SbBool onOrOff) |
virtual void | setDrawStyle (SoXtMPViewer::DrawType type, SoXtMPViewer::DrawStyle style) |
virtual void | setBufferingType (SoXtMPViewer::BufferType type) |
virtual void | setCamera (SoCamera *cam) |
virtual void | hide () |
Public Attributes | |
SoStereoDialog * | m_stereoDialogBox |
Base viewer class which adds a decoration around the rendering area.
This is a base class used by all viewer components. The class adds a decoration around the rendering area that includes thumb wheels, a zoom slider and push buttons. This base class also includes a viewer popup menu and a preference sheet with generic viewing functions. The constructors for the various subclasses of SoXtMPFullViewer provide a flag for specifying whether the decoration and popup menus should be built.
NOTE: This class does not exist in Open Inventor 10.0 and later.!!------------------------------------------------ !! FUNCTIONS MENU !!------------------------------------------------ *IvMenu.IvFunctions1.labelString: Functions *IvFunctions2.IvHelp.labelString: Help *IvFunctions2.IvHome.labelString: Home *IvFunctions2.IvSetHome.labelString: Set Home *IvFunctions2.IvViewAll.labelString: View All *IvFunctions2.IvSeek.labelString: Seek *IvFunctions2.IvCopyView.labelString: Copy View *IvFunctions2.IvPasteView.labelString: Paste View !!------------------------------------------------ !! DRAW STYLE MENU !!------------------------------------------------ *IvMenu.IvDrawStyle1.labelString: Draw Style *IvDrawStyle2.IvAsIs.labelString: as is *IvDrawStyle2.IvHiddenLine.labelString: hidden line *IvDrawStyle2.IvNoTexture.labelString: no texture *IvDrawStyle2.IvLowResolution.labelString: low resolution *IvDrawStyle2.IvWireFrame.labelString: wireframe *IvDrawStyle2.IvPoints.labelString: points *IvDrawStyle2.IvBoundingBoxNoDepth.labelString: bounding box ( no depth ) *IvDrawStyle2.IvMoveSameAsStill.labelString: move same as still *IvDrawStyle2.IvMoveNoTexture.labelString: move no texture. *IvDrawStyle2.IvMoveLowRes.labelString: move low res *IvDrawStyle2.IvMoveWireFrame.labelString: move wireframe *IvDrawStyle2.IvMoveLowResWireFrameNoDepth.labelString: move low res wire frame ( no depth ) *IvDrawStyle2.IvMovePoints.labelString: move points *IvDrawStyle2.IvMoveLowResPointsNoDepth.labelString: move low res points ( no depth ) *IvDrawStyle2.IvMoveBoundingBoxNoDepth.labelString: move bounding box ( no depth ) *IvDrawStyle2.IvSingleBuffer.labelString: single buffer *IvDrawStyle2.IvDoubleBuffer.labelString: Double buffer *IvDrawStyle2.IvInteractiveBuffer.labelString: interactive buffer !!------------------------------------------------ *IvMenu.IvViewing.labelString: Viewing !!------------------------------------------------ *IvMenu.IvDecoration.labelString: Decoration !!------------------------------------------------ *IvMenu.IvHeadlight.labelString: Headlight !!------------------------------------------------ *IvMenu.IvPreferences.labelString: Preferences ... !!------------------------------------------------ !! PREFERENCES !!------------------------------------------------ *IvFormPreference1.IvSeekAnimationTime.labelString: Seek animation time *IvFormPreference1.IvSeconds.labelString: seconds *IvFormPreference1.IvSeekTo.labelString: Seek to: *IvFormPreference1.IvPoint.labelString: point *IvFormPreference1.IvObject.labelString: object *IvFormPreference2.IvSeekDistance.labelString: Seek distance: *IvFormPreference2.IvPercentage.labelString: percentage *IvFormPreference2.IvAbsolute.labelString: absolute *IvZoomForm.IvCameraZoom.labelString: Camera zoom *IvZoomForm.IvZoomSliderRangesFrom.labelString: Zoom slider ranges from: *IvZoomForm.IvTo.labelString: to: *IvZoomForm.IvZoomSlider.labelString: Zoom slider *IvZoomForm.IvZoomField.labelString: Zoom field *IvZoomForm.IvZoomFrom.labelString: Zoom from *IvZoomForm.IvZoomTo.labelString: Zoom to *IvFormPreference3.IvAutoClippingPlanes.labelString: Auto clipping planes *IvFormPreference4.IvStereoViewing.labelString: Stereo Viewing *IvFormPreference6.IvNearPlane.labelString: near plane *IvFormPreference6.IvFarPlane.labelString: far plane *IvStereoThumbForm.IvCameraRotation.labelString: Camera rotation
SoXtMPViewer, SoXtComponent, SoXtMPRenderArea, SoXtMPExaminerViewer, SoXtMPWalkViewer, SoXtMPFlyViewer, SoXtMPPlaneViewer
void SoXtMPFullViewer::addAppPushButton | ( | SoWidget | newButton | ) |
Adds application push button, which will be placed in the left hand side decoration trim.
Adding buttons appends them to the end of the list.
Note: The button pixmaps should be 24-by-24 pixels size to nicely fit into the decoration trim like the other viewer buttons.
int SoXtMPFullViewer::findAppPushButton | ( | SoWidget | oldButton | ) | [inline] |
Returns index of specified push button.
SoWidget SoXtMPFullViewer::getAppPushButtonParent | ( | ) | const [inline] |
Returns the parent widget, which is needed when creating new buttons.
Note that if the decoration is not created in the constructor, this will be NULL until the decoration is shown.
SoWidget SoXtMPFullViewer::getRenderAreaWidget | ( | ) | [inline] |
Returns the render area widget.
virtual void SoXtMPFullViewer::hide | ( | ) | [virtual] |
This hides the component.
Reimplemented from SoXtComponent.
void SoXtMPFullViewer::insertAppPushButton | ( | SoWidget | newButton, | |
int | index | |||
) |
Adds application push button, which will be placed in the left hand side decoration trim.
Inserting buttons places them at the desired index.
Note: The button pixmaps should be 24-by-24 pixels size to nicely fit into the decoration trim like the other viewer buttons.
SbBool SoXtMPFullViewer::isDecoration | ( | ) | [inline] |
Returns whether the viewer component trim is on or off.
SbBool SoXtMPFullViewer::isPopupMenuEnabled | ( | ) | [inline] |
Returns whether the viewer popup menu is enabled or disabled.
int SoXtMPFullViewer::lengthAppPushButton | ( | ) | [inline] |
Returns number of application push buttons.
void SoXtMPFullViewer::removeAppPushButton | ( | SoWidget | oldButton | ) |
Removes specified application push button.
virtual void SoXtMPFullViewer::setBufferingType | ( | SoXtMPViewer::BufferType | type | ) | [virtual] |
Sets the current buffering type in the main view (default SoXtMPViewer::BUFFER_DOUBLE).
Reimplemented from SoXtMPViewer.
virtual void SoXtMPFullViewer::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 SoXtMPViewer.
Reimplemented in SoXtMPConstrainedViewer, SoXtMPExaminerViewer, SoXtMPFlyViewer, SoXtMPPlaneViewer, and SoXtMPWalkViewer.
void SoXtMPFullViewer::setDecoration | ( | SbBool | onOrOff | ) |
Shows/hides the viewer component trim (default on).
See the viewer constructor to prevent the decoration from being built.
virtual void SoXtMPFullViewer::setDrawStyle | ( | SoXtMPViewer::DrawType | type, | |
SoXtMPViewer::DrawStyle | style | |||
) | [virtual] |
Sets the current drawing style in the main view.
The user can specify the INTERACTIVE draw style (draw style used when the scene changes) independently from the STILL style. Default is VIEW_AS_IS draw style for STILL and VIEW_SAME_AS_STILL for INTERACTIVE. Possible draw styles are:
VIEW_AS_IS - Leaves the objects unchanged.
VIEW_HIDDEN_LINE - Renders the object as wireframe, but only shows the object front faces. This is accomplished using a two-pass rendering. In the first pass, the objects are rendered as FILLED using the background BASE_COLOR (this sets up the wanted z-buffer values). The second pass then renders the objects as LINES, while adjusting the z-buffer range to limit overlapping polygons problems.
VIEW_NO_TEXTURE - Renders the objects without any textures. This is done by setting the override flag on an empty SoTexture2 node.
VIEW_LOW_COMPLEXITY - Renders the objects without any textures and with a low complexity. This is done by setting the override flag on an empty SoTexture2 node, and by setting a low complexity value on an SoComplexity node with override set to TRUE.
VIEW_LINE - Renders the objects as LINES (no texture) with lighting model set to BASE_COLOR.
VIEW_LOW_RES_LINE - Renders the objects as LINES (no texture) using a low complexity, with lighting model set to BASE_COLOR and no depth comparison.
VIEW_POINT - Renders the objects as POINTS (no texture) with lighting model set to BASE_COLOR.
VIEW_LOW_RES_POINT - Renders the objects as POINTS (no texture) using a low complexity, with lighting model set to BASE_COLOR and no depth comparison.
VIEW_BBOX - Renders the objects with complexity BOUNDING_BOX, lighting model set to BASE_COLOR and drawing style LINES (no texture) with no depth comparison.
VIEW_SAME_AS_STILL - This only applies to INTERACTIVE draw type. It enables the interactive draw style mode to match the regular draw style mode without having to set it explicitly.
Reimplemented from SoXtMPViewer.
virtual void SoXtMPFullViewer::setHeadlight | ( | SbBool | onOrOff | ) | [virtual] |
Turns the headlight on/off (default on).
Reimplemented from SoXtMPViewer.
void SoXtMPFullViewer::setPopupMenuEnabled | ( | SbBool | trueOrFalse | ) |
Enables/disables the viewer popup menu (default enabled).
See the viewer constructor to prevent the popup menu from being built.
The default value can be set using the environment variable OIV_VIEWER_POPUP_MENU (0 = OFF, 1 = ON).
Description or equivalent function for each submenu of this popup menu:
virtual void SoXtMPFullViewer::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 SoXtMPViewer.
Reimplemented in SoXtMPExaminerViewer, SoXtMPFlyViewer, SoXtMPPlaneViewer, and SoXtMPWalkViewer.
Pointer to the stereo dialog.