SOXTEXAMINERVIEWER(3iv)

πŸ’– SoXtExaminerViewer(3IV) β€” the manual page, but make it a vibe πŸ’–

okay bestie, sit down, hydrate, because we're about to talk about the SoXtExaminerViewer β€” it's a viewer component that uses a virtual trackball to look at your data. yes, an actual trackball. no mouse required. iconic behaviour. πŸŽ€

This is the 3IV manual page, and it's a long one, so we're doing it in parts. Buckle up. πŸ¦‹


✨ NAME ✨

SoXtExaminerViewer β€” a viewer component which uses a virtual trackball to view the data. that's the whole name section, short and slay πŸ’…


🌸 INHERITS FROM 🌸

the family tree, the lineage, the royal bloodline:

SoXtComponent > SoXtGLWidget > SoXtRenderArea > SoXtViewer >
SoXtFullViewer > SoXtExaminerViewer

she comes from a long line of distinguished widgets and she knows it πŸ‘‘


✨ SYNOPSIS ✨

first things first, you gotta include the header, no cap:

#include <Inventor/Xt/viewers/SoXtExaminerViewer.h>

🫢 Methods from class SoXtExaminerViewer

these are her own methods, her personal signature moves:

                     SoXtExaminerViewer(Widget parent = NULL, const char
                          *name = NULL, SbBool buildInsideParent = TRUE,
                          SoXtFullViewer::BuildFlag flag = BUILD_ALL,
                          SoXtViewer::Type type = BROWSER)
                     ~SoXtExaminerViewer()
 void                setFeedbackVisibility(SbBool onOrOff)
 SbBool              isFeedbackVisible() const
 void                setFeedbackSize(int newSize)
 int                 getFeedbackSize() const
 void                setAnimationEnabled(SbBool onOrOff)
 SbBool              isAnimationEnabled()
 void                stopAnimating()
 SbBool              isAnimating()

🫢 Methods from class SoXtFullViewer

the inherited ones, still hers, still valid:

 void                setDecoration(SbBool onOrOff)
 SbBool              isDecoration()
 void                setPopupMenuEnabled(SbBool trueOrFalse)
 SbBool              isPopupMenuEnabled()
 Widget              getAppPushButtonParent() const
 void                addAppPushButton(Widget newButton)
 void                insertAppPushButton(Widget newButton, int index)
 void                removeAppPushButton(Widget oldButton)
 int                 findAppPushButton(Widget oldButton)
 int                 lengthAppPushButton()
 Widget              getRenderAreaWidget()

🫢 Methods from class SoXtViewer

okay this list is long but we do not skip, we do not summarise, we list every single one, periodt:

 virtual void            setCamera(SoCamera *cam)
 SoCamera *              getCamera()
 virtual void            setCameraType(SoType type)
 SoType                  getCameraType()
 virtual void            viewAll()
 virtual void            saveHomePosition()
 virtual void            resetToHomePosition()
 virtual void            setHeadlight(SbBool onOrOff)
 SbBool                  isHeadlight()
 SoDirectionalLight *    getHeadlight()
 virtual void            setDrawStyle(SoXtViewer::DrawType type,
                              SoXtViewer::DrawStyle style)
 SoXtViewer::DrawStyle   getDrawStyle(SoXtViewer::DrawType type)
 virtual void            setBufferingType(SoXtViewer::BufferType type)
 SoXtViewer::BufferType  getBufferingType()
 virtual void            setViewing(SbBool onOrOff)
 SbBool                  isViewing() const
 virtual void            setCursorEnabled(SbBool onOrOff)
 SbBool                  isCursorEnabled() const
 void                    setAutoClipping(SbBool onOrOff)
 SbBool                  isAutoClipping() const
 virtual void            setStereoViewing(SbBool onOrOff)
 virtual SbBool          isStereoViewing()
 void                    setStereoOffset(float dist)
 float                   getStereoOffset()
 void                    setDetailSeek(SbBool onOrOff)
 SbBool                  isDetailSeek()
 void                    setSeekTime(float seconds)
 float                   getSeekTime()
 void                    addStartCallback(SoXtViewerCB *f, void *userData =
                              NULL)
 void                    addFinishCallback(SoXtViewerCB *f, void *userData
                              = NULL)
 void                    removeStartCallback(SoXtViewerCB *f, void
                              *userData = NULL)
 void                    removeFinishCallback(SoXtViewerCB *f, void
                              *userData = NULL)
 void                    copyView(Time eventTime)
 void                    pasteView(Time eventTime)
 virtual void            recomputeSceneSize()

🫢 Methods from class SoXtRenderArea

