Coin Logo http://www.sim.no
http://www.coin3d.org

SoQtViewer Class Reference
[Qt ComponentsQt Viewer Components]

#include <Inventor/Qt/viewers/SoQtViewer.h>

Inheritance diagram for SoQtViewer:

SoQtRenderArea SoQtGLWidget SoQtComponent SoQtObject SoQtFullViewer SoQtConstrainedViewer SoQtExaminerViewer SoQtPlaneViewer SoQtFlyViewer

List of all members.


Detailed Description

The SoQtViewer class is the top level base viewer class.

This is an abstract class, which adds the following features to it's SoQtRenderArea superclass: convenient methods for camera handling, an automatic headlight configuration.

As for the camera handling: when setting a new scenegraph for the viewer, the scenegraph will automatically be scanned for a node derived from SoCamera. If not found, the viewer will itself set up a camera for the scene. The camera can then be conveniently controlled by the application programmers in many aspects:

Note that there is no dragger or manipulator attached to the scene camera. The camera transform manipulation is calculated in a more direct manner in the non-abstract viewer classes inheriting SoQtViewer by reading mouse and keyboard events and interpreting how these should influence the camera. The calculations results in new values for SoCamera::position, SoCamera::orientation, and the other SoCamera field values for the camera designated to be the viewer viewpoint camera. These values are then inserted directly into the viewer's SoCamera node.

See e.g. the source code for SoQtExaminerViewer::processSoEvent() for the details.

The SoQtViewer class automatically adds a headlight to the scene, which will always point in the approximate same direction as the current viewer camera, thereby securing that the scene geometry is always lighted and visible. (If you don't want the constant headlight, but rather want to light the scene on your own, this behavior can be turned off with SoQtViewer::setHeadlight()).

SoQtViewer-derived viewers all inherit the following keyboard controls from this class (but only when the viewer is in "examine mode", ie SoQtViewer::isViewing() returns TRUE):


Public Types

enum  Type { BROWSER, EDITOR }
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, VIEW_WIREFRAME_OVERLAY
}
enum  DrawType { STILL = 0, INTERACTIVE }
enum  BufferType { BUFFER_SINGLE, BUFFER_DOUBLE, BUFFER_INTERACTIVE }
enum  AutoClippingStrategy { VARIABLE_NEAR_PLANE, CONSTANT_NEAR_PLANE }
enum  StereoType {
  STEREO_NONE, STEREO_ANAGLYPH, STEREO_QUADBUFFER, STEREO_INTERLEAVED_ROWS,
  STEREO_INTERLEAVED_COLUMNS
}

Public Member Functions

virtual void setCamera (SoCamera *camera)
SoCamera * getCamera (void) const
virtual void setCameraType (SoType type)
SoType getCameraType (void) const
virtual void toggleCameraType (void)
virtual void viewAll (void)
virtual void saveHomePosition (void)
virtual void resetToHomePosition (void)
virtual void setHeadlight (SbBool enable)
SbBool isHeadlight (void) const
SoDirectionalLight * getHeadlight (void) const
virtual void setDrawStyle (SoQtViewer::DrawType type, SoQtViewer::DrawStyle style)
SoQtViewer::DrawStyle getDrawStyle (const SoQtViewer::DrawType type) const
virtual void setBufferingType (SoQtViewer::BufferType type)
SoQtViewer::BufferType getBufferingType (void) const
virtual void setViewing (SbBool enable)
SbBool isViewing (void) const
virtual void setCursorEnabled (SbBool enable)
SbBool isCursorEnabled (void) const
void setAutoClipping (SbBool enable)
SbBool isAutoClipping (void) const
void setAutoClippingStrategy (const AutoClippingStrategy strategy, const float value=0.6f, SoQtAutoClippingCB *cb=NULL, void *cbuserdata=NULL)
virtual void setStereoViewing (SbBool enable)
SbBool isStereoViewing (void) const
virtual void setStereoOffset (const float dist)
float getStereoOffset (void) const
SbBool setStereoType (SoQtViewer::StereoType s)
SoQtViewer::StereoType getStereoType (void) const
void setAnaglyphStereoColorMasks (const SbBool left[3], const SbBool right[3])
void getAnaglyphStereoColorMasks (SbBool left[3], SbBool right[3])
void setDetailSeek (const SbBool enable)
SbBool isDetailSeek (void) const
void setSeekTime (const float seconds)
float getSeekTime (void) const
void addStartCallback (SoQtViewerCB *func, void *data=NULL)
void addFinishCallback (SoQtViewerCB *func, void *data=NULL)
void removeStartCallback (SoQtViewerCB *func, void *data=NULL)
void removeFinishCallback (SoQtViewerCB *func, void *data=NULL)
void setWireframeOverlayColor (const SbColor &color)
const SbColor & getWireframeOverlayColor (void) const
virtual void setDoubleBuffer (const SbBool enable)
virtual void setSceneGraph (SoNode *root)
virtual SoNode * getSceneGraph (void)

