333#ifndef HIDDEN_FROM_DOC
334 void saveSceneGraph(
const char* fileName ) ;
371 { m_guiViewer->setPreserveCameraHeightAngle( flag ); }
619 void setSeekTime(
float seconds ) { m_guiViewer->setSeekTime( seconds ); }
635 { m_guiViewer->addStartCallback( (SoGuiViewerCB*)f, userData ); }
646 { m_guiViewer->addFinishCallback( (SoGuiViewerCB*)f, userData ); }
654 { m_guiViewer->removeStartCallback( (SoGuiViewerCB*)f, userData ); }
662 { m_guiViewer->removeFinishCallback( (SoGuiViewerCB*)f, userData ); }
884 void setViewport(
short left,
short bottom,
short width,
short height );
889 void getViewport(
short& left,
short& bottom,
short& width,
short& height );
1031 return m_guiViewer->getDepthValue(x,
y, depth);
1042 virtual void setNormalVisual( QSurfaceFormat vi );
1044 SbBool isInteractive()
const;
1046 void saveSceneGraph(
const SbString& fileName );
1051 SbBool createdCursors, viewingFlag;
1056 SbBool m_seekWithOrtho, m_preserveHeightAngle, cursorEnabledFlag, seekDistAsPercentage, computeSeekVariables;
1057 float m_previousHeightAngle, viewerSpeed, seekDistance;
1060 SbVec3f seekPoint, seekNormal, oldCamPosition, newCamPosition;
1061 SbRotation oldCamOrientation, newCamOrientation;
1068 virtual void defineDefaultCursor(
const QCursor& cursor );
1073 virtual void defineFlyCursor(
const QCursor& cursor );
1078 virtual void defineRotationCursor(
const QCursor& cursor );
1083 virtual void defineSeekCursor(
const QCursor& cursor );
1088 virtual void defineTranslationCursor(
const QCursor& cursor );
1093 virtual void defineUpCursor(
const QCursor& cursor );
1098 virtual void defineViewingCursor(
const QCursor& cursor );
1103 virtual void defineWalkCursor(
const QCursor& cursor );
1108 virtual void defineZoomCursor(
const QCursor& cursor );
1118 SbBool buildInsideParent,
1125 SbBool buildInsideParent,
1139 QCursor normalCursor, dollyCursor, panCursor, rollCursor, seekCursor,
1140 spinCursor, upCursor, flyCursor, walkCursor;
1146 virtual void defineCursors();
1150 virtual void updateCursor() {};
1161 SbBool processCommonEvents( QEvent* xe );
1174 void interactiveCountInc();
1175 void interactiveCountDec();
1176 int getInteractiveCount() {
return m_guiViewer->getInteractiveCount(); }
1197 virtual void interpolateSeekAnimation(
float t );
1198 virtual void computeSeekFinalOrientation();
1203 virtual void actualRedraw();
1208 virtual void changeCameraValues(
SoCamera* newCamera );
1223 static void setFeedbackOrthoProjection(
const SbVec2s& glxSize );
1227 static void restoreGLStateAfterFeedback();
1230 static void drawViewerCrossFeedback(
SbVec2s loc );
1233 static void drawViewerRollFeedback(
SbVec2s center,
SbVec2s loc );
1235 virtual void widgetChanged( QWidget* w );
1238 virtual void afterRealizeHook();
1241 virtual void adjustCameraClippingPlanes();
1245 virtual void redraw();
1253 virtual float decimationForFramesPerSecond(
float fps,
1262 virtual float decimationForNumTriangles( uint32_t numTris );
1265 void* getViewer() {
return (
void*)
this;}
1275#if !defined(_WIN32) && !defined(__APPLE__)
1276 unsigned int m_zoomBoxPixel;
1285 SoQtInputFocus* inputFocus;
1289 void setZbufferState();
1291 void arrowKeyPressed(
int rawKey );
1296 static void alarmCB(
void* thisp,
SoSensor* ) { ((
SoQtViewer*)thisp)->stillSensorCalled(); }
1297 void stillSensorCalled();
1318 static void seekAnimationSensorCB(
void* p,
SoSensor* sensor );
1320 SoNode* m_cameraSceneGraph;
void SoQtViewerCameraTypeChangeCB(void *userData, SoCamera *camera, SoQtViewer *viewer)
External camera type change callback functions registered with the viewer should be of this type.
void SoQtViewerDecimationPercentageCB(float percentage, void *userData, SoQtViewer *viewer)
External decimation percentage callback functions registered with the viewer should be of this type.
void SoQtViewerFPSCB(float fps, void *userData, SoQtViewer *viewer)
External FPS callback functions registered with the viewer should be of this type.
void SoQtViewerCB(void *userData, SoQtViewer *viewer)
External interactive callback functions registered with the viewer should be of this type.
List of generic (void *) pointers.
Class for representing a rotation.
Class for smart character strings.
Triggers a delegate once sometime in the future.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for stereo...
Abstract base class for camera nodes.
Node representing a directional light source.
Node that defines the style to use when rendering.
Sensor class that can be attached to Open Inventor fields.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> OpenGL context m...
AbortCode
Possible return codes from a render abort callback.
Computes bounding box of a scene.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Base class for all group nodes.
Node that defines the lighting model to use when rendering.
Node that specifies how multiple materials are bound to shapes.
Abstract base class for all database nodes.
Sensor class that can be attached to Open Inventor nodes.
Node that defines base colors using packed representation.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component for re...
SoSceneManager * getSceneManager() const
Gets the normal scene manager.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewer component...
virtual void setStereoAbsoluteAdjustments(SbBool absolute)
If TRUE, use stereo absolute adjustments.
SbBool isFullRenderingWhenStill()
Queries if the viewer will render at full resolution when it sits still for a certain period of time.
void setCameraTypeChangeCallback(SoQtViewerCameraTypeChangeCB *callback, void *userdata)
Defines a callback which is called each time the camera type has changed (change from SoPerspectiveCa...
virtual SbBool isSeekWithOrthoEnabled() const
Query whether the seek functionality is enabled for an SoOrthographicCamera.
virtual SbBool isStereoActive()
Returns TRUE if stereo is active.
virtual SbBool isStereoBalanceNearFrac()
Returns TRUE if the stereo balance adjustement is defined as a fraction of the camera near distance.
virtual SbBool isViewerDoubleBuffer()
Returns TRUE if viewer is double buffered.
float getStereoOffset()
Returns the stereo offset.
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.
SbBool isStereoViewReversed()
Returns TRUE if the left and right eye views are reversed.
float getFixedPercentage()
Gets fixed percentage for the viewer to render (0.0 to 1.0)
SbBool isSeekMode()
Returns TRUE if currently in seek mode.
float getCurrentDecimationPercentage()
Returns the Decimation Percentage the viewer used in its last render.
void setFramesPerSecondCallback(SoQtViewerFPSCB *callback, void *userData=NULL)
Registers frames per second callback.
@ EDITOR
Camera is added to user's scene.
@ BROWSER
Camera views scene, but is not added to scene.
SbBool isStillNow()
Returns whether the viewer is currently still.
SoQtViewer::BufferType getBufferingType()
Gets the current buffering type in the main view.
void setFixedPercentage(float percent)
Sets fixed percentage for the viewer to render (0.0 to 1.0) Default is 1.0.
void setPickRadius(float radius)
Sets the pick radius, in pixels, used by the viewer for picking and seeking actions.
virtual void enableSeekWithOrtho(SbBool flag)
If FALSE, the seek functionality is disabled for an SoOrthographicCamera.
void setDecimationPercentageCallback(SoQtViewerDecimationPercentageCB *callback, void *userData=NULL)
Registers decimation percentage callback.
virtual void setCursorStyle(SoQtViewer::CursorStyle style)
Sets the cursor style.
void setDetailSeek(SbBool onOrOff)
When the viewer is in seek mode, left mouse clicks initiate a pick, and the viewer changes its orient...
virtual SbBool isStereoAbsoluteAdjustments() const
Returns TRUE if stereo absolute adjustments are enabled.
float getGoalFramesPerSecond()
Gets goal frames per second for the viewer to try to render.
virtual void setSeekMode(SbBool onOrOff)
Set the viewer into/out of seek mode (default OFF).
virtual void setViewing(SbBool onOrOff)
Sets whether the viewer is turned on or off.
void removeFinishCallback(SoQtViewerCB *f, void *userData=NULL)
Removes finish callback routine from the viewer.
virtual SoDEPRECATED void adjustClippingPlanes()
Along with the manipulation of the camera, SoBaseStereo needs to set the scene appropriately when cha...
void removeStartCallback(SoQtViewerCB *f, void *userData=NULL)
Removes start callback routine from the viewer.
virtual void toggleCameraType()
This routine will toggle the current camera from perspective to orthographic, and from orthographic b...
void getViewport(short &left, short &bottom, short &width, short &height)
Returns viewport region as origin (lower-left corner) and size, given as pixel coordinates.
virtual void setCameraSceneGraph(SoNode *cameraSceneGraph)
Sets the sub-scene graph to be used for viewAll computation.
virtual const SbVec2s & getBottomRight()
Returns the position of the OpenGL drawing window in absolute screen coordinates (not relative to par...
void setStereoViewType(SoBaseStereo *stereo)
Set an implementation of stereo viewing to use.
void addFinishCallback(SoQtViewerCB *f, void *userData=NULL)
Adds finish callback routines on the viewer.
virtual void setDrawStyle(SoQtViewer::DrawType type, SoQtViewer::DrawStyle style)
Sets the current drawing style in the main view.
void setAutoClipping(SbBool onOrOff)
Sets the auto clipping plane.
void processCommonEnterEvents(unsigned int state)
Process common enter events of the viewer.
@ STILL
Applies to static rendering.
@ INTERACTIVE
Applies to rendering while interactive viewing.
SoNode * getCameraSceneGraph()
Gets the sub-scene graph to be viewed.
virtual void actualRendering()
This method is called automatically when the viewer requests that its SoBaseStereo object perform ste...
virtual void recomputeSceneSize()
This can be used to let the viewer know that the scene graph has changed so that the viewer can recom...
virtual SoNode * getSceneGraph()
Gets the scene graph to render.
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,...
SoSeparator * getSceneRoot()
Returns the viewer's scene root.
virtual const SbVec2s & getTopLeft()
Returns the position of the OpenGL drawing window in absolute screen coordinates (not relative to par...
CursorStyle
Curors styles.
@ SHADOW
Improved cursors using "shadow".
@ CLASSIC
Standard Open Inventor cursors.
@ XOR
Improved cursors using XOR.
float getSeekTime()
Queries the seek time.
virtual void setStereoViewing(SbBool onOrOff)
Turns stereo viewing on/off on the viewer (default off).
virtual const SbVec2s & getSize()
Returns the size of the OpenGL drawing window in absolute screen coordinates (not relative to parent ...
virtual float getStereoBalance()
Returns the current stereo balance.
virtual SbBool isStereoViewing()
Queries if stereo viewing is on or off on the viewer.
virtual SoCamera * getViewerCamera()
Returns the camera so SoBaseStereo can manipulate it to achieve the stereo effect.
DrawStyle
List of possible drawing styles.
@ VIEW_LOW_COMPLEXITY
Render low complexity and no texture.
@ VIEW_POINT
Point draw style.
@ VIEW_HIDDEN_LINE
Render only the frontmost lines.
@ VIEW_NO_TEXTURE
Render without textures.
@ VIEW_LOW_RES_LINE
Low complexity wireframe + no depth clearing.
@ VIEW_LOW_RES_POINT
Low complexity point + no depth clearing.
@ VIEW_SAME_AS_STILL
Forces the INTERACTIVE draw style to match STILL.
@ VIEW_LINE
Wireframe draw style.
@ VIEW_BBOX
Bounding box draw style.
SbBool isAutoClipping() const
Queries if auto clipping is ON.
SbBool isDetailSeek()
Queries whether the viewer is in seek mode.
SoQtViewer::DrawStyle getDrawStyle(SoQtViewer::DrawType type)
Queries the current drawing style in the main view.
SoQtViewer::DecimationStrategy getDecimationStrategy()
Gets strategy to use to decide on decimation value.
BufferType
List of different buffering types.
@ BUFFER_SINGLE
Single buffer.
@ BUFFER_INTERACTIVE
Double buffer while interactive viewing.
@ BUFFER_DOUBLE
Double buffer.
void setNumSamples(int numFrames)
Sets how many frames should be timed before frames per second callback is called, default is 10.
virtual void setSceneGraph(SoNode *newScene)
Sets the scene graph to render.
virtual void setCamera(SoCamera *cam)
Sets the edited camera.
SbBool isViewing() const
Queries whether the viewer is turned on or off.
virtual void setStereoActive(SbBool activate)
If TRUE, stero is activated.
virtual void setPreserveCameraHeightAngle(SbBool flag)
If TRUE, an SoPerspectiveCamera's heightAngle is preserved if the camera is changed to an SoOrthograp...
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 (s...
virtual void setBufferingType(SoQtViewer::BufferType type)
Sets the current buffering type in the main view (default SoQtViewer::BUFFER_DOUBLE).
void setStereoOffset(float dist)
Sets the stereo offset.
SoQtViewer::CursorStyle getCursorStyle()
Returns the cursor style.
virtual void resetToHomePosition()
Restores the camera values.
virtual void saveHomePosition()
Saves the camera values.
SbBool isCursorEnabled() const
Queries whether the viewer is allowed to change the cursor over the renderArea window.
virtual SbBool isCameraHeightAnglePreserved() const
Query whether the SoPerspectiveCamera's heightAngle is preserved if the camera is changed to an SoOrt...
virtual void viewAll()
Changes the camera position to view the entire scene (the camera zoom or orientation isn't changed).
SoBaseStereo * getStereoViewType()
Returns the current stereo implementation.
SoType getCameraType()
Gets the camera type that will be created by the viewer if no cameras are found in the scene graph (s...
void addStartCallback(SoQtViewerCB *f, void *userData=NULL)
Adds start callback routine on the viewer.
DecimationStrategy
List of decimation strategies.
@ FIXED_PERCENTAGE
Use given decimation percentage.
@ FIXED_NUM_TRIANGLES
Try to fix number of triangles drawn.
@ FRAMES_PER_SECOND
Try to fix frames per second.
@ NORMAL
Decimation is not changed.
virtual void setHeadlight(SbBool onOrOff)
Turns the headlight on/off (default on).
SbBool isHeadlight()
Queries if the headlight is on.
void setGoalNumberOfTriangles(int32_t goal)
Sets goal number of triangles for the viewer to try to render.
void setDecimationStrategy(SoQtViewer::DecimationStrategy strategy)
Sets strategy to use to decide on decimation value.
void reverseStereoView(SbBool reverse)
If TRUE, reverse the left and right eye views.
void enableFullRenderingWhenStill(SbBool onOff)
If this flag is set, the viewer will render at full resolution when it sits still for a certain perio...
SoDirectionalLight * getHeadlight()
Returns the headlight node.
void setAutoClipTolerance(float tolerance)
Sets the auto clipping tolerance value.
float getAutoClipTolerance() const
Gets the auto clipping tolerance value.
void setGoalFramesPerSecond(float goal)
Sets goal frames per second for the viewer to try to render.
float getPickRadius() const
Returns the current pick radius for picking and seeking actions.
void enableMouseWheelDolly(SbBool onOff)
Enable/disable moving the camera with the mouse wheel, TRUE by default.
void setSeekTime(float seconds)
Sets the time a seek takes to change to the new camera location.
SoCamera * getCamera()
Gets the edited camera.
virtual void setCursorEnabled(SbBool onOrOff)
Sets whether the viewer is allowed to change the cursor over the renderArea window.
int getNumSamples()
Gets how many frames should be timed before frames per second callback is called.
int32_t getGoalNumberOfTriangles()
Gets goal number of triangles for the viewer to try to render.
virtual void setStereoBalance(float balance, SbBool nearFrac=false)
Sets the stereo balance (the position of the zero parallax plane).
Node representing a 3D rotation about an arbitrary axis.
Field containing an SbTime.
Manages scene graph rendering and event handling.
Abstract base class for Open Inventor sensors.
Group node that saves and restores traversal state.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Pure virtual cla...
Group node that traverses one chosen child.
Stores runtime type information.