yes we're still going, we love an exhaustive list:

 virtual void              setSceneGraph(SoNode *newScene)
 virtual SoNode *          getSceneGraph()
 void                      setOverlaySceneGraph(SoNode *newScene)
 SoNode *                  getOverlaySceneGraph()
 void                      registerDevice(SoXtDevice *)
 void                      unregisterDevice(SoXtDevice *)
 void                      setBackgroundColor(const SbColor &c)
 const SbColor &           getBackgroundColor() const
 void                      setBackgroundIndex(int index)
 int                       getBackgroundIndex() const
 void                      setOverlayBackgroundIndex(int index)
 int                       getOverlayBackgroundIndex() const
 void                      setColorMap(int startIndex, int num, const
                                SbColor *colors)
 void                      setOverlayColorMap(int startIndex, int num,
                                const SbColor *colors)
 void                      setViewportRegion(const SbViewportRegion
                                &newRegion)
 const SbViewportRegion &  getViewportRegion() const
 void                      setTransparencyType(SoGLRenderAction::TransparencyType
                                type)
 SoGLRenderAction::TransparencyType
                           getTransparencyType() const
 void                      setAntialiasing(SbBool smoothing, int numPasses)
 void                      getAntialiasing(SbBool &smoothing, int
                                &numPasses) const
 void                      setClearBeforeRender(SbBool trueOrFalse)
 SbBool                    isClearBeforeRender() const
 void                      setClearBeforeOverlayRender(SbBool trueOrFalse)
 SbBool                    isClearBeforeOverlayRender() const
 void                      setAutoRedraw(SbBool trueOrFalse)
 SbBool                    isAutoRedraw() const
 void                      setRedrawPriority(uint32_t priority)
 uint32_t                  getRedrawPriority() const
 static uint32_t           getDefaultRedrawPriority()
 void                      render()
 void                      renderOverlay()
 void                      scheduleRedraw()
 void                      scheduleOverlayRedraw()
 void                      redrawOnSelectionChange(SoSelection *s)
 void                      redrawOverlayOnSelectionChange(SoSelection *s)
 void                      setEventCallback(SoXtRenderAreaEventCB *fcn,
                                void *userData = NULL)
 void                      setGLRenderAction(SoGLRenderAction *ra)
 SoGLRenderAction *        getGLRenderAction() const
 void                      setOverlayGLRenderAction(SoGLRenderAction *ra)
 SoGLRenderAction *        getOverlayGLRenderAction() const
 void                      setSceneManager(SoSceneManager *sm)
 SoSceneManager *          getSceneManager() const
 void                      setOverlaySceneManager(SoSceneManager *sm)
 SoSceneManager *          getOverlaySceneManager() const

🫢 Methods from class SoXtGLWidget

GL things, window things, visual things β€” the whole backstage crew:

 void                setBorder(SbBool onOrOff)
 SbBool              isBorder() const
 virtual void        setDoubleBuffer(SbBool onOrOff)
 SbBool              isDoubleBuffer()
 Window              getNormalWindow()
 Window              getOverlayWindow()
 GLXContext          getNormalContext()
 GLXContext          getOverlayContext()
 Widget              getNormalWidget()
 Widget              getOverlayWidget()
 virtual void        setNormalVisual(XVisualInfo *vis)
 XVisualInfo *       getNormalVisual()
 virtual void        setOverlayVisual(XVisualInfo *vis)
 XVisualInfo *       getOverlayVisual()
 void                setDrawToFrontBufferEnable(SbBool enableFlag)
 SbBool              isDrawToFrontBufferEnable() const

🫢 Methods from class SoXtComponent

and finally, the base class, the ancestor, the origin story:

 virtual void            show()
 virtual void            hide()
 SbBool                  isVisible()
 Widget                  getWidget() const
 SbBool                  isTopLevelShell() const
 Widget                  getShellWidget() const
 Widget                  getParentWidget() const
 void                    setSize(const SbVec2s &size)
 SbVec2s                 getSize()
 Display *               getDisplay()
 void                    setTitle(const char *newTitle)
 const char *            getTitle() const
 void                    setIconTitle(const char *newIconTitle)
 const char *            getIconTitle() const
 void                    setWindowCloseCallback(SoXtComponentCB *func, void
                              *data = NULL)
 static SoXtComponent *  getComponent(Widget w)
 const char *            getWidgetName() const
 const char *            getClassName() const

🌈 DESCRIPTION 🌈

okay so here's the whole entire point of her πŸ’–

The Examiner viewer component lets you rotate the view around a point of interest using a virtual trackball. she uses the camera's focalDistance field to figure out where that point of rotation is, and that's usually set to be at the center of the scene. makes sense, lowkey genius.

but wait, there's more (there's always more, she's an overachiever):

  • you can rotate the camera around the point of interest ✨
  • you can translate the camera in the viewer plane πŸ¦‹
  • you can dolly β€” that's move forward and backward β€” to get closer to or further away from the point of interest πŸŽ€
  • and she also supports seek, so you can quickly move the camera to a desired object or point πŸ”₯

it's giving "main character energy" fr fr.


πŸ’… METHODS πŸ’…