Protected Member Functions

 SoQtViewer (QWidget *parent, const char *name, SbBool embed, Type type, SbBool build)
 ~SoQtViewer ()
virtual void sizeChanged (const SbVec2s &size)
virtual void setSeekMode (SbBool enable)
SbBool isSeekMode (void) const
SbBool seekToPoint (const SbVec2s screenpos)
void seekToPoint (const SbVec3f &scenepos)
virtual void computeSeekFinalOrientation (void)
virtual void actualRedraw (void)
virtual SbBool processSoEvent (const SoEvent *const event)
void interactiveCountInc (void)
void interactiveCountDec (void)
int getInteractiveCount (void) const
void setSeekDistance (const float distance)
float getSeekDistance (void) const
void setSeekValueAsPercentage (const SbBool on)
SbBool isSeekValuePercentage (void) const
virtual void changeCameraValues (SoCamera *camera)
void addSuperimposition (SoNode *scene)
void removeSuperimposition (SoNode *scene)
void setSuperimpositionEnabled (SoNode *scene, const SbBool enable)
SbBool getSuperimpositionEnabled (SoNode *scene) const

Friends

class SoQtViewerP

Member Enumeration Documentation

Hints about what context the viewer will be used in. Usually not very interesting for the application programmer, it doesn't matter much which value is used for the viewer type. This "feature" of the viewer is included just to be compatible with the old SGI Inventor API.

Enumerator:
BROWSER  If a user-supplied scenegraph passed into the setSceneGraph() function does not contain a camera, setting the viewer type to BROWSER will make the viewer in that case automatically set up a camera outside the scene, as part of the viewer's private and hidden "supergraph".
EDITOR  If a user-supplied scenegraph passed into the setSceneGraph) function does not contain a camera, setting the viewer type to EDITOR will make the viewer in that case automatically set up a camera in the user-supplied scene.

So if you want to avoid having the SoQtViewer class muck about with your supplied scenegraph, set the type-flag to SoQtViewer::BROWSER instead.

Decides drawstyle for a scene with either a still camera or an animating camera.

See also:
SoQtViewer::setDrawStyle(), SoQtViewer::DrawType
Enumerator:
VIEW_AS_IS  Normal rendering, draws all scene geometry in it's original style.
VIEW_HIDDEN_LINE  Draw scene in "hidden line" mode: that is, as wireframe with no "see-through".

Note that this is actually an expensive way to render, as the scene must be rendered twice to achieve the effect of hiding lines behind the invisible geometry.

VIEW_NO_TEXTURE  Render scene without textures.
VIEW_LOW_COMPLEXITY  Render all "complex" shape types with low complexity to improve rendering performance.

"Complex shapes" in this context includes spheres, cones, cylinder, NURBS surfaces, and others which are tesselated to polygons before being rendered.

VIEW_LINE  View all polygon geometry in wireframe mode.
VIEW_POINT  Render only the vertex positions of the geometry.
VIEW_BBOX  View the scene's bounding boxes, instead of rendering the full geometry.

A very efficient way of optimizing rendering performance for scenes with high primitive counts while moving the camera about is to set this mode for the SoQtViewer::INTERACTIVE DrawType.

VIEW_LOW_RES_LINE  Render as wireframe and don't bother with getting them rendered correctly in depth.
VIEW_LOW_RES_POINT  Render as vertex points and don't bother with getting them rendered correctly in depth.
VIEW_SAME_AS_STILL  Always render a scene with an animating camera (ie SoQtViewer::INTERACTIVE DrawType) in the same manner as scene with a still camera.
VIEW_WIREFRAME_OVERLAY  Render the scene as normal, but overlay a set of lines showing the contours of all polygons.

Contains valid values for the first argument to the SoQtViewer::setDrawStyle() call. Decides the effect of the second argument.

See also:
SoQtViewer::setDrawStyle(), SoQtViewer::DrawStyle
Enumerator:
STILL  If this value is passed as the first argument of SoQtViewer::setDrawStyle(), the second argument decides which draw style to use when the viewer camera is standing still in the same position with the same orientation -- i.e. when the end user is not interacting with the scene camera.
INTERACTIVE  If this value is passed as the first argument of SoQtViewer::setDrawStyle(), the second argument decides which draw style to use when the end user is interacting with the scene camera, causing continuous animation redraws.

