26#ifndef _SO_WIN_EXAMINER_VIEWER_
27#define _SO_WIN_EXAMINER_VIEWER_
29#include <Inventor/Win/SoWinBeginStrict.h>
31#include <Inventor/Win/viewers/SoWinFullViewer.h>
32#include <Inventor/events/SoMouseButtonEvent.h>
33#include <Inventor/Gui/viewers/SoGuiExaminerViewer.h>
42class SoWinBitmapButton;
259 const char* name = NULL,
260 SbBool buildInsideParent = TRUE,
280 {
return (
ViewingMode)m_guiExamViewer->getViewingMode(); }
299 {
return m_constrainedMode; }
671 int numMouseBtn = 0 );
844 virtual void rotateCamera(
const SbRotation& rot );
855 void constrainCameraRotation(
bool x =
false,
bool y =
false,
bool z =
false );
872 virtual SbString getDefaultWidgetName()
const;
873 virtual SbString getDefaultTitle()
const;
874 virtual SbString getDefaultIconTitle()
const;
877 virtual void processEvent( XAnyEvent* anyevent );
878 virtual void actualRedraw();
881 SoWidget buildWidget( SoWidget parent );
884 virtual void bottomWheelMotion(
float newVal );
885 virtual void leftWheelMotion(
float newVal );
886 virtual void rightWheelMotion(
float newVal );
887 virtual void mouseWheelMotion(
float newVal );
890 virtual void bottomWheelStart();
891 virtual void leftWheelStart();
894 virtual void createPrefSheet();
897 virtual void createViewerButtons( SoWidget parent );
902 virtual void buildPopupMenu();
905 virtual void openViewerHelpCard();
913 virtual void pushButtonCB( SoWidget w,
int id,
void* data );
915 virtual void doSpinAnimation();
917 virtual void updateCursor();
923 SoGuiExaminerViewer::ViewingSpinType m_viewingSpinType;
929 static char* geometryBuffer;
933 static void visibilityChangeCB(
void* pt,
SbBool visible );
939 SbBool m_viewingOnOffFlag;
947 int m_prevCursorMode;
949 void updateViewerMode(
unsigned int state );
950 void switchMode(
int newMode );
951 void setViewerMode();
954 SoWinBitmapButton* buttonList[10];
958 void constructorCommon(
SbBool buildNow );
961 void processPopupItem(
int item );
964#include <Inventor/Win/SoWinEndStrict.h>
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.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
void setViewer(SoWinViewer *viewer)
Sets the viewer that the function applies to.
virtual void apply() const =0
Applies this manipulation to a specified combination of key and mouse button.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewing Function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewer component...
ConstrainedViewingMode
Constrained viewing mode.
@ CONSTRAINED_VIEWING_MODE_Z
Constrains camera rotation around Z axis.
@ CONSTRAINED_VIEWING_MODE_Y
Constrains camera rotation around Y axis.
@ CONSTRAINED_VIEWING_MODE_X
Constrains camera rotation around X axis.
@ NONE
No axis constraints.
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.
ViewingMode getViewingMode() const
Gets the current viewing mode.
virtual void addViewingMouseBinding(SoKeyboardEvent::Key *keys=NULL, int numKey=0, SoMouseButtonEvent::Button *mouseBtn=NULL, int numMouseBtn=0, const SoViewingFunction *viewingFunc=NULL)
Adds a new mouse binding to the viewer.
int getFeedbackSize() const
Returns the point of rotation feedback size in pixels.
virtual void setSeekMode(SbBool onOrOff)
Externally set the viewer into/out off seek mode (default OFF).
virtual void viewAll()
Changes the camera position to view the entire scene (the camera zoom or orientation isn't changed).
virtual void reverseDollyCamera(const SbVec2s &newLocator)
Same as dollyCamera but reversed.
virtual void setCursorEnabled(SbBool onOrOff)
Sets whether the viewer is allowed to change the cursor over the renderArea window.
void setFeedbackSize(int newSize)
Sets the point of rotation feedback size in pixels (default 20 pix).
virtual void resetToHomePosition()
Restores the camera values.
ConstrainedViewingMode getConstrainedViewingMode() const
Returns the current constrained viewing mode.
SoWinExaminerViewer(SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, SoWinFullViewer::BuildFlag flag=SoWinFullViewer::BUILD_ALL, SoWinViewer::Type type=SoWinViewer::BROWSER)
Constructor which specifies the viewer type.
SbBool isAnimationEnabled()
Returns whether spin animation is enabled.
virtual void activateRoll(const SbVec2s &newLocator)
Sets the start locator for roll camera animation.
@ VIEWING_MODE_ZOOM
Dolly/Zoom (move forward and backward) to get closer to or further away from the point of interest.
@ VIEWING_MODE_SPIN_CONSTRAINED
Same as VIEWING_MODE_SPIN but add also constrained camera rotation.
@ VIEWING_MODE_PAN
Translate the camera in the viewer plane.
@ VIEWING_MODE_SPIN
Rotate the camera around the point of interest.
void setViewingMode(ViewingMode viewingMode)
Sets the viewing mode.
virtual void addFunctionKeyBinding(SoKeyboardEvent::Key key, const SoViewingFunction *viewingFunc)
Adds a new function key binding to the viewer.
void setAnimationEnabled(SbBool onOrOff)
Enables/disables the spin animation feature of the viewer (enabled by default).
virtual void activateSpinning(const SbVec2s &newLocator)
Sets the start locator for spin camera animation.
SbBool isAnimating()
Queries if the viewer is currently animating.
virtual void spinCamera(const SbVec2f &newLocator)
Spin the camera based on cursor motion.
virtual void activatePanning(const SbVec2s &newLocator)
Sets the start locator for pan camera animation.
void setFeedbackVisibility(SbBool onOrOff)
Shows/hides the point of rotation feedback, which only appears while in viewing mode (default is off)...
virtual void removeViewingMouseBinding(SoKeyboardEvent::Key *keys=NULL, int numKeys=0, SoMouseButtonEvent::Button *mouseBtn=NULL, int numMouseBtn=0)
Removes a mouse binding (if it exists).
virtual void rollCamera(const SbVec2s &newLocator)
Roll the camera based on cursor motion.
void setConstrainedViewingMode(ConstrainedViewingMode mode)
Sets the constrained viewing mode.
void stopAnimating()
Stops animation, if it is occurring.
virtual void panCamera(const SbVec2f &newLocator)
Pans the camera based on cursor motion.
virtual void removeFunctionKeyBinding(SoKeyboardEvent::Key functionKey)
Removes the specified function key binding (if it exists).
SbBool isFeedbackVisible() const
Returns the rotation feedback flag.
~SoWinExaminerViewer()
Destructor.
virtual void spinConstrainedCamera(const SbVec2f &newLocator, int axisIndex)
Spin the constrained camera based on cursor motion.
virtual void setViewing(SbBool onOrOff)
Sets whether the viewer is turned on or off.
virtual void setCamera(SoCamera *cam)
Sets the camera that will be controlled by the viewer.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Base viewer clas...
BuildFlag
This specifies what should be build by default in the constructor.
@ BUILD_ALL
Build everything by default.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewer component...
Type
An EDITOR viewer will create a camera under the user supplied scene graph (specified in setSceneGraph...
@ BROWSER
Camera views scene, but is not added to scene.