56#ifndef _SO_XT_EXAMINER_VIEWER_
57#define _SO_XT_EXAMINER_VIEWER_
285 const char* name = NULL,
287 SoXtFullViewer::BuildFlag flag = SoXtFullViewer::BUILD_ALL,
288 SoXtViewer::Type type = SoXtViewer::BROWSER );
306 {
return (
ViewingMode)m_guiExamViewer->getViewingMode(); }
325 {
return m_constrainedMode; }
491 virtual void rotateCamera(
const SbRotation& rot );
502 void constrainCameraRotation(
bool x =
false,
bool y =
false,
bool z =
false );
516 SoXtFullViewer::BuildFlag flag,
517 SoXtViewer::Type type,
523 virtual SbString getDefaultWidgetName()
const;
524 virtual SbString getDefaultTitle()
const;
525 virtual SbString getDefaultIconTitle()
const;
528 virtual void processEvent(
XAnyEvent* anyevent );
529 virtual void actualRedraw();
535 virtual void bottomWheelMotion(
float newVal );
536 virtual void leftWheelMotion(
float newVal );
537 virtual void rightWheelMotion(
float newVal );
540 virtual void bottomWheelStart();
541 virtual void leftWheelStart();
544 virtual void createPrefSheet();
547 virtual void createViewerButtons(
SoWidget parent );
550 virtual void openViewerHelpCard();
552 virtual void updateCursor();
556 Cursor spinCursor, panCursor, dollyCursor, seekCursor;
560 void createFeedbackNodes();
563 unsigned long lastMotionTime;
564 static void visibilityChangeCB(
void* pt,
SbBool visible );
566 void setViewerMode();
567 void updateViewerMode(
unsigned int state );
568 void switchMode(
int newMode );
569 void defineCursors();
576 int feedbackSizeWheelVal;
577 SoWidget feedbackLabel[2], feedbackField, feedbackSizeWheel;
581 void toggleFeedbackWheelSize(
SoWidget toggle );
588 void constructorCommon(
SbBool buildNow );
593 SoGuiExaminerViewer::ViewingSpinType m_viewingSpinType;
#define TRUE
Possible value of SbBool.
#define SoXtExaminerViewer
Class for representing a rotation.
Class for smart character strings.
Abstract base class for camera nodes.
Sensor class that can be attached to Open Inventor fields.
Node representing a 3D geometric scaling.
Group node that saves and restores traversal state.
Group node that traverses one chosen child.
Node representing a 3D translation.
Viewer component which uses a virtual trackball to view the data.
ViewingMode getViewingMode() const
Gets the current viewing mode.
virtual void activatePanning(const SbVec2s &newLocator)
Sets the start locator for pan camera animation.
virtual void activateSpinning(const SbVec2s &newLocator)
Sets the start locator for spin camera animation.
SbBool isFeedbackVisible() const
Returns the rotation feedback flag.
virtual void activateDolly(const SbVec2s &newLocator)
Sets the start locator for dolly camera animation.
virtual void dollyCamera(const SbVec2s &newLocator)
Move the camera on the z axis based on cursor motion.
~SoXtExaminerViewer()
Destructor.
virtual void resetToHomePosition()
Restores the camera values.
virtual void reverseDollyCamera(const SbVec2s &newLocator)
Same as dollyCamera but reversed.
ConstrainedViewingMode
Constrained viewing mode.
@ CONSTRAINED_VIEWING_MODE_X
Constrains camera rotation around X axis.
@ NONE
No axis constraints.
@ CONSTRAINED_VIEWING_MODE_Y
Constrains camera rotation around Y axis.
@ CONSTRAINED_VIEWING_MODE_Z
Constrains camera rotation around Z axis.
void setViewingMode(ViewingMode viewingMode)
Sets the viewing mode.
virtual void setCamera(SoCamera *cam)
Sets the edited camera.
int getFeedbackSize() const
Returns the point of rotation feedback size in pixels.
virtual void activateRoll(const SbVec2s &newLocator)
Sets the start locator for roll camera animation.
virtual void setSeekMode(SbBool onOrOff)
Externally set the viewer into/out off seek mode (default OFF).
ConstrainedViewingMode getConstrainedViewingMode() const
Returns the current constrained viewing mode.
void stopAnimating()
Stops animation, if it is occurring.
@ VIEWING_MODE_SPIN_CONSTRAINED
Same as VIEWING_MODE_SPIN but add also constrained camera rotation.
@ VIEWING_MODE_ZOOM
Dolly/Zoom (move forward and backward) to get closer to or further away from the point of interest.
@ VIEWING_MODE_SPIN
Rotate the camera around the point of interest.
@ VIEWING_MODE_PAN
Translate the camera in the viewer plane.
virtual void spinCamera(const SbVec2f &newLocator)
Spin the camera based on cursor motion.
virtual void setViewing(SbBool onOrOff)
Sets whether the viewer is turned on or off.
void setAnimationEnabled(SbBool onOrOff)
Enables/disables the spinning animation feature of the viewer (enabled by default).
void setFeedbackVisibility(SbBool onOrOff)
Shows/hides the point of rotation feedback, which only appears while in viewing mode (default is off)...
SbBool isAnimating()
Queries if the viewer is currently animating.
void setFeedbackSize(int newSize)
Sets the point of rotation feedback size in pixels (default 20 pix).
virtual void spinConstrainedCamera(const SbVec2f &newLocator, int axisIndex)
Spin the constrained camera based on cursor motion.
virtual void setCursorEnabled(SbBool onOrOff)
Sets whether the viewer is allowed to change the cursor over the renderArea window.
virtual void viewAll()
Changes the camera position to view the entire scene (the camera zoom or orientation isn't changed).
void setConstrainedViewingMode(ConstrainedViewingMode mode)
Sets the constrained viewing mode.
SoXtExaminerViewer(SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, SoXtFullViewer::BuildFlag flag=SoXtFullViewer::BUILD_ALL, SoXtViewer::Type type=SoXtViewer::BROWSER)
Constructor which specifies the viewer type.
virtual void panCamera(const SbVec2f &newLocator)
Pans the camera based on cursor motion.
SbBool isAnimationEnabled()
Returns whether spin animation is enabled.
virtual void rollCamera(const SbVec2s &newLocator)
Roll the camera based on cursor motion.
Base viewer class which adds a decoration around the rendering area.