ass="memproto"> SoQtViewer::DrawType type) const
virtual void setBufferingType (SoQtViewer::BufferType type)
SoQtViewer::BufferType getBufferingType (void) const
virtual void setViewing (SbBool enable)
SbBool isViewing (void) const
virtual void setCursorEnabled (SbBool enable)
SbBool isCursorEnabled (void) const
void setAutoClipping (SbBool enable)
SbBool isAutoClipping (void) const
void setAutoClippingStrategy (const AutoClippingStrategy strategy, const float value=0.6f, SoQtAutoClippingCB *cb=NULL, void *cbuserdata=NULL)
virtual void setStereoViewing (SbBool enable)
SbBool isStereoViewing (void) const
virtual void setStereoOffset (const float dist)
float getStereoOffset (void) const
SbBool setStereoType (SoQtViewer::StereoType s)
SoQtViewer::StereoType getStereoType (void) const
void setAnaglyphStereoColorMasks (const SbBool left[3], const SbBool right[3])
void getAnaglyphStereoColorMasks (SbBool left[3], SbBool right[3])
void setDetailSeek (const SbBool enable)
SbBool isDetailSeek (void) const
void setSeekTime (const float seconds)
float getSeekTime (void) const
void addStartCallback (SoQtViewerCB *func, void *data=NULL)
void addFinishCallback (SoQtViewerCB *func, void *data=NULL)
void removeStartCallback (SoQtViewerCB *func, void *data=NULL)
void removeFinishCallback (SoQtViewerCB *func, void *data=NULL)
void setWireframeOverlayColor (const SbColor &color)
const SbColor & getWireframeOverlayColor (void) const
virtual void setDoubleBuffer (const SbBool enable)
virtual void setSceneGraph (SoNode *root)
virtual SoNode * getSceneGraph (void)

Protected Member Functions

 SoQtViewer (QWidget *parent, const char *name, SbBool embed, Type type, SbBool build)
 ~SoQtViewer ()
virtual void sizeChanged (const SbVec2s &size)
virtual void setSeekMode (SbBool enable)
SbBool isSeekMode (void) const
SbBool seekToPoint (const SbVec2s screenpos)
void seekToPoint (const SbVec3f &scenepos)
virtual void computeSeekFinalOrientation (void)
virtual void actualRedraw (void)
virtual SbBool processSoEvent (const SoEvent *const event)
void interactiveCountInc (void)
void interactiveCountDec (void)
int getInteractiveCount (void) const
void setSeekDistance (const float distance)
float getSeekDistance (void) const
void setSeekValueAsPercentage (const SbBool on)
SbBool isSeekValuePercentage (void) const
virtual void changeCameraValues (SoCamera *camera)
void addSuperimposition (SoNode *scene)
void removeSuperimposition (SoNode *scene)
void setSuperimpositionEnabled (SoNode *scene, const SbBool enable)
SbBool getSuperimpositionEnabled (SoNode *scene) const

Friends

class SoQtViewerP


Member Enumeration Documentation

Hints about what context the viewer will be used in. Usually not very interesting for the application programmer, it doesn't matter much which value is used for the viewer type. This "feature" of the viewer is included just to be compatible with the old SGI Inventor API.

Enumerator:
BROWSER  If a user-supplied scenegraph passed into the setSceneGraph() function does not contain a camera, setting the viewer type to BROWSER will make the viewer in that case automatically set up a camera outside the scene, as part of the viewer's private and hidden "supergraph".
EDITOR  If a user-supplied scenegraph passed into the setSceneGraph) function does not contain a camera, setting the viewer type to EDITOR will make the viewer in that case automatically set up a camera in the user-supplied scene.

So if you want to avoid having the SoQtViewer class muck about with your supplied scenegraph, set the type-flag to SoQtViewer::BROWSER instead.

Decides drawstyle for a scene with either a still camera or an animating camera.

See also:
SoQtViewer::setDrawStyle(), SoQtViewer::DrawType
Enumerator:
VIEW_AS_IS  Normal rendering, draws all scene geometry in it's original style.
VIEW_HIDDEN_LINE  Draw scene in "hidden line" mode: that is, as wireframe with no "see-through".

Note that this is actually an expensive way to render, as the scene must be rendered twice to achieve the effect of hiding lines behind the invisible geometry.

VIEW_NO_TEXTURE  Render scene without textures.
VIEW_LOW_COMPLEXITY  Render all "complex" shape types with low complexity to improve rendering performance.

"Complex shapes" in this context includes spheres, cones, cylinder, NURBS surfaces, and others which are tesselated to polygons before being rendered.

