Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoXtFullViewer Class Reference

Base viewer class which adds a decoration around the rendering area. More...

#include <Inventor/Xt/viewers/SoXtFullViewer.h>

+ Inheritance diagram for SoXtFullViewer:

Public Types

enum  BuildFlag {
  BUILD_NONE = 0x00 ,
  BUILD_DECORATION = 0x01 ,
  BUILD_POPUP = 0x02 ,
  BUILD_ALL = 0xff
}
 This specifies what should be build by default in the constructor
More...
 
- Public Types inherited from SoXtViewer
enum  Type {
  BROWSER ,
  EDITOR
}
 An EDITOR viewer will create a camera under the user supplied scene graph (specified in setSceneGraph()) if it cannot find one in the scene and will leave the camera behind when supplied with a new scene. More...
 
enum  DrawStyle {
  VIEW_AS_IS ,
  VIEW_HIDDEN_LINE ,
  VIEW_NO_TEXTURE ,
  VIEW_LOW_COMPLEXITY ,
  VIEW_LINE ,
  VIEW_POINT ,
  VIEW_BBOX ,
  VIEW_LOW_RES_LINE ,
  VIEW_LOW_RES_POINT ,
  VIEW_SAME_AS_STILL
}
 list of possible drawing styles More...
 
enum  DrawType {
  STILL ,
  INTERACTIVE
}
 DrawType. More...
 
enum  BufferType {
  BUFFER_SINGLE ,
  BUFFER_DOUBLE ,
  BUFFER_INTERACTIVE
}
 list of different buffering types More...
 
enum  DecimationStrategy {
  NORMAL ,
  FIXED_NUM_TRIANGLES ,
  FRAMES_PER_SECOND ,
  FIXED_PERCENTAGE
}
 list of decimation strategies More...
 
enum  CursorStyle {
  CLASSIC ,
  XOR ,
  SHADOW
}
 Classic cursors are all white and tend to disappear over white geometry or white background. More...
 
typedef void SoXtViewerCB(void *userData, SoXtViewer *viewer)
 
typedef void SoXtViewerCameraTypeChangeCB(void *userData, SoCamera *camera, SoXtViewer *viewer)
 
typedef void SoXtViewerFPSCB(float fps, void *userData, SoXtViewer *viewer)
 
typedef void SoXtViewerDecimationPercentageCB(float percentage, void *userData, SoXtViewer *viewer)
 
- Public Types inherited from SoXtRenderArea
typedef SbBool SoXtRenderAreaEventCB(void *userData, XAnyEvent *anyevent)
 
typedef SbBool SoXtRenderAreaRenderCB(void *userData, SoXtRenderArea *rendArea)
 
- Public Types inherited from SoXtGLWidget
enum  FloatColorBufferSize {
  FLOAT_16_COLOR_BUFFER = SoGuiGLWidget::FLOAT_16_COLOR_BUFFER ,
  FLOAT_32_COLOR_BUFFER = SoGuiGLWidget::FLOAT_32_COLOR_BUFFER
}
 FloatColorBufferSize. More...
 
- Public Types inherited from SoXtComponent
typedef void SoXtComponentCB(void *data, SoXtComponent *v)
 

Public Member Functions

void setDecoration (SbBool onOrOff)
 Shows/hides the viewer component trim (default on).
 
SbBool isDecoration ()
 Returns whether the viewer component trim is on or off.
 
void setPopupMenuEnabled (SbBool trueOrFalse)
 Enables/disables the viewer popup menu (default enabled).
 
SbBool isPopupMenuEnabled ()
 Returns whether the viewer popup menu is enabled or disabled.
 
SoWidget getAppPushButtonParent () const
 Returns the parent widget, which is needed when creating new buttons.
 
void addAppPushButton (SoWidget newButton)
 Adds application push button, which will be placed in the left hand side decoration trim.
 
void insertAppPushButton (SoWidget newButton, int index)
 Adds application push button, which will be placed in the left hand side decoration trim.
 
void removeAppPushButton (SoWidget oldButton)
 Removes specified application push button.
 