the constructor + destructor

                     SoXtExaminerViewer(Widget parent = NULL, const char
                          *name = NULL, SbBool buildInsideParent = TRUE,
                          SoXtFullViewer::BuildFlag flag = BUILD_ALL,
                          SoXtViewer::Type type = BROWSER)
                     ~SoXtExaminerViewer()

Constructor and destructor, and this is where you specify the viewer type. for a description of the viewer types, bestie, please refer to the SoXtViewer reference page β€” that's where all the type lore lives. πŸ“–

feedback visibility

 void                setFeedbackVisibility(SbBool onOrOff)
 SbBool              isFeedbackVisible() const

Show or hide the point of rotation feedback. important detail: it only appears while in viewing mode, and it's off by default. so if you're wondering why nothing's showing up, that's why. πŸ™ˆ

feedback size

 void                setFeedbackSize(int newSize)
 int                 getFeedbackSize() const

Set or get the point of rotation feedback size, measured in pixels. the default is 20 pix. tiny but mighty πŸ“

animation

 void                setAnimationEnabled(SbBool onOrOff)
 SbBool              isAnimationEnabled()

Enable or disable the spinning animation feature of the viewer. it's enabled by default β€” she likes to spin, she likes to twirl, it's her whole thing πŸ’«

stopping the spin

 void                stopAnimating()
 SbBool              isAnimating()

Stop the animation if it is occurring, and query whether the viewer is currently animating. two jobs, one bullet point, she contains multitudes 🧚


okay that's part 1 done, and bestie we are so not finished β€” there's more coming 🌸

✨ RESOURCES ✨

okay so these are the resource settings you can drop in your app-defaults file to vibe-check the viewer before it even shows up πŸ’… every one of them is prefixed with SoXtExaminerViewer. (or, for the colour one, the wildcard-y SoXtExaminerViewer*), and the default is listed first, with the allowed type in the parens:

  • *SoXtExaminerViewer.spinAnimation β€” on (on | off). spin spin spin πŸŒ€
  • *SoXtExaminerViewer.pointOfRotationAxes β€” off (on | off). do you want the axes drawn at the point of rotation or not, bestie
  • *SoXtExaminerViewer.axesSize β€” 20 (short, pixels if axes is on). how chunky those axes are, in pixels πŸ“
  • *SoXtExaminerViewer.decoration β€” on (on | off). the pretty decoration, on by default, iconic ✨
  • *SoXtExaminerViewer.seekAnimationTime β€” 2.0 (float). how long the seek animation takes to glide in, in seconds πŸ¦‹
  • *SoXtExaminerViewer.seekTo β€” point (point | object). are we seeking to a point or to an object, choose your fighter
  • *SoXtExaminerViewer.seekDistanceUsage β€” percentage (percentage | absolute). how the seek distance gets interpreted πŸ“
  • *SoXtExaminerViewer.zoomMin β€” 1.0 (float). how far in you're allowed to zoom, minimum
  • *SoXtExaminerViewer.zoomMax β€” 179.0 (float). how far out you're allowed to zoom, maximum πŸ”­
  • *SoXtExaminerViewer.autoClipping β€” on (on | off). automatic clipping, she's on by default
  • *SoXtExaminerViewer.nearDistance β€” 2.4 (float, when autoClipping is off). the near clipping plane, only you get to set this when auto clipping is off, no cap
  • *SoXtExaminerViewer.farDistance β€” 2.8 (float, when autoClipping is off). same deal, far plane, only when autoClipping is off
  • *SoXtExaminerViewer*BackgroundColor β€” black (color name or hex value). the background colour, defaults to black, accepts a colour name or a hex value, flexible queen πŸ–€
notice the wildcard * in that last one instead of a . β€” that's how the original writes it, so that's how we write it. copy it exactly, bestie 🫢

πŸ–±οΈ USAGE πŸ–±οΈ

okay this is the part you actually need, the mouse choreography πŸ’ƒ the way this thing handles input is lowkey a whole dance routine:

  • Left Mouse β€” Rotate the virtual trackball. 🎱
  • Middle Mouse β€” (and also Ctrl + Left Mouse) β€” Translate up, down, left and right. 🫸🫷
  • Ctrl + Middle Mouse β€” (and also Left + Middle Mouse) β€” Dolly in and out (gets closer to and further away from the object). πŸ”
  • <s> + click β€” Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on a target object. 🎯
  • Right Mouse β€” Open the popup menu. πŸ“‹
fr fr do not hold down the <s> key, just press it and let go, then click. that's the whole trick, iykyk πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

go read these next, they're all in the same friend group 🫢

  • SoXtFullViewer
  • SoXtViewer
  • SoXtComponent
  • SoXtRenderArea
  • SoXtWalkViewer
  • SoXtFlyViewer
  • SoXtPlaneViewer

and that's the whole page, bestie πŸ’– she lives in source SoXtExaminerViewer(3IV) and the date slot on the footer is literally just sitting there empty, no cap 😭 so consider this your sign-off: go rotate something, slay, periodt πŸ‘‘βœ¨πŸŒΈ