VIEW_LINE  View all polygon geometry in wireframe mode.
VIEW_POINT  Render only the vertex positions of the geometry.
VIEW_BBOX  View the scene's bounding boxes, instead of rendering the full geometry.

A very efficient way of optimizing rendering performance for scenes with high primitive counts while moving the camera about is to set this mode for the SoQtViewer::INTERACTIVE DrawType.

VIEW_LOW_RES_LINE  Render as wireframe and don't bother with getting them rendered correctly in depth.
VIEW_LOW_RES_POINT  Render as vertex points and don't bother with getting them rendered correctly in depth.
VIEW_SAME_AS_STILL  Always render a scene with an animating camera (ie SoQtViewer::INTERACTIVE DrawType) in the same manner as scene with a still camera.
VIEW_WIREFRAME_OVERLAY  Render the scene as normal, but overlay a set of lines showing the contours of all polygons.

Contains valid values for the first argument to the SoQtViewer::setDrawStyle() call. Decides the effect of the second argument.

See also:
SoQtViewer::setDrawStyle(), SoQtViewer::DrawStyle
Enumerator:
STILL  If this value is passed as the first argument of SoQtViewer::setDrawStyle(), the second argument decides which draw style to use when the viewer camera is standing still in the same position with the same orientation -- i.e. when the end user is not interacting with the scene camera.
INTERACTIVE  If this value is passed as the first argument of SoQtViewer::setDrawStyle(), the second argument decides which draw style to use when the end user is interacting with the scene camera, causing continuous animation redraws.

ass="memproto"> SoQtViewer::DrawType type) const
virtual void setBufferingType (SoQtViewer::BufferType type)
SoQtViewer::BufferType getBufferingType (void) const
virtual void setViewing (SbBool enable)
SbBool isViewing (void) const
virtual void setCursorEnabled (SbBool enable)
SbBool isCursorEnabled (void) const
void setAutoClipping (SbBool enable)
SbBool isAutoClipping (void) const
void setAutoClippingStrategy (const AutoClippingStrategy strategy, const float value=0.6f, SoQtAutoClippingCB *cb=NULL, void *cbuserdata=NULL)
virtual void setStereoViewing (SbBool enable)
SbBool isStereoViewing (void) const
virtual void setStereoOffset (const float dist)
float getStereoOffset (void) const
SbBool setStereoType (SoQtViewer::StereoType s)
SoQtViewer::StereoType getStereoType (void) const
void setAnaglyphStereoColorMasks (const SbBool left[3], const SbBool right[3])
void getAnaglyphStereoColorMasks (SbBool left[3], SbBool right[3])
void setDetailSeek (const SbBool enable)
SbBool isDetailSeek (void) const
void setSeekTime (const float seconds)
float getSeekTime (void) const
void addStartCallback (SoQtViewerCB *func, void *data=NULL)
void addFinishCallback (SoQtViewerCB *func, void *data=NULL)
void removeStartCallback (SoQtViewerCB *func, void *data=NULL)
void removeFinishCallback (SoQtViewerCB *func, void *data=NULL)
void setWireframeOverlayColor (const SbColor &color)
const SbColor & getWireframeOverlayColor (void) const
virtual void setDoubleBuffer (const SbBool enable)
virtual void setSceneGraph (SoNode *root)
virtual SoNode * getSceneGraph (void)

Protected Member Functions

 SoQtViewer (QWidget *parent, const char *name, SbBool embed, Type type, SbBool build)
 ~SoQtViewer ()
virtual void sizeChanged (const SbVec2s &size)
virtual void setSeekMode (SbBool enable)
SbBool isSeekMode (void) const
SbBool seekToPoint (const SbVec2s screenpos)
void seekToPoint (const SbVec3f &scenepos)
virtual void computeSeekFinalOrientation (void)
virtual void actualRedraw (void)
virtual SbBool processSoEvent (const SoEvent *const event)
void interactiveCountInc (void)
void interactiveCountDec (void)
int getInteractiveCount (void) const
void setSeekDistance (const float distance)
float getSeekDistance (void) const
void setSeekValueAsPercentage (const SbBool on)
SbBool isSeekValuePercentage (void) const
virtual void changeCameraValues (SoCamera *camera)
void addSuperimposition (SoNode *scene)
void removeSuperimposition (SoNode *scene)
void setSuperimpositionEnabled (SoNode *scene, const SbBool enable)
SbBool getSuperimpositionEnabled (SoNode *scene) const

Friends

class SoQtViewerP


Member Enumeration Documentation

Hints about what context the viewer will be used in. Usually not very interesting for the application programmer, it doesn't matter much which value is used for the viewer type. This "feature" of the viewer is included just to be compatible with the old SGI Inventor API.