int findAppPushButton (SoWidget oldButton)
 Returns index of specified push button.
 
int lengthAppPushButton ()
 Returns number of application push buttons.
 
SoWidget getRenderAreaWidget ()
 Returns the render area widget.
 
virtual void setViewing (SbBool onOrOff)
 Sets whether the viewer is turned on or off.
 
virtual void setHeadlight (SbBool onOrOff)
 Turns the headlight on/off (default on).
 
virtual void setDrawStyle (SoXtViewer::DrawType type, SoXtViewer::DrawStyle style)
 Sets the current drawing style in the main view.
 
virtual void setBufferingType (SoXtViewer::BufferType type)
 Sets the current buffering type in the main view (default SoXtViewer::BUFFER_DOUBLE).
 
virtual void setCamera (SoCamera *cam)
 Sets the edited camera.
 
virtual void hide ()
 This hides the component.
 
SoStereoDialoggetStereoDialog ()
 
void setStereoDialog (SoStereoDialog *newDialog)
 
- Public Member Functions inherited from SoXtViewer
virtual void setSceneGraph (SoNode *newScene)
 Sets the scene graph to render.
 
virtual SoNodegetSceneGraph ()
 Gets the scene graph to render.
 
SoCameragetCamera ()
 Gets the edited camera.
 
virtual void setCameraType (SoType type)
 Sets the camera type that will be created by the viewer if no cameras are found in the scene graph (see SoPerspectiveCamera and SoOrthographicCamera).
 
SoType getCameraType ()
 Gets the camera type that will be created by the viewer if no cameras are found in the scene graph (see SoPerspectiveCamera and SoOrthographicCamera).
 
virtual void setPreserveCameraHeightAngle (SbBool flag)
 If TRUE, an SoPerspectiveCamera's heightAngle is preserved if the camera is changed to an SoOrthographicCamera and then toggled back to an SoPerspectiveCamera.
 
virtual SbBool isCameraHeightAnglePreserved () const
 Query whether the SoPerspectiveCamera's heightAngle is preserved if the camera is changed to an SoOrthographicCamera and then toggled back to an SoPerspectiveCamera.
 
virtual void enableSeekWithOrtho (SbBool flag)
 If FALSE, the seek functionality is disabled for an SoOrthographicCamera.
 
virtual SbBool isSeekWithOrthoEnabled () const
 Query whether the seek functionality is enabled for an SoOrthographicCamera.
 
