82#ifndef HIDDEN_FROM_DOC
97 INTERLACED_STEREO = 1,
99 HALF_SCREEN_STEREO = 2,
108#ifndef HIDDEN_FROM_DOC
228 enum DecimationStrategy
288 virtual void setSceneGraph(
SoNode* newScene );
293 virtual SoNode* getSceneGraph();
300 virtual void setCamera(
SoCamera* newCamera );
312 SoNONUNICODE
SbBool saveSceneGraph(
const char* fileName );
329 virtual void setCameraType(
SoType type );
342 virtual void setPreserveCameraHeightAngle(
SbBool flag );
349 virtual SbBool isCameraHeightAnglePreserved()
const;
355 virtual void enableSeekWithOrtho(
SbBool flag );
361 virtual SbBool isSeekWithOrthoEnabled()
const;
367 virtual void viewAll();
372 virtual void saveHomePosition();
377 virtual void resetToHomePosition();
385 virtual void setHeadlight(
SbBool insertFlag );
445 virtual void setDrawStyle( DrawType type, DrawStyle style );
450 SoGuiViewer::DrawStyle getDrawStyle( SoGuiViewer::DrawType type );
456 virtual void setBufferingType( BufferType type );
461 SoGuiViewer::BufferType getBufferingType();
475 virtual void setViewing(
SbBool flag );
492 virtual void setCursorEnabled(
SbBool flag );
498 SbBool isCursorEnabled()
const;
510 void setAutoClipping(
SbBool flag );
516 virtual SbBool isStereoViewing();
521 SbBool isAutoClipping()
const;
526 void setStereoOffset(
float dist );
531 float getStereoOffset();
540 void setDetailSeek(
SbBool onOrOff );
559 void setSeekTime(
float seconds );
572 virtual void recomputeSceneSize();
581 void setDecimationStrategy( DecimationStrategy strategy );
585 DecimationStrategy getDecimationStrategy()
const;
594 void setGoalNumberOfTriangles( int32_t goal );
599 int32_t getGoalNumberOfTriangles();
608 void setGoalFramesPerSecond(
float goal );
613 float getGoalFramesPerSecond();
622 void setFixedPercentage(
float percent );
627 float getFixedPercentage();
637 void enableFullRenderingWhenStill(
SbBool onOff );
643 SbBool isFullRenderingWhenStill();
645 void setStill(
SbBool isStill );
656 void setNumSamples(
int numFrames );
667 float getCurrentDecimationPercentage();
670 virtual void setStereoActive(
SbBool activate);
671 virtual SbBool isStereoActive();
672 virtual void actualRendering();
673 virtual SoCamera* getViewerCamera();
674 virtual const SbVec2s& getSize();
675 virtual const SbVec2s& getTopLeft();
676 virtual const SbVec2s& getBottomRight();
677 virtual SbBool isViewerDoubleBuffer();
680 virtual void reverseStereoView(
SbBool reverse );
681 virtual SbBool isStereoViewReversed();
682 virtual void setStereoAbsoluteAdjustments(
SbBool absolute );
683 virtual SbBool isStereoAbsoluteAdjustments()
const;
684 virtual void setStereoBalance(
float balance,
SbBool nearFrac =
false );
685 virtual float getStereoBalance();
686 virtual SbBool isStereoBalanceNearFrac();
687 virtual void setViewport(
short left,
short bottom,
short width,
short height );
688 virtual void getViewport(
short& left,
short& bottom,
short& width,
short& height);
689 virtual SoGLContext* getViewerContext() {
return NULL; }
690 virtual SoSceneManager* getViewerSceneManager() {
return this->getSceneManager(); }
693 bool getFirstRedrawFlag()
const
694 {
return m_isFirstRedraw; }
695 void setFirstRedrawFlag(
bool value)
696 { m_isFirstRedraw = value; }
713 virtual void setCursorStyle( CursorStyle style );
718 CursorStyle getCursorStyle()
const;
729 void setAutoClipTolerance (
float tolerance );
734 float getAutoClipTolerance ()
const;
757 virtual void setCameraSceneGraph(
SoNode* cameraSceneGraph );
762 SoNode* getCameraSceneGraph();
768 void enableShadows(
bool onOrOff );
785 void enableMouseWheelDolly(
SbBool onOff );
786 SbBool isMouseWheelEnabled()
const;
788 SbBool isInteractive()
const;
792 virtual void toggleCameraType();
802 virtual void setSeekMode(
SbBool flag );
803 SbBool isSeekMode()
const;
806 void setInteractiveFlag(
SbBool flag );
807 SbBool getInteractiveFlag()
const;
810 void setStillDrawStyle( DrawStyle style );
811 DrawStyle getStillDrawStyle()
const;
814 void setInteractiveDrawStyle( DrawStyle style );
815 DrawStyle getInteractiveDrawStyle()
const;
818 void setSeekStartTime(
SbTime seekTime );
819 SbTime getSeekStartTime()
const;
822 void setNewCamOrientation(
SbRotation newOrientation );
826 void setSeekPoint(
SbVec3f newOrientation );
830 void setViewerSpeed(
float speed );
831 float getViewerSpeed()
const;
834 void setHeadLightFlag(
SbBool flag );
837 void setCreatedCursors(
SbBool flag );
838 SbBool getCreatedCursors()
const;
841 void setInteractiveCount(
int count );
847 void setCheckForDrawStyle(
SbBool flag );
848 SbBool getCheckForDrawStyle()
const;
851 void setType( Type type );
852 Type getType()
const;
859 void setSeekDistance(
float seekDistance );
860 float getSeekDistance();
863 void setSceneSize(
float size );
864 float getSceneSize();
867 SbBool getComputeSeekVariables()
const {
return m_computeSeekVariables; }
868 float getPreviousHeightAngle() {
return m_previousHeightAngle; }
869 SbVec3f getSeekNormal() {
return m_seekNormal; }
870 SbVec3f getNewCamPosition() {
return m_newCamPosition; }
877 SbBool getCreatedCamera()
const;
879 void setViewer(
void* viewer );
887 SoNONUNICODE
static void writeScene(
SoNode* node,
const char* filename );
893 void setCameraTypeChangeCallback( SoGuiViewerCameraTypeChangeCB* callback,
void* userdata );
894 void addStartCallback( SoGuiViewerCB* f,
void* userData = NULL );
895 void addFinishCallback( SoGuiViewerCB* f,
void* userData = NULL );
896 void removeStartCallback( SoGuiViewerCB* f,
void* userData = NULL );
897 void removeFinishCallback( SoGuiViewerCB* f,
void* userData = NULL );
903 void setFramesPerSecondCallback( SoGuiViewerFPSCB* callback,
void* userData = NULL );
909 void setDecimationPercentageCallback( SoGuiViewerDecimationPercentageCB* callback,
void* userData = NULL );
913 void arrowKeyPressed( Direction direction );
915 SbBool getDepthValue(
int x,
int y,
float &depth);
921 void setCameraFields(
SoCamera* cam );
927 int m_viewportMapping;
931 float m_nearDistance;
933 float m_focalDistance;
936 bool m_stereoAbsoluteAdjustments;
937 float m_stereoAdjustment;
938 float m_balanceAdjustment;
940 bool m_balanceNearFrac;
945 virtual void afterRealizeHook();
947 virtual void adjustCameraClippingPlanes();
959 void interactiveCountInc();
960 void interactiveCountDec();
961 int getInteractiveCount();
995 virtual void interpolateSeekAnimation(
float t );
996 virtual void computeSeekFinalOrientation();
1001 virtual void actualRedraw();
1006 virtual void changeCameraValues(
SoCamera* newCamera );
1010 virtual void preViewerRedraw();
1011 virtual void postViewerRedraw();
1019 virtual float decimationForFramesPerSecond(
float fps,
1027 virtual float decimationForNumTriangles( uint32_t numTris );
1040 static void setFeedbackOrthoProjection(
const SbVec2s& size );
1043 static void restoreGLStateAfterFeedback();
1045 static void drawViewerCrossFeedback(
SbVec2s loc );
1047 static void drawViewerRollFeedback(
SbVec2s center,
SbVec2s loc );
1049 void setCurrentDrawStyle( SoGuiViewer::DrawStyle style );
1051 void doBoxZoom(
int x1,
int y1,
int x2,
int y2 );
1052 void setZoomMode(
SbBool zoomMode );
1053 SbBool isZoomModeEnabled()
const;
1054 void setSeekDistAsPercentage(
SbBool seekDist );
1058 virtual void adjustClippingPlanes();SoDEPRECATED
1060 virtual HDC getCurrentDC();
1070 SoShadowGroup* getShadowGroup()
const {
return m_shadowGroup; };
1073 static void seekAnimationSensorCB(
void* p,
SoSensor* sensor );
1075 void* getViewer() {
return (
void*)
this; }
1082 static void drawStyleStartCallback(
void* userData,
void* v );
1083 static void drawStyleFinishCallback(
void* userData,
void* v );
1084 static void changeCB(
void* thisp,
SoSensor* sensor );
1085 void changeSensorCalled();
1087 void setStereoOffsetP(
float dist );
1088 void setStereoBalanceP(
float balance,
SbBool nearFrac );
1089 void setStereoAbsoluteAdjustmentsP(
SbBool absolute );
1097 SoNode* m_cameraSceneGraph;
1100 SoGuiViewer::Type m_type;
1102 SbBool m_interactiveFlag;
1103 BufferType m_bufferType;
1104 SbBool m_cursorEnabledFlag;
1107 SbBool m_firstLeftRender;
1108 float m_viewerSpeed;
1114 float m_origNearDistance;
1115 float m_origFarDistance;
1116 float m_origFocalDistance;
1126 SbBool m_preserveHeightAngle;
1128 SbBool m_mouseWheelEnable;
1129 float m_previousHeightAngle;
1130 CameraFields* m_prevCam;
1136 SbBool m_checkForDrawStyle;
1137 DrawStyle m_stillDrawStyle, m_interactiveDrawStyle;
1148 bool m_shadowGroupCurrState;
1152 float m_minimumNearPlane;
1154 bool m_autoClipPlaneViewVolumeCulling;
1158 float m_seekAnimTime;
1160 SbBool m_seekAllowChangeOrientation;
1161 SbBool m_seekAllowChangeDistance;
1165 DecimationStrategy m_decStrategy;
1166 SbBool m_isStill, m_doFullRendering, m_wasStill;
1169 float m_decPercentage;
1170 float m_lastDecimationValue;
1171 double m_lastRenderTime;
1175 int m_lastDirection;
1181 SoGuiViewerFPSCB* m_fpsUserCallback;
1182 void* m_fpsUserData;
1190 SoGuiViewer::CursorStyle m_cursorStyle;
1203 SbVec3f m_seekPoint, m_seekNormal;
1204 SbBool m_computeSeekVariables;
1206 SbRotation m_oldCamOrientation, m_newCamOrientation;
1207 SbVec3f m_oldCamPosition, m_newCamPosition;
1208 float m_seekDistance;
1209 SbBool m_seekDistAsPercentage;
1216 SoGuiViewerCameraTypeChangeCB* m_viewerCameraTypeChangeCallback;
1217 void* m_viewerCameraTypeChangeCallbackUserData;
1220 SoGuiViewerDecimationPercentageCB* m_decimationUserCallback;
1221 void* m_decimationUserData;
1224 static bool s_enableIgnoreScreenSpaceBBox;
1226 bool m_isFirstRedraw;
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> OpenGL context m...