Enumerator:
BROWSER  If a user-supplied scenegraph passed into the setSceneGraph() function does not contain a camera, setting the viewer type to BROWSER will make the viewer in that case automatically set up a camera outside the scene, as part of the viewer's private and hidden "supergraph".
EDITOR  If a user-supplied scenegraph passed into the setSceneGraph) function does not contain a camera, setting the viewer type to EDITOR will make the viewer in that case automatically set up a camera in the user-supplied scene.

So if you want to avoid having the SoQtViewer class muck about with your supplied scenegraph, set the type-flag to SoQtViewer::BROWSER instead.

Decides drawstyle for a scene with either a still camera or an animating camera.

See also:
SoQtViewer::setDrawStyle(), SoQtViewer::DrawType
Enumerator:
VIEW_AS_IS  Normal rendering, draws all scene geometry in it's original style.
VIEW_HIDDEN_LINE  Draw scene in "hidden line" mode: that is, as wireframe with no "see-through".

Note that this is actually an expensive way to render, as the scene must be rendered twice to achieve the effect of hiding lines behind the invisible geometry.

VIEW_NO_TEXTURE  Render scene without textures.
VIEW_LOW_COMPLEXITY  Render all "complex" shape types with low complexity to improve rendering performance.

"Complex shapes" in this context includes spheres, cones, cylinder, NURBS surfaces, and others which are tesselated to polygons before being rendered.

VIEW_LINE  View all polygon geometry in wireframe mode.
VIEW_POINT  Render only the vertex positions of the geometry.
VIEW_BBOX  View the scene's bounding boxes, instead of rendering the full geometry.

A very efficient way of optimizing rendering performance for scenes with high primitive counts while moving the camera about is to set this mode for the SoQtViewer::INTERACTIVE DrawType.

VIEW_LOW_RES_LINE  Render as wireframe and don't bother with getting them rendered correctly in depth.
VIEW_LOW_RES_POINT  Render as vertex points and don't bother with getting them rendered correctly in depth.
VIEW_SAME_AS_STILL  Always render a scene with an animating camera (ie SoQtViewer::INTERACTIVE DrawType) in the same manner as scene with a still camera.
VIEW_WIREFRAME_OVERLAY  Render the scene as normal, but overlay a set of lines showing the contours of all polygons.

Contains valid values for the first argument to the SoQtViewer::setDrawStyle() call. Decides the effect of the second argument.

See also:
SoQtViewer::setDrawStyle(), SoQtViewer::DrawStyle
Enumerator:
STILL  If this value is passed as the first argument of SoQtViewer::setDrawStyle(), the second argument decides which draw style to use when the viewer camera is standing still in the same position with the same orientation -- i.e. when the end user is not interacting with the scene camera.
INTERACTIVE  If this value is passed as the first argument of SoQtViewer::setDrawStyle(), the second argument decides which draw style to use when the end user is interacting with the scene camera, causing continuous animation redraws.

ass="memproto"> SoQtViewer::DrawType type) const
virtual void setBufferingType (SoQtViewer::BufferType type)
SoQtViewer::BufferType getBufferingType (void) const
virtual void setViewing (SbBool enable)
SbBool isViewing (void) const
virtual void setCursorEnabled (SbBool enable)
SbBool isCursorEnabled (void) const
void setAutoClipping (SbBool enable)
SbBool isAutoClipping (void) const
void setAutoClippingStrategy (const AutoClippingStrategy strategy, const float value=0.6f, SoQtAutoClippingCB *cb=NULL, void *cbuserdata=NULL)
virtual void setStereoViewing (SbBool enable)
SbBool isStereoViewing (void) const
virtual void setStereoOffset (const float dist)
float getStereoOffset (void) const
SbBool setStereoType (SoQtViewer::StereoType s)
SoQtViewer::StereoType getStereoType (void) const
void setAnaglyphStereoColorMasks (const SbBool left[3], const SbBool right[3])
void getAnaglyphStereoColorMasks (SbBool left[3], SbBool right[3])
void setDetailSeek (const SbBool enable)
SbBool isDetailSeek (void) const
void setSeekTime (const float seconds)
float getSeekTime (void) const
void addStartCallback (SoQtViewerCB *func, void *data=NULL)
void addFinishCallback (SoQtViewerCB *func, void *data=NULL)
void removeStartCallback (SoQtViewerCB *func, void *data=NULL)
void removeFinishCallback (SoQtViewerCB *func, void *data=NULL)
void setWireframeOverlayColor (const SbColor &color)
const SbColor & getWireframeOverlayColor (void) const
virtual void setDoubleBuffer (const SbBool enable)
virtual void setSceneGraph (SoNode *root)
virtual SoNode * getSceneGraph (void)

Protected Member Functions

 SoQtViewer (QWidget *parent, const char *name, SbBool embed, Type type, SbBool build)
 ~SoQtViewer ()
virtual void sizeChanged (const SbVec2s &size)
virtual void setSeekMode (SbBool enable)
SbBool isSeekMode (void) const
SbBool seekToPoint (const SbVec2s screenpos)
void seekToPoint (const SbVec3f &scenepos)
virtual void computeSeekFinalOrientation (void)
virtual void actualRedraw (void)
virtual SbBool processSoEvent (const SoEvent *const event)
void interactiveCountInc (void)
void interactiveCountDec (void)
int getInteractiveCount (void) const
void setSeekDistance (const float distance)
float getSeekDistance (void) const
void setSeekValueAsPercentage (const SbBool on)
SbBool isSeekValuePercentage (void) const
virtual void changeCameraValues (SoCamera *camera)
void addSuperimposition (SoNode *scene)
void removeSuperimposition (SoNode *scene)
void setSuperimpositionEnabled (SoNode *scene, const SbBool enable)
SbBool getSuperimpositionEnabled (SoNode *scene) const

Friends

class SoQtViewerP


Member Enumeration Documentation

Hints about what context the viewer will be used in. Usually not very interesting for the application programmer, it doesn't matter much which value is used for the viewer type. This "feature" of the viewer is included just to be compatible with the old SGI Inventor API.

Enumerator:
BROWSER  If a user-supplied scenegraph passed into the setSceneGraph() function does not contain a camera, setting the viewer type to BROWSER will make the viewer in that case automatically set up a camera outside the scene, as part of the viewer's private and hidden "supergraph".
EDITOR  If a user-supplied scenegraph passed into the setSceneGraph) function does not contain a camera, setting the viewer type to EDITOR will make the viewer in that case automatically set up a camera in the user-supplied scene.

So if you want to avoid having the SoQtViewer class muck about with your supplied scenegraph, set the type-flag to SoQtViewer::BROWSER instead.

Decides drawstyle for a scene with either a still camera or an animating camera.

See also:
SoQtViewer::setDrawStyle(), SoQtViewer::DrawType
Enumerator:
VIEW_AS_IS  Normal rendering, draws all scene geometry in it's original style.
VIEW_HIDDEN_LINE  Draw scene in "hidden line" mode: that is, as wireframe with no "see-through".

Note that this is actually an expensive way to render, as the scene must be rendered twice to achieve the effect of hiding lines behind the invisible geometry.

VIEW_NO_TEXTURE  Render scene without textures.
VIEW_LOW_COMPLEXITY  Render all "complex" shape types with low complexity to improve rendering performance.

"Complex shapes" in this context includes spheres, cones, cylinder, NURBS surfaces, and others which are tesselated to polygons before being rendered.

VIEW_LINE  View all polygon geometry in wireframe mode.
VIEW_POINT  Render only the vertex positions of the geometry.
VIEW_BBOX  View the scene's bounding boxes, instead of rendering the full geometry.

A very efficient way of optimizing rendering performance for scenes with high primitive counts while moving the camera about is to set this mode for the SoQtViewer::INTERACTIVE DrawType.

VIEW_LOW_RES_LINE  Render as wireframe and don't bother with getting them rendered correctly in depth.
VIEW_LOW_RES_POINT  Render as vertex points and don't bother with getting them rendered correctly in depth.
VIEW_SAME_AS_STILL  Always render a scene with an animating camera (ie SoQtViewer::INTERACTIVE DrawType) in the same manner as scene with a still camera.
VIEW_WIREFRAME_OVERLAY  Render the scene as normal, but overlay a set of lines showing the contours of all polygons.

Contains valid values for the first argument to the SoQtViewer::setDrawStyle() call. Decides the effect of the second argument.

See also:
SoQtViewer::setDrawStyle(), SoQtViewer::DrawStyle
Enumerator:
STILL  If this value is passed as the first argument of SoQtViewer::setDrawStyle(), the second argument decides which draw style to use when the viewer camera is standing still in the same position with the same orientation -- i.e. when the end user is not interacting with the scene camera.
INTERACTIVE  If this value is passed as the first argument of SoQtViewer::setDrawStyle(), the second argument decides which draw style to use when the end user is interacting with the scene camera, causing continuous animation redraws.

ass="memproto"> SoQtViewer::DrawType type) const
virtual void setBufferingType (SoQtViewer::BufferType type)
SoQtViewer::BufferType getBufferingType (void) const
virtual void setViewing (SbBool enable)
SbBool isViewing (void) const
virtual void setCursorEnabled (SbBool enable)
SbBool isCursorEnabled (void) const
void setAutoClipping (SbBool enable)
SbBool isAutoClipping (void) const
void setAutoClippingStrategy (const AutoClippingStrategy strategy, const float value=0.6f, SoQtAutoClippingCB *cb=NULL, void *cbuserdata=NULL)
virtual void setStereoViewing (SbBool enable)
SbBool isStereoViewing (void) const
virtual void setStereoOffset (const float dist)
float getStereoOffset (void) const
SbBool setStereoType (SoQtViewer::StereoType s)
SoQtViewer::StereoType getStereoType (void) const
void setAnaglyphStereoColorMasks (const SbBool left[3], const SbBool right[3])
void getAnaglyphStereoColorMasks (SbBool left[3], SbBool right[3])
void setDetailSeek (const SbBool enable)
SbBool isDetailSeek (void) const
void setSeekTime (const float seconds)
float getSeekTime (void) const
void addStartCallback (SoQtViewerCB *func, void *data=NULL)
void addFinishCallback (SoQtViewerCB *func, void *data=NULL)
void removeStartCallback (SoQtViewerCB *func, void *data=NULL)
void removeFinishCallback (SoQtViewerCB *func, void *data=NULL)
void setWireframeOverlayColor (const SbColor &color)
const SbColor & getWireframeOverlayColor (void) const
virtual void setDoubleBuffer (const SbBool enable)
virtual void setSceneGraph (SoNode *root)
virtual SoNode * getSceneGraph (void)

Protected Member Functions

 SoQtViewer (QWidget *parent, const char *name, SbBool embed, Type type, SbBool build)
 ~SoQtViewer ()
virtual void sizeChanged (const SbVec2s &size)
virtual void setSeekMode (SbBool enable)
SbBool isSeekMode (void) const
SbBool seekToPoint (const SbVec2s screenpos)
void seekToPoint (const SbVec3f &scenepos)
virtual void computeSeekFinalOrientation (void)
virtual void actualRedraw (void)
virtual SbBool processSoEvent (const SoEvent *const event)
void interactiveCountInc (void)
void interactiveCountDec (void)
int getInteractiveCount (void) const
void setSeekDistance (const float distance)
float getSeekDistance (void) const
void setSeekValueAsPercentage (const SbBool on)
SbBool isSeekValuePercentage (void) const
virtual void changeCameraValues (SoCamera *camera)
void addSuperimposition (SoNode *scene)
void removeSuperimposition (SoNode *scene)
void setSuperimpositionEnabled (SoNode *scene, const SbBool enable)
SbBool getSuperimpositionEnabled (SoNode *scene) const

Friends

class SoQtViewerP


Member Enumeration Documentation

Hints about what context the viewer will be used in. Usually not very interesting for the application programmer, it doesn't matter much which value is used for the viewer type. This "feature" of the viewer is included just to be compatible with the old SGI Inventor API.

Enumerator:
BROWSER  If a user-supplied scenegraph passed into the setSceneGraph() function does not contain a camera, setting the viewer type to BROWSER will make the viewer in that case automatically set up a camera outside the scene, as part of the viewer's private and hidden "supergraph".
EDITOR  If a user-supplied scenegraph passed into the setSceneGraph) function does not contain a camera, setting the viewer type to EDITOR will make the viewer in that case automatically set up a camera in the user-supplied scene.

So if you want to avoid having the SoQtViewer class muck about with your supplied scenegraph, set the type-flag to SoQtViewer::BROWSER instead.

Decides drawstyle for a scene with either a still camera or an animating camera.

See also:
SoQtViewer::setDrawStyle(), SoQtViewer::DrawType
Enumerator:
VIEW_AS_IS  Normal rendering, draws all scene geometry in it's original style.
VIEW_HIDDEN_LINE  Draw scene in "hidden line" mode: that is, as wireframe with no "see-through".

Note that this is actually an expensive way to render, as the scene must be rendered twice to achieve the effect of hiding lines behind the invisible geometry.

VIEW_NO_TEXTURE  Render scene without textures.
VIEW_LOW_COMPLEXITY  Render all "complex" shape types with low complexity to improve rendering performance.

"Complex shapes" in this context includes spheres, cones, cylinder, NURBS surfaces, and others which are tesselated to polygons before being rendered.

VIEW_LINE  View all polygon geometry in wireframe mode.
VIEW_POINT  Render only the vertex positions of the geometry.
VIEW_BBOX  View the scene's bounding boxes, instead of rendering the full geometry.

A very efficient way of optimizing rendering performance for scenes with high primitive counts while moving the camera about is to set this mode for the SoQtViewer::INTERACTIVE DrawType.

VIEW_LOW_RES_LINE  Render as wireframe and don't bother with getting them rendered correctly in depth.
VIEW_LOW_RES_POINT  Render as vertex points and don't bother with getting them rendered correctly in depth.
VIEW_SAME_AS_STILL  Always render a scene with an animating camera (ie SoQtViewer::INTERACTIVE DrawType) in the same manner as scene with a still camera.
VIEW_WIREFRAME_OVERLAY  Render the scene as normal, but overlay a set of lines showing the contours of all polygons.

Contains valid values for the first argument to the SoQtViewer::setDrawStyle() call. Decides the effect of the second argument.

See also:
SoQtViewer::setDrawStyle(), SoQtViewer::DrawStyle
Enumerator:
STILL  If this value is passed as the first argument of SoQtViewer::setDrawStyle(), the second argument decides which draw style to use when the viewer camera is standing still in the same position with the same orientation -- i.e. when the end user is not interacting with the scene camera.
INTERACTIVE  If this value is passed as the first argument of SoQtViewer::setDrawStyle(), the second argument decides which draw style to use when the end user is interacting with the scene camera, causing continuous animation redraws.

ass="memproto"> SoQtViewer::DrawType type) const
virtual void setBufferingType (SoQtViewer::BufferType type)
SoQtViewer::BufferType getBufferingType (void) const
virtual void setViewing (SbBool enable)
SbBool isViewing (void) const
virtual void setCursorEnabled (SbBool enable)
SbBool isCursorEnabled (void) const
void setAutoClipping (SbBool enable)
SbBool isAutoClipping (void) const
void setAutoClippingStrategy (const AutoClippingStrategy strategy, const float value=0.6f, SoQtAutoClippingCB *cb=NULL, void *cbuserdata=NULL)
virtual void setStereoViewing (SbBool enable)
SbBool isStereoViewing (void) const
virtual void setStereoOffset (const float dist)
float getStereoOffset (void) const
SbBool setStereoType (SoQtViewer::StereoType s)
SoQtViewer::StereoType getStereoType (void) const
void setAnaglyphStereoColorMasks (const SbBool left[3], const SbBool right[3])
void getAnaglyphStereoColorMasks (SbBool left[3], SbBool right[3])
void setDetailSeek (const SbBool enable)
SbBool isDetailSeek (void) const
void setSeekTime (const float seconds)
float getSeekTime (void) const
void addStartCallback (SoQtViewerCB *func, void *data=NULL)
void addFinishCallback (SoQtViewerCB *func, void *data=NULL)
void removeStartCallback (SoQtViewerCB *func, void *data=NULL)
void removeFinishCallback (SoQtViewerCB *func, void *data=NULL)
void setWireframeOverlayColor (const SbColor &color)
const SbColor & getWireframeOverlayColor (void) const
virtual void setDoubleBuffer (const SbBool enable)
virtual void setSceneGraph (SoNode *root)
virtual SoNode * getSceneGraph (void)

Protected Member Functions

 SoQtViewer (QWidget *parent, const char *name, SbBool embed, Type type, SbBool build)
 ~SoQtViewer ()
virtual void sizeChanged (const SbVec2s &size)
virtual void setSeekMode (SbBool enable)
SbBool isSeekMode (void) const
SbBool seekToPoint (const SbVec2s screenpos)
void seekToPoint (const SbVec3f &scenepos)
virtual void computeSeekFinalOrientation (void)
virtual void actualRedraw (void)
virtual SbBool processSoEvent (const SoEvent *const event)
void interactiveCountInc (void)
void interactiveCountDec (void)
int getInteractiveCount (void) const
void setSeekDistance (const float distance)
float getSeekDistance (void) const
void setSeekValueAsPercentage (const SbBool on)
SbBool isSeekValuePercentage (void) const
virtual void changeCameraValues (SoCamera *camera)
void addSuperimposition (SoNode *scene)
void removeSuperimposition (SoNode *scene)
void setSuperimpositionEnabled (SoNode *scene, const SbBool enable)
SbBool getSuperimpositionEnabled (SoNode *scene) const

Friends

class SoQtViewerP


Member Enumeration Documentation

Hints about what context the viewer will be used in. Usually not very interesting for the application programmer, it doesn't matter much which value is used for the viewer type. This "feature" of the viewer is included just to be compatible with the old SGI Inventor API.

Enumerator:
BROWSER  If a user-supplied scenegraph passed into the setSceneGraph() function does not contain a camera, setting the viewer type to BROWSER will make the viewer in that case automatically set up a camera outside the scene, as part of the viewer's private and hidden "supergraph".
EDITOR  If a user-supplied scenegraph passed into