virtual void viewAll ()
 Changes the camera position to view the entire scene (the camera zoom or orientation isn't changed).
 
virtual void saveHomePosition ()
 Saves the camera values.
 
virtual void resetToHomePosition ()
 Restores the camera values.
 
void setCameraTypeChangeCallback (SoXtViewerCameraTypeChangeCB *callback, void *userdata)
 Defines a callback which is called each time the camera type has changed (change from SoPerspectiveCamera to SoOrthographicCamera or vice versa).
 
SbBool isHeadlight ()
 Queries if the headlight is on.
 
SoDirectionalLightgetHeadlight ()
 Returns the headlight node.
 
SoXtViewer::DrawStyle getDrawStyle (SoXtViewer::DrawType type)
 Queries the current drawing style in the main view.
 
SoXtViewer::BufferType getBufferingType ()
 Gets the current buffering type in the main view.
 
SbBool isViewing () const
 Queries whether the viewer is turned on or off.
 
virtual void setCursorEnabled (SbBool onOrOff)
 Sets whether the viewer is allowed to change the cursor over the renderArea window.
 
SbBool isCursorEnabled () const
 Queries whether the viewer is allowed to change the cursor over the renderArea window.
 
void setAutoClipping (SbBool onOrOff)
 Sets the auto clipping plane.
 
SbBool isAutoClipping () const
 Queries if auto clipping is ON.
 
virtual void setStereoViewing (SbBool onOrOff)
 Turns stereo viewing on/off on the viewer (default off).
 
virtual SbBool isStereoViewing ()
 Queries if stereo viewing is on or off on the viewer.
 
void setStereoOffset (float dist)
 Sets the stereo offset.
 
float getStereoOffset ()
 Returns the stereo offset.
 
void setDetailSeek (SbBool onOrOff)
 When the viewer is in seek mode, left mouse clicks initiate a pick, and the viewer changes its orientation and position to look at the picked object.
 
SbBool isDetailSeek ()
 Queries whether the viewer is in seek mode.
 
void setSeekTime (float seconds)
 Sets the time a seek takes to change to the new camera location.
 
float getSeekTime ()
 Queries the seek time.
 
void addStartCallback (SoXtViewerCB *f, void *userData=NULL)
 Adds start callback routine on the viewer.
 
void addFinishCallback (SoXtViewerCB *f, void *userData=NULL)
 Adds finish callback routines on the viewer.
 
void removeStartCallback (SoXtViewerCB *f, void *userData=NULL)
 Removes start callback routine from the viewer.
 
void removeFinishCallback (SoXtViewerCB *f, void *userData=NULL)
 Removes finish callback routine from the viewer.
 
void copyView (Time eventTime)
 Copies the view.
 
void pasteView (Time eventTime)
 Pastes the view.
 
virtual void recomputeSceneSize ()
 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.
 
void setDecimationStrategy (SoXtViewer::DecimationStrategy strategy)
 Sets strategy to use to decide on decimation value.
 
SoXtViewer::DecimationStrategy getDecimationStrategy ()
 Gets strategy to use to decide on decimation value.
 
void setGoalNumberOfTriangles (int32_t goal)
 Sets goal number of triangles for the viewer to try to render.
 
int32_t getGoalNumberOfTriangles ()
 Gets goal number of triangles for the viewer to try to render.
 
void setGoalFramesPerSecond (float goal)
 Sets goal frames per second for the viewer to try to render.
 
float getGoalFramesPerSecond ()
 Gets goal frames per second for the viewer to try to render.
 
void setFixedPercentage (float percent)
 Sets fixed percentage for the viewer to render (0.0 to 1.0) Default is 1.0.
 
float getFixedPercentage ()
 Gets fixed percentage for the viewer to render (0.0 to 1.0)
 
void enableFullRenderingWhenStill (SbBool onOff)
 If this flag is set, the viewer will render at full resolution when it sits still for a certain period of time.
 
SbBool isFullRenderingWhenStill ()
 Queries if the viewer will render at full resolution when it sits still for a certain period of time.
 
SbBool isStillNow ()
 Returns whether the viewer is currently still.
 
void setFramesPerSecondCallback (SoXtViewerFPSCB *callback, void *userData=NULL)
 Registers frames per second callback.
 
void setNumSamples (int numFrames)
 Sets how many frames should be timed before frames per second callback is called, default is 10.
 
int getNumSamples ()
 Gets how many frames should be timed before frames per second callback is called.
 
void setDecimationPercentageCallback (SoXtViewerDecimationPercentageCB *callback, void *userData=NULL)
 Registers decimation percentage callback.
 
float getCurrentDecimationPercentage ()
 Returns the Decimation Percentage the viewer used in its last render.
 
virtual SoCameragetViewerCamera ()
 Returning the camera allows the SoBaseStereo to manipulate it to achieve the stereo effect.
 
virtual SbBool isViewerDoubleBuffer ()
 Queries if viewer is double buffered.
 
virtual void actualRendering ()
 This method is called automatically when the viewer requests that its SoBaseStereo object perform stereo rendering.
 
virtual const SbVec2sgetSize ()
 Returns the size of the OpenGL drawing window in absolute screen coordinates (not relative to parent window) of the native window system.
 
virtual const SbVec2sgetTopLeft ()
 Returns the position of the OpenGL drawing window in absolute screen coordinates (not relative to parent window) of the native window system (typically Y increasing downward).
 
virtual const SbVec2sgetBottomRight ()
 Returns the position of the OpenGL drawing window in absolute screen coordinates (not relative to parent window) of the native window system (typically Y increasing downward).
 
void setStereoViewType (SoBaseStereo *stereo)
 If stereoViewType is NULL, the stereo is inactivated (see setStereoActive).
 
SoBaseStereogetStereoViewType ()
 Returns the stereo view type.
 
void reverseStereoView (SbBool reverse)
 Sets reversal of the left and right views.
 
SbBool isStereoViewReversed ()
 Queries reversal of the left and right views.
 
virtual void setStereoAbsoluteAdjustments (SbBool absolute)
 Specifies if stereo adjustments are absolute.
 
virtual SbBool isStereoAbsoluteAdjustments () const
 Queries if the stereo adjustments are absolute.
 
virtual void setStereoBalance (float balance, SbBool nearFrac)
 Sets the stereo balance (the position of the zero parallax plane) and specifies whether the balance value is defined as a fraction of the camera near distance.
 
virtual float getStereoBalance ()
 Queries the stereo balance (the position of the zero parallax plane).
 
virtual SbBool isStereoBalanceNearFrac ()
 Returns TRUE when the stereo balance adjustement is defined as a fraction of the camera near distance.
 
virtual void setStereoActive (SbBool activate)
 Sets stereo activation.
 
virtual SbBool isStereoActive ()
 Queries stereo activation.
 
void setViewport (short left, short bottom, short width, short height)
 Sets viewport region with given origin (lower-left corner) and size, given as pixel coordinates.
 
void getViewport (short &left, short &bottom, short &width, short &height)
 Returns viewport region with origin (lower-left corner) and size, given as pixel coordinates.
 
virtual void setCursorStyle (SoXtViewer::CursorStyle style)
 Sets the cursor style.
 
SoXtViewer::CursorStyle getCursorStyle ()
 Returns the cursor style.
 
SoSeparatorgetSceneRoot ()
 
void setAutoClipTolerance (float tolerance)
 Sets the auto clipping tolerance value.
 
float getAutoClipTolerance () const
 Gets the auto clipping tolerance value.
 
virtual void setCameraSceneGraph (SoNode *cameraSceneGraph)
 Sets the sub-scene graph to be used for viewAll computation.
 
SoNodegetCameraSceneGraph ()
 Gets the sub-scene graph to be viewed.
 
virtual void toggleCameraType ()
 This routine will toggle the current camera from perspective to orthographic, and from orthographic back to perspective.
 
virtual void setSeekMode (SbBool onOrOff)
 Externally set the viewer into/out off seek mode (default OFF).
 
void setPickRadius (float radius)
 Sets the pick radius, in pixels, used by the viewer for picking and seeking actions.
 
float getPickRadius () const
 Returns the current pick radius for picking and seeking actions.
 
SbBool getDepthValue (int x, int y, float &depth)
 Returns the depth value, scaled between 0.0 and 1.0, from the depth buffer at window coordinates x, y.
 
virtual SoDEPRECATED void adjustClippingPlanes ()
 
- Public Member Functions inherited from SoXtRenderArea
 SoXtRenderArea (SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, SbBool getMouseInput=TRUE, SbBool getKeyboardInput=TRUE)
 Constructor which is passed arguments which tell it whether to register the mouse and keyboard devices by default (SoXtMouse and SoXtKeyboard).
 
 ~SoXtRenderArea ()
 Destructor.
 
void registerDevice (SoXtDevice *d)
 Registers interest in devices.
 
void unregisterDevice (SoXtDevice *d)
 Unregisters interest in devices.
 
void setBackgroundColor (const SbColor &c)
 Sets the background color for this window.
 
SbColor getBackgroundColor () const
 Gets the background color for this window.
 
void setBackgroundIndex (int index)
 Sets the window background color when in color index mode.
 
int getBackgroundIndex () const
 Gets the window background color when in color index mode.
 
void setColorMap (int startIndex, int num, const SbColor *colors)
 Sets the colors to use when displaying in color index mode.
 
void setViewportRegion (const SbViewportRegion &newRegion)
 Sets viewport region to use for rendering.
 
const SbViewportRegiongetViewportRegion () const
 Gets current viewport region to use for rendering.
 
void setTransparencyType (SoGLRenderAction::TransparencyType type)
 Sets the algorithm for rendering transparent objects.
 
SoGLRenderAction::TransparencyType getTransparencyType () const
 Gets the algorithm for rendering transparent objects.
 
void setFastEditSavePolicy (SoGLRenderAction::FastEditSavePolicy policy, SbBool fastEditDelayedObjects=FALSE)
 Sets fast editing save policy to use when rendering.
 
SoGLRenderAction::FastEditSavePolicy getFastEditSavePolicy () const
 Returns fast editing save policy used when rendering.
 
void setInvalidateCacheMode (SoGLRenderAction::InvalidateCacheMode icm)
 Enables or disables the invalidation of render caches.
 
SoGLRenderAction::InvalidateCacheMode getInvalidateCacheMode ()
 Returns the current cache invalidation mode.
 
void setClearBeforeRender (SbBool trueOrFalse, SbBool zbTrueOrFalse=TRUE)
 Enables/prevents window clearing from happening before a rendering starts (default is clear TRUE).
 
SbBool isClearBeforeRender () const
 Queries whether the window will be cleared before rendering starts.
 
SbBool isClearZBufferBeforeRender () const
 Queries whether the depth buffer (sometimes called the Z buffer) will be cleared before rendering starts.
 
void setAutoRedraw (SbBool trueOrFalse)
 The render area will automatically redraw whenever something in the scene graph changes.
 
SbBool isAutoRedraw () const
 Queries whether the render area will automatically redraw whenever something in the scene graph changes.
 
void setRedrawPriority (uint32_t priority)
 Sets the priority of the redraw sensor.
 
uint32_t getRedrawPriority () const
 Gets the priority of the redraw sensor.
 
void render ()
 Calling this forces the render area to be redrawn now.
 
void scheduleRedraw ()
 Schedules a redraw to happen sometime soon (as opposed to immediately).
 
void redrawOnSelectionChange (SoSelection *s)
 Call this convenience method to have this render area redraw whenever the selection list changes in the passed node.
 
void setEventCallback (SoXtRenderAreaEventCB *fcn, void *userData=NULL)
 X events which occur in the render area window are either directly handled by the viewer (when this is really a viewer) or automatically translated to SoEvents, then passed into the scene graph (via the SoHandleEventAction) so that live scene graph objects can handle the event (when viewers are not in viewing mode).
 
void setSceneManager (SoSceneManager *sm)
 Sets the normal scene manager.
 
SoSceneManagergetSceneManager () const
 Gets the normal scene manager.
 
void setGLRenderAction (SoGLRenderAction *ra)
 Sets the GL render action to use.
 
SoGLRenderActiongetGLRenderAction () const
 Gets the current GL render action.
 
const SbGLShareContext getShareContext ()
 Returns the information needed to make OpenGL render contexts share OpenGL objects, for example, display lists and texture objects.
 
void setPostRenderCallback (SoXtRenderAreaRenderCB *fcn, void *userData=NULL)
 Specifies a function to be called after the Open Inventor render traversal and immediately before the OpenGL buffer swap.
 
SoXtRenderAreaRenderCB * getPostRenderCallback (const void *&userData) const
 Gets the post-render callback function and data.
 
void setFloatingColorBuffer (SbBool enable, FloatColorBufferSize size=FLOAT_16_COLOR_BUFFER)
 Enables/disables floating point rendering using 16- or 32-bit components.
 
void getFloatingColorBuffer (SbBool &enable, FloatColorBufferSize &size)
 Returns TRUE if floating point rendering is used and its precision.
 
void sendEvent (XAnyEvent *anEvent)
 Sends the event to be processed by the renderArea.
 
virtual void setMPEGRecorder (SoMPEGRenderer *recorder)
 Sets the recorder used for MPEG encoding.
 
virtual SoMPEGRenderergetMPEGRecorder () const
 Returns the recorder used for the MPEG encoding.
 
SoDEPRECATED void setAntialiasing (SbBool smoothing, int numPasses)
 Enables smoothing and/or multi-pass antialiasing for rendering.
 
SoDEPRECATED void getAntialiasing (SbBool &smoothing, int &numPasses) const
 Gets the antialiasing used for rendering.
 
void setAntialiasing (const float quality, const SoSceneManager::AntialiasingMode mode=SoSceneManager::AUTO)
 Enable (or disable) antialiasing with specified quality and mode.
 
void setAntialiasing (SoAntialiasingParameters *advancedParameters)
 Enable (or disable) antialiasing with specific parameters.
 
- Public Member Functions inherited from SoXtGLWidget
int getColorMapSize ()
 Returns the color map size.
 
virtual Window getNormalWindow ()
 Gets the current normal GL window, which is needed as an argument to glXMakeCurrent() when drawing in the normal planes.
 
SbGlContextHelper::GLContext getNormalContext () const
 Gets the current normal context, which is needed as an argument to glXMakeCurrent() when drawing in the normal planes.
 
SoGLContextgetNormalSoContext () const
 
SoWidget getNormalWidget () const
 Gets the current normal widget, which is needed as an argument to glXMakeCurrent() when drawing in the normal planes.
 
XVisualInfo * getNormalVisual ()
 Returns the visual for the normal window.
 
virtual void setDoubleBuffer (SbBool onOrOff)
 Routine that dynamically changes between single and double buffering.
 
SbBool isDoubleBuffer ()
 Returns whether double buffering is on or off.
 
void setAntialiasing (const float quality, const SoSceneManager::AntialiasingMode mode=SoSceneManager::AUTO)
 Enable (or disable) antialiasing with specified quality and mode.
 
void setAntialiasing (SoAntialiasingParameters *advancedParameters)
 Enable (or disable) antialiasing with specific parameters.
 
float getAntialiasingQuality () const
 Returns the antialiasing quality set using the setAntialiasing(float,AntialiasingMode) method.
 
SoSceneManager::AntialiasingMode getAntialiasingMode () const
 Returns the antialiasing mode set using the setAntialiasing(float,AntialiasingMode) method.
 
SoAntialiasingParametersgetAntialiasingParameters () const
 Returns the antialiasing parameters set using the setAntialiasing(SoAntialiasingParameters*) method.
 
void setBorder (SbBool onOrOff)
 Shows/hides a border of thickness 3 around the glX widgets.
 
SbBool isBorder () const
 Returns whether the border is on or off.
 
void setDrawToFrontBufferEnable (SbBool enableFlag)
 Sets drawing to the front buffer.
 
SbBool isDrawToFrontBufferEnable () const
 Queries drawing to the front buffer.
 
virtual SbBool bindNormalContext ()
 Makes the normal rendering context the current context.
 
virtual SbBool unbindNormalContext ()
 unbind the current context (previously bind with bindNormalContext );
 
virtual SbBool swapNormalBuffers ()
 Swaps the normal front and back buffers.
 
SoGLGraphicConfigTemplategetGraphicConfigTemplate ()
 Gets the current graphics configuration template.
 
void setGraphicConfigTemplate (SoGLGraphicConfigTemplate *gTemplate)
 Sets a new graphics configuration template.
 
void setFloatingColorBuffer (SbBool enable, FloatColorBufferSize size=FLOAT_16_COLOR_BUFFER)
 Enables/disables floating point rendering using 16- or 32-bit components.
 
void getFloatingColorBuffer (SbBool &enable, FloatColorBufferSize &size)
 Returns TRUE if floating point rendering is used and its precision.
 
bool saveSnapshot (const SbString &filename, bool overwrite=true)
 Save a snapshot of the current image displayed in the viewer.
 
- Public Member Functions inherited from SoXtComponent
virtual void show ()
 This shows the component.
 
SbBool isVisible ()
 Returns TRUE if this component is mapped onto the screen.
 
SoWidget getWidget () const
 This returns the base widget for this component.
 
SbBool isTopLevelShell () const
 Returns TRUE if this component is a top level shell component (has its own window).
 
SoWidget getShellWidget () const
 Returns the shell widget (NULL if the shell hasn't been created by this component).
 
SoWidget getParentWidget () const
 Returns the parent widget, be it a shell or not.
 
void setSize (const SbVec2s &size)
 Convenience routine on the widget.
 
SbVec2s getSize ()
 Convenience routine on the widget.
 
SbBool setFullScreen (const SbBool enable)
 Switches the viewer into (or out of) fullscreen mode.
 
SbBool isFullScreen (void) const
 Queries if the viewer is in fullscreen mode.
 
void setFullScreenEnable (const SbBool enable)
 Enables/disables fullscreen mode.
 
SbBool isFullScreenEnable () const
 Queries if it is possible to put the viewer in fullscreen mode.
 
Display * getDisplay ()
 Returns the X display associated with this components widget.
 
SoNONUNICODE void setTitle (const char *newTitle)
 Sets window title.
 
void setTitle (const SbString &newTitle)
 Sets window title.
 
SbString getTitle () const
 Gets window title.
 
SoNONUNICODE void setIconTitle (const char *newIconTitle)
 Sets icon title.
 
void setIconTitle (const SbString &newIconTitle)
 Sets icon title.
 
SbString getIconTitle () const
 Gets icon title.
 
void setWindowCloseCallback (SoXtComponentCB *func, void *data=NULL)
 Sets which callback to call when the user closes this component (double click in the upper left corner) - by default hide() is called on this component, unless a callback is set to something other than NULL.
 
SbString getWidgetName () const
 Returns the widget name.
 
SbString getClassName () const
 Returns the class name.
 
- Public Member Functions inherited from SoStereoViewer
virtual ~SoStereoViewer ()
 Destructor.
 

Public Attributes

SoStereoDialogm_stereoDialogBox
 Pointer to the stereo dialog.
 

Additional Inherited Members

- Static Public Member Functions inherited from SoXtRenderArea
static uint32_t getDefaultRedrawPriority ()
 Gets the default priority number of the redraw sensor.
 
- Static Public Member Functions inherited from SoXtComponent
static void displayHelp (const char *filename, UINT contextID)
 Static method to display the specified topic of the specified help file.
 
static SoXtComponentgetComponent (SoWidget w)
 This returns the SoXtComponent for this widget.
 

Detailed Description

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 SoXtFullViewer provide a flag for specifying whether the decoration and popup menus should be built.

RESOURCES

      !!------------------------------------------------
      !! 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
    

SEE ALSO

SoXtViewer, SoXtComponent, SoXtRenderArea, SoXtExaminerViewer, SoXtWalkViewer, SoXtFlyViewer, SoXtPlaneViewer

Definition at line 174 of file SoXtFullViewer.h.

Member Enumeration Documentation

◆ BuildFlag

enum SoXtFullViewer::BuildFlag

This specifies what should be build by default in the constructor

Enumerator
BUILD_NONE 

Doesn't build anything extra.

BUILD_DECORATION 

Build the decoration only.

BUILD_POPUP 

Build the popup menu only.

BUILD_ALL 

Build everything by default.

Definition at line 178 of file SoXtFullViewer.h.

Member Function Documentation

◆ addAppPushButton()

void SoXtFullViewer::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.

◆ findAppPushButton()

int SoXtFullViewer::findAppPushButton ( SoWidget  oldButton)
inline

Returns index of specified push button.

Definition at line 282 of file SoXtFullViewer.h.

◆ getAppPushButtonParent()

SoWidget SoXtFullViewer::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.

Definition at line 253 of file SoXtFullViewer.h.

◆ getRenderAreaWidget()

SoWidget SoXtFullViewer::getRenderAreaWidget ( )
inline

Returns the render area widget.

Definition at line 292 of file SoXtFullViewer.h.

◆ getStereoDialog()

SoStereoDialog * SoXtFullViewer::getStereoDialog ( )
inline

Definition at line 303 of file SoXtFullViewer.h.

◆ hide()

virtual void SoXtFullViewer::hide ( )
virtual

This hides the component.

Reimplemented from SoXtComponent.

◆ insertAppPushButton()

void SoXtFullViewer::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.

◆ isDecoration()

SbBool SoXtFullViewer::isDecoration ( )
inline

Returns whether the viewer component trim is on or off.

Definition at line 210 of file SoXtFullViewer.h.

◆ isPopupMenuEnabled()

SbBool SoXtFullViewer::isPopupMenuEnabled ( )
inline

Returns whether the viewer popup menu is enabled or disabled.

Definition at line 246 of file SoXtFullViewer.h.

◆ lengthAppPushButton()

int SoXtFullViewer::lengthAppPushButton ( )
inline

Returns number of application push buttons.

Definition at line 287 of file SoXtFullViewer.h.

◆ removeAppPushButton()

void SoXtFullViewer::removeAppPushButton ( SoWidget  oldButton)

Removes specified application push button.

◆ setBufferingType()

virtual void SoXtFullViewer::setBufferingType ( SoXtViewer::BufferType  type)
virtual

Sets the current buffering type in the main view (default SoXtViewer::BUFFER_DOUBLE).

Reimplemented from SoXtViewer.

◆ setCamera()

virtual void SoXtFullViewer::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 SoXtViewer.

Reimplemented in SoXtExaminerViewer, SoXtFlyViewer, SoXtPlaneViewer, SoXtWalkViewer, and SoXtConstrainedViewer.

◆ setDecoration()

void SoXtFullViewer::setDecoration ( SbBool  onOrOff)

Shows/hides the viewer component trim (default on).

See the viewer constructor to prevent the decoration from being built.

The default value can be set using the environment variable OIV_VIEWER_DECORATION (0 = OFF, 1 = ON).

◆ setDrawStyle()

virtual void SoXtFullViewer::setDrawStyle ( SoXtViewer::DrawType  type,
SoXtViewer::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.

The default value can be set using the environment variables OIV_STILL_DRAW_STYLE and OIV_INTERACTIVE_DRAW_STYLE. Valid values are VIEW_AS_IS, VIEW_HIDDEN_LINE, VIEW_NO_TEXTURE, VIEW_LOW_COMPLEXITY, VIEW_LINE, VIEW_POINT, VIEW_BBOX, VIEW_LOW_RES_LINE, VIEW_LOW_RES_POINT for OIV_STILL_DRAW_STYLE and the same plus VIEW_SAME_AS_STILL for OIV_INTERACTIVE_DRAW_STYLE.

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 SoXtViewer.

◆ setHeadlight()

virtual void SoXtFullViewer::setHeadlight ( SbBool  onOrOff)
virtual

Turns the headlight on/off (default on).



The default value can be set using the environment variable OIV_USE_HEADLIGHT (0 = FALSE, 1 = TRUE).

Reimplemented from SoXtViewer.

◆ setPopupMenuEnabled()

void SoXtFullViewer::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:

  • Functions: Manage the position of the camera: -> Home see resetToHomePosition() -> Set home see saveHomePosition() -> View all see viewAll() -> Seek see seekToPoint(const SbVec2s& mouseLocation)
  • DrawStyle: Manage the draw style and buffering style: -> see setDrawStyle(DrawType type, DrawStyle style) -> see setBufferingType(BufferType type)
  • Viewing: see setViewing()
  • Decorations: see setDecoration()
  • FullScreen: see setFullScreen()
  • HeadLight: see setHeadlight()
  • Preferences: -> Seek to point: Enables/disables seek mode (like the 'S' key) -> Auto clip planes: Enables/disables automatic clipping -> Automatic interactive mode: Enables/disables automatic interactive mode -> Stereo: Opens the stereo dialog -> Anti-aliasing: see setFullSceneAntialiasing() -> Record: Opens the recording dialog -> Rotation axes: Shows/hides the rotation axes

◆ setStereoDialog()

void SoXtFullViewer::setStereoDialog ( SoStereoDialog newDialog)
inline

Definition at line 304 of file SoXtFullViewer.h.

◆ setViewing()

virtual void SoXtFullViewer::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 SoXtViewer.

Reimplemented in SoXtExaminerViewer, SoXtFlyViewer, SoXtPlaneViewer, and SoXtWalkViewer.

Member Data Documentation

◆ m_stereoDialogBox

SoStereoDialog* SoXtFullViewer::m_stereoDialogBox

Pointer to the stereo dialog.

Definition at line 309 of file SoXtFullViewer.h.


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