SoQtConstrainedViewer(3)

πŸ“¦
version 1.6.2 Β· 3 versions
, in opensuse-leap 16.0

πŸ’… SoQtConstrainedViewer(3) β€” the SoQt one ✨

okay so bestie, buckle up: this is the manpage for SoQtConstrainedViewer, and it lives in the SoQt family. She's the superclass for viewers that have opinions about where the camera's up-vector can point. Think of her as the mom friend who doesn't let the viewpoint do anything embarrassing. 🫢


🌸 NAME 🌸

SoQtConstrainedViewer β€” the superclass for viewers with constrains on the viewpoint. (yes, "constrains", that's literally what the original says, we don't fix the spelling of our ancestors πŸ’€)

The way that this class is the blueprint, and SoQtFlyViewer is the child that actually goes places. Cute.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Ink / Qt/viewers/SoQtConstrainedViewer.h>

no wait, actual one, character for character:

#include <Inventor/Qt/viewers/SoQtConstrainedViewer.h>

Inherits SoQtFullViewer.

Inherited by SoQtFlyViewer. ✈️ (that's the fly one, get it)


⭐ Public Member Functions

These are the ones she lets you call directly. Short list, but she makes it count:

  • void setUpDirection (const SbVec3f &dir) β€” sets which way is "up" for the camera. you're literally telling the scene which way the sky goes.
  • const SbVec3f & getUpDirection (void) const β€” hands you back the up direction. read-only, respectful. πŸŽ€
  • virtual void setCamera (SoCamera *newcam) β€” swaps in a whole new camera. yes, the entire camera. main character energy.
  • virtual void saveHomePosition (void) β€” bookmarks where the camera is right now so you can yeet back later.
  • virtual void resetToHomePosition (void) β€” the "undo my chaotic camera wandering" button. iconic. πŸ”₯

🧸 Public Member Functions inherited from SoQtFullViewer

the deluxe edition features, passed down like a family heirloom:

  • void setDecoration (const SbBool on) β€” toggles the window decoration chrome.
  • SbBool isDecoration (void) const β€” is the decoration on or not, bestie.
  • void setPopupMenuEnabled (const SbBool on) β€” enable/disable the popup menu.
  • SbBool isPopupMenuEnabled (void) const β€” asks the popup menu how it's feeling (enabled or not).
  • QWidget * getAppPushButtonParent (void) const β€” gives you the widget that's parent to app push buttons.
  • void addAppPushButton (QWidget *newButton) β€” add your own button to the viewer. customise her πŸ’…
  • void insertAppPushButton (QWidget *newButton, int index) β€” same, but at a specific spot in the lineup.
  • void removeAppPushButton (QWidget *oldButton) β€” bye bye button.
  • int findAppPushButton (QWidget *oldButton) const β€” finds a button by pointer, returns its index.
  • int lengthAppPushButton (void) const β€” how many app buttons we got.
  • QWidget * getRenderAreaWidget (void) const β€” the widget where the actual rendering happens.
  • virtual void setViewing (SbBool on) β€” turn viewing mode on/off.
  • virtual void setComponentCursor (const SoQtCursor &cursor) β€” set the cursor for this component. πŸ–±οΈβœ¨

🌈 Public Member Functions inherited from SoQtViewer

this is the long one. grab a snack. πŸ“

  • SoCamera * getCamera (void) const β€” the current camera, in all her glory.
  • virtual void setCameraType (SoType type) β€” pick which kind of camera she uses.
  • SoType getCameraType (void) const β€” which kind is she using right now.
  • virtual void toggleCameraType (void) β€” flips between camera types. no thoughts, just toggling.
  • virtual void viewAll (void) β€” frames the whole scene. the "make it fit" button.
  • virtual void setHeadlight (SbBool enable) β€” on/off for the headlight.
  • SbBool isHeadlight (void) const β€” headlight status check.
  • SoDirectionalLight * getHeadlight (void) const β€” hands you the headlight object itself.
  • virtual void setDrawStyle (SoQtViewer::DrawType type, SoQtViewer::DrawStyle style) β€” pick the draw style for a given draw type.
  • SoQtViewer::DrawStyle getDrawStyle (const SoQtViewer::DrawType type) const β€” what's the draw style for this draw type.
  • virtual void setBufferingType (SoQtViewer::BufferType type) β€” set the buffering type.
  • SoQtViewer::BufferType getBufferingType (void) const β€” read back the buffering type.
  • SbBool isViewing (void) const β€” are we viewing or nah.
  • virtual void setCursorEnabled (SbBool enable) β€” cursor on/off.
  • SbBool isCursorEnabled (void) const β€” cursor status, respectfully asked.
  • void setAutoClipping (SbBool enable) β€” auto-clipping on/off.
  • SbBool isAutoClipping (void) const β€” is auto-clipping doing her thing.
  • void setAutoClippingStrategy (const AutoClippingStrategy strategy, const float value=0.6f, SoQtAutoClippingCB *cb=NULL, void *cbuserdata=NULL) β€” the full auto-clipping config: strategy, plus value defaulting to 0.6f, plus an SoQtAutoClippingCB *cb defaulting to NULL, plus void *cbuserdata defaulting to NULL. all the knobs. πŸŽ›οΈ
  • virtual void setStereoViewing (SbBool enable) β€” stereo viewing on/off.
  • SbBool isStereoViewing (void) const β€” stereo viewing status.
  • virtual void setStereoOffset (const float dist) β€” how far apart the stereo eyes sit.
  • float getStereoOffset (void) const β€” read that offset back.
  • SbBool setStereoType (SoQtViewer::StereoType s) β€” set the stereo flavour. returns an SbBool, because she likes to report back.
  • SoQtViewer::StereoType getStereoType (void) const β€” which stereo flavour are we on.
  • void setAnaglyphStereoColorMasks (const SbBool left[3], const SbBool right[3]) β€” the anaglyph color masks, one three-element array per eye.
  • void getAnaglyphStereoColorMasks (SbBool left[3], SbBool right[3]) β€” reads those anaglyph masks out into your arrays.
  • void setDetailSeek (const SbBool enable) β€” detail-seek on/off.
  • SbBool isDetailSeek (void) const β€” detail-seek status.
  • void setSeekTime (const float seconds) β€” how long a seek animation takes, in seconds.
  • float getSeekTime (void) const β€” how long a seek animation takes, in seconds, but as a return value.
  • void addStartCallback (SoQtViewerCB *func, void *data=NULL) β€” hook a callback to the start event. data defaults to NULL.
  • void addFinishCallback (SoQtViewerCB *func, void *data=NULL) β€” hook a callback to the finish event. data defaults to NULL.
  • void removeStartCallback (SoQtViewerCB *func, void *data=NULL) β€” unhook that start callback. data defaults to NULL.
  • void removeFinishCallback (SoQtViewerCB *func, void *data=NULL) β€” unhook that finish callback. data defaults to NULL.
  • void setWireframeOverlayColor (const SbColor &color) β€” the wireframe overlay colour. aesthetic choice, honestly.
  • const SbColor & getWireframeOverlayColor (void) const β€” read the wireframe overlay colour back.
  • virtual void setDoubleBuffer (const SbBool enable) β€” double buffering on/off.
  • virtual void setSceneGraph (SoNode *root) β€” drop in your scene graph root.
  • virtual SoNode * getSceneGraph (void) const (well, virtual SoNode * getSceneGraph (void) in the original) β€” gives you the scene graph root back.

πŸŽ€ Public Member Functions inherited from SoQtRenderArea

the render area has so many features and she wants you to know about every single one:

  • SoQtRenderArea (QWidget *parent=NULL, const char *name=NULL, SbBool embed=TRUE, SbBool mouseInput=TRUE, SbBool keyboardInput=TRUE) β€” the constructor. defaults: parent=NULL, name=NULL, embed=TRUE, mouseInput=TRUE, keyboardInput=TRUE.
  • ~SoQtRenderArea () β€” the destructor.
  • void setOverlaySceneGraph (SoNode *scene) β€” set a whole separate overlay scene.
  • SoNode * getOverlaySceneGraph (void) β€” get that overlay scene back.
  • void setBackgroundColor (const SbColor &color) β€” background colour, go wild.
  • const SbColor & getBackgroundColor (void) const β€” what's the background colour.
  • void setBackgroundIndex (int idx) β€” background as a colour-map index.
  • int getBackgroundIndex (void) const β€” which index is the background.
  • void setOverlayBackgroundIndex (int idx) β€” overlay background index.
  • int getOverlayBackgroundIndex (void) const β€” read the overlay background index.
  • void setColorMap (int start, int num, const SbColor *colors) β€” install a colour map chunk.
  • void setOverlayColorMap (int start, int num, const SbColor *colors) β€” same but for the overlay.
  • void setViewportRegion (const SbViewportRegion &newRegion) β€” set the viewport region.
  • const SbViewportRegion & getViewportRegion (void) const β€” read the viewport region.
  • void setTransparencyType (SoGLRenderAction::TransparencyType type) β€” choose how transparency is rendered.
  • SoGLRenderAction::TransparencyType getTransparencyType (void) const β€” read the transparency type.
  • void setAntialiasing (SbBool smoothing, int numPasses) β€” antialiasing config: smoothing flag + number of passes.
  • void getAntialiasing (SbBool &smoothing, int &numPasses) const β€” reads antialiasing settings out via references.
  • void setClearBeforeRender (SbBool enable, SbBool zbEnable=TRUE) β€” clear before render; zbEnable defaults to TRUE.
  • SbBool isClearBeforeRender (void) const β€” are we clearing before render.
  • SbBool isClearZBufferBeforeRender (void) const β€” are we clearing the z-buffer before render.
  • void setClearBeforeOverlayRender (SbBool enable) β€” clear before the overlay render.
  • SbBool isClearBeforeOverlayRender (void) const β€” clearing before overlay render, y/n.
  • void setAutoRedraw (SbBool enable) β€” auto redraw on/off.
  • SbBool isAutoRedraw (void) const β€” auto redraw status.
  • void setRedrawPriority (uint32_t priority) β€” set the redraw priority.
  • uint32_t getRedrawPriority (void) const β€” read the redraw priority.
  • void render (void) β€” render. just. render. go off. πŸ”₯
  • void renderOverlay (void) β€” render the overlay.
  • void scheduleRedraw (void) β€” queue up a redraw for later.
  • void scheduleOverlayRedraw (void) β€” queue up an overlay redraw for later.
  • void redrawOnSelectionChange (SoSelection *selection) β€” redraw whenever this selection changes.
  • void redrawOverlayOnSelectionChange (SoSelection *selection) β€” redraw the overlay whenever this selection changes.
  • void setEventCallback (SoQtRenderAreaEventCB *func, void *user=NULL) β€” set an event callback; user defaults to NULL.
  • void setSceneManager (SoSceneManager *manager) β€” hand over the scene manager.
  • SoSceneManager * getSceneManager (void) const β€” get the scene manager back.
  • void setOverlaySceneManager (SoSceneManager *manager) β€” hand over the overlay scene manager.
  • SoSceneManager * getOverlaySceneManager (void) const β€” get the overlay scene manager back.
  • void setGLRenderAction (SoGLRenderAction *action) β€” swap in the GL render action.
  • SoGLRenderAction * getGLRenderAction (void) const β€” get the GL render action.
  • void setOverlayGLRenderAction (SoGLRenderAction *action) β€” swap in the overlay GL render action.
  • SoGLRenderAction * getOverlayGLRenderAction (void) const β€” get the overlay GL render action.
  • SbBool sendSoEvent (const SoEvent *event) β€” push an SoEvent through the system.
  • void registerDevice (SoQtDevice *device) β€” register an input device.
  • void unregisterDevice (SoQtDevice *device) β€” un-register it. 😭

πŸ¦‹ Public Member Functions inherited from SoQtGLWidget

GL widget era. she's got buffers for days:

  • void setBorder (const SbBool enable) β€” border on/off.
  • SbBool isBorder (void) const β€” is there a border.
  • SbBool isDoubleBuffer (void) const β€” double buffering check.
  • void setDrawToFrontBufferEnable (const SbBool enable) β€” draw-to-front-buffer on/off.
  • SbBool isDrawToFrontBufferEnable (void) const β€” is draw-to-front-buffer enabled.
  • void setQuadBufferStereo (const SbBool enable) β€” quad buffer stereo on/off.
  • SbBool isQuadBufferStereo (void) const β€” quad buffer stereo status.
  • void setAccumulationBuffer (const SbBool enable) β€” accumulation buffer on/off.
  • SbBool getAccumulationBuffer (void) const β€” read the accumulation buffer setting.
  • void setStencilBuffer (const SbBool enable) β€” stencil buffer on/off.
  • SbBool getStencilBuffer (void) const β€” read the stencil buffer setting.
  • void setAlphaChannel (const SbBool enable) β€” alpha channel on/off.
  • SbBool getAlphaChannel (void) const β€” read the alpha channel setting.
  • void setOverlayRender (const SbBool onoff) β€” overlay render on/off.
  • SbBool isOverlayRender (void) const β€” is overlay render happening.
  • void setSampleBuffers (const int numsamples) β€” how many sample buffers.
  • int getSampleBuffers (void) const β€” read how many sample buffers.
  • void setStealFocus (SbBool enable) β€” steal focus, y/n. rude but valid πŸ’…
  • SbBool isStealFocus (void) const β€” do we steal focus.
  • QWidget * getGLWidget (void) const β€” the GL widget.
  • QWidget * getNormalWidget (void) const β€” the normal widget.
  • QWidget * getOverlayWidget (void) const β€” the overlay widget.
  • SbBool hasOverlayGLArea (void) const β€” does she have an overlay GL area.
  • SbBool hasNormalGLArea (void) const β€” does she have a normal GL area.
  • unsigned long getOverlayTransparentPixel (void) β€” the overlay transparent pixel value.
  • void getPointSizeLimits (SbVec2f &range, float &granularity) β€” reads point size limits out into your refs.
  • void getLineWidthLimits (SbVec2f &range, float &granularity) β€” reads line width limits out into your refs.

🧚 Public Member Functions inherited from SoQtComponent

component-level stuff, very "who am I as a widget" energy:

  • virtual SoType getTypeId (void) const β€” the type id.
  • virtual ~SoQtComponent () β€” destructor, but virtual.
  • virtual void show (void) β€” show her. πŸ‘‘
  • virtual void hide (void) β€” hide her. πŸ™ˆ
  • SbBool isFullScreen (void) const β€” fullscreen check.
  • SbBool setFullScreen (const SbBool onoff) β€” toggle fullscreen; returns an SbBool.
  • SbBool isVisible (void) const β€” is she visible.
  • SbBool isTopLevelShell (void) const β€” is she a top level shell.
  • QWidget * getWidget (void) const β€” the widget.
  • QWidget * getBaseWidget (void) const β€” the base widget.
  • QWidget * getShellWidget (void) const β€” the shell widget.
  • QWidget * getParentWidget (void) const β€” the parent widget.
  • void setSize (const SbVec2s size) β€” set the size.
  • SbVec2s getSize (void) const β€” get the size.
  • void setTitle (const char *const title) β€” set the window title.
  • const char * getTitle (void) const β€” get the window title.
  • void setIconTitle (const char *const title) β€” set the icon title.
  • const char * getIconTitle (void) const β€” get the icon title.
  • const char * getWidgetName (void) const β€” the widget name.
  • const char * getClassName (void) const β€” the class name.
  • void setWindowCloseCallback (SoQtComponentCB *const func, void *const user=NULL) β€” hook the window-close callback; user defaults to NULL.

πŸ’œ Public Member Functions inherited from SoQtObject

literally one (1) function. she's low maintenance:

  • SbBool isOfType (SoType type) const β€” is this object of that type.

πŸ’€ Protected Member Functions

the inner circle. you don't call these from outside, they're for subclasses and for the class herself when she's feeling private:

  • SoQtConstrainedViewer (QWidget *parent, const char *const name, SbBool embed, SoQtFullViewer::BuildFlag flag, SoQtViewer::Type type, SbBool build) β€” the protected constructor. yes, the constructor is protected. she's exclusive like that. ✨
  • ~SoQtConstrainedViewer () β€” the destructor.
  • virtual void tiltCamera (float delta) β€” tilts the camera by delta. this is the actual constraint-enforcing behaviour, lowkey the whole point of the class.
  • virtual void bottomWheelMotion (float value) β€” what happens when the bottom wheel moves.
  • virtual void leftWheelMotion (float value) β€” what happens when the left wheel moves.
  • virtual void changeCameraValues (SoCamera *camera) β€” adjust the camera's values.
  • void findUpDirection (SbVec2s mouselocation) β€” works out the up direction from a mouse location.
  • void checkForCameraUpConstrain (void) β€” the vibe check for the camera's up constraint. the name says it all, fr fr.

πŸ“ Protected Member Functions inherited from SoQtFullViewer

the protected inheritance list, i.e. the full-viewer internals:

  • SoQtFullViewer (QWidget *parent, const char *name, SbBool embed, BuildFlag flag, Type type, SbBool build) β€” protected constructor.
  • ~SoQtFullViewer () β€” destructor.
  • virtual void sizeChanged (const SbVec2s &size) β€” reacts to a size change.
  • QWidget * buildWidget (QWidget *parent) β€” builds the widget.
  • virtual void buildDecoration (QWidget *parent) β€” builds the decoration.
  • virtual QWidget * buildLeftTrim (QWidget *parent) β€” builds the left trim.
  • virtual QWidget * buildBottomTrim (QWidget *parent) β€” builds the bottom trim.
  • virtual QWidget * buildRightTrim (QWidget *parent) β€” builds the right trim.
  • QWidget * buildAppButtons (QWidget *parent) β€” builds the app buttons.
  • QWidget * buildViewerButtons (QWidget *parent) β€” builds the viewer buttons.
  • virtual void createViewerButtons (QWidget *parent, SbPList *buttonlist) β€” creates the viewer buttons into a list.
  • virtual void buildPopupMenu (void) β€” builds the popup menu.
  • virtual void setPopupMenuString (const char *title) β€” sets the popup menu's string.
  • virtual void openPopupMenu (const SbVec2s position) β€” opens the popup menu at a position.
  • virtual void leftWheelStart (void) β€” left wheel interaction starts.
  • virtual void leftWheelFinish (void) β€” left wheel interaction ends.
  • float getLeftWheelValue (void) const β€” the left wheel's value.
  • void setLeftWheelValue (const float value) β€” set the left wheel's value.
  • virtual void bottomWheelStart (void) β€” bottom wheel interaction starts.
  • virtual void bottomWheelFinish (void) β€” bottom wheel interaction ends.
  • float getBottomWheelValue (void) const β€” the bottom wheel's value.
  • void setBottomWheelValue (const float value) β€” set the bottom wheel's value.
  • virtual void rightWheelStart (void) β€” right wheel interaction starts.
  • virtual void rightWheelMotion (float) β€” right wheel motion. note the unnamed float β€” yes, she left it unnamed. we respect it.
  • virtual void rightWheelFinish (void) β€” right wheel interaction ends.
  • float getRightWheelValue (void) const β€” the right wheel's value.
  • void setRightWheelValue (const float value) β€” set the right wheel's value.
  • void setLeftWheelString (const char *const name) β€” label for the left wheel.
  • QWidget * getLeftWheelLabelWidget (void) const β€” the left wheel's label widget.
  • void setBottomWheelString (const char *const name) β€” label for the bottom wheel.
  • QWidget * getBottomWheelLabelWidget (void) const β€” the bottom wheel's label widget.
  • void setRightWheelString (const char *const name) β€” label for the right wheel.
  • const char * getRightWheelString () const β€” the right wheel's string. note the empty parens, that's how she wrote it, we keep it.
  • QWidget * getRightWheelLabelWidget (void) const β€” the right wheel's label widget.
  • virtual SbBool processSoEvent (const SoEvent *const event) β€” processes an SoEvent.

part one ends right here bestie β€” the rest is coming, don't you dare close the terminal πŸ’–

πŸ’« Protected Member Functions inherited from SoQtViewer

These are the family-only (protected πŸ”’) members you get handed down from the parent class β€” still yours to use if you subclass, bestie:

  • SoQtViewer (QWidget *parent, const char *name, SbBool embed, Type type, SbBool build) β€” the inherited constructor.
  • ~SoQtViewer () β€” the inherited destructor.
  • virtual void setSeekMode (SbBool enable) β€” flip seek mode on or off.
  • SbBool isSeekMode (void) const β€” ask whether seek mode is currently on.
  • SbBool seekToPoint (const SbVec2s screenpos) β€” seek toward a screen position.
  • void seekToPoint (const SbVec3f &scenepos) β€” and here's the overload that takes a scene position instead.
  • virtual void computeSeekFinalOrientation (void) β€” sorts out the final orientation for a seek.
  • virtual void actualRedraw (void) β€” the actual redraw hook.
  • void interactiveCountInc (void) β€” bump the interactive counter up by one.
  • void interactiveCountDec (void) β€” drop the interactive counter down by one.
  • int getInteractiveCount (void) const β€” read the current interactive count.
  • void setSeekDistance (const float distance) β€” set how far a seek travels.
  • float getSeekDistance (void) const β€” read back that seek distance.
  • void setSeekValueAsPercentage (const SbBool on) β€” toggle whether the seek value is treated as a percentage.
  • SbBool isSeekValuePercentage (void) const β€” check if that percentage thing is on.
  • void addSuperimposition (SoNode *scene) β€” add a superimposition node.
  • void removeSuperimposition (SoNode *scene) β€” take one back out.
  • void setSuperimpositionEnabled (SoNode *scene, const SbBool enable) β€” enable or disable a superimposition scene.
  • SbBool getSuperimpositionEnabled (SoNode *scene) const β€” query whether it's enabled.

πŸŽ€ Protected Member Functions inherited from SoQtRenderArea

  • SoQtRenderArea (QWidget *parent, const char *name, SbBool embed, SbBool mouseInput, SbBool keyboardInput, SbBool build) β€” inherited constructor, with mouse and keyboard input switches.
  • virtual void redraw (void) β€” redraw.
  • virtual void redrawOverlay (void) β€” redraw the overlay layer.
  • virtual void actualOverlayRedraw (void) β€” the actual overlay redraw hook.
  • virtual void processEvent (QEvent *event) β€” handle an incoming Qt event.
  • virtual void initGraphic (void) β€” set up the graphics.
  • virtual void initOverlayGraphic (void) β€” set up the overlay graphics.
  • virtual void widgetChanged (QWidget *widget) β€” called when the widget changes.
  • virtual void afterRealizeHook (void) β€” the hook that runs after realization.
  • QWidget * buildWidget (QWidget *parent) β€” build the widget under a given parent.
  • virtual const char * getDefaultWidgetName (void) const β€” default widget name getter.
  • virtual const char * getDefaultTitle (void) const β€” default title getter.
  • virtual const char * getDefaultIconTitle (void) const β€” default icon title getter.
  • virtual SbBool glScheduleRedraw (void) β€” schedule a GL redraw.

πŸ¦‹ Protected Member Functions inherited from SoQtGLWidget

  • SoQtGLWidget (QWidget *const parent=NULL, const char *const name=NULL, const SbBool embed=TRUE, const int glmodes=SO_GL_RGB, const SbBool build=TRUE) β€” inherited constructor, note the defaults: parent=NULL, name=NULL, embed=TRUE, glmodes=SO_GL_RGB, build=TRUE.
  • ~SoQtGLWidget () β€” destructor.
  • QWidget * buildWidget (QWidget *parent) β€” build the widget.
  • void setGLSize (const SbVec2s size) β€” set the GL size.
  • SbVec2s getGLSize (void) const β€” get the GL size.
  • float getGLAspectRatio (void) const β€” get the GL aspect ratio.
  • void setGlxSize (const SbVec2s size) β€” set the Glx size (yes, Glx, not GL β€” that's how it's spelled, leave it alone πŸ™ˆ).
  • SbVec2s getGlxSize (void) const β€” get the Glx size.
  • float getGlxAspectRatio (void) const β€” get the Glx aspect ratio.
  • void setStereoBuffer (SbBool flag) β€” set the stereo buffer flag.
  • SbBool isStereoBuffer (void) const β€” is this a stereo buffer?
  • SbBool isRGBMode (void) β€” are we in RGB mode?
  • void glLockNormal (void) β€” lock the normal buffer.
  • void glUnlockNormal (void) β€” unlock it.
  • void glLockOverlay (void) β€” lock the overlay buffer.
  • void glUnlockOverlay (void) β€” unlock the overlay buffer.
  • void glSwapBuffers (void) β€” swap the buffers.
  • void glFlushBuffer (void) β€” flush the buffer.

🌸 Protected Member Functions inherited from SoQtComponent

  • SoQtComponent (QWidget *const parent=NULL, const char *const name=NULL, const SbBool embed=TRUE) β€” constructor with those same friendly defaults.
  • void setClassName (const char *const name) β€” set the class name.
  • void setBaseWidget (QWidget *widget) β€” set the base widget.
  • void registerWidget (QWidget *widget) β€” register a widget.
  • void unregisterWidget (QWidget *widget) β€” unregister one.
  • void addVisibilityChangeCallback (SoQtComponentVisibilityCB *const func, void *const user=NULL) β€” add a visibility-change callback, with user=NULL by default.
  • void removeVisibilityChangeCallback (SoQtComponentVisibilityCB *const func, void *const user=NULL) β€” remove one.

πŸ‘‘ Additional Inherited Members

The whole extended family tree, no cap:

🧚 Public Types inherited from SoQtFullViewer

enum BuildFlag { BUILD_NONE = 0x00, BUILD_DECORATION = 0x01, BUILD_POPUP
    = 0x02, BUILD_ALL = (BUILD_DECORATION | BUILD_POPUP) }

⭐ Public Types inherited from SoQtViewer

enum Type { BROWSER, EDITOR }
enum DrawStyle { VIEW_AS_IS, VIEW_HIDDEN_LINE, VIEW_NO_TEXTURE,
    VIEW_LOW_COMPLEXITY, VIEW_LINE, VIEW_POINT, VIEW_BBOX,
    VIEW_LOW_RES_LINE, VIEW_LOW_RES_POINT, VIEW_SAME_AS_STILL,
    VIEW_WIREFRAME_OVERLAY }
enum DrawType { STILL = 0, INTERACTIVE }
enum BufferType { BUFFER_SINGLE, BUFFER_DOUBLE, BUFFER_INTERACTIVE }
enum AutoClippingStrategy { VARIABLE_NEAR_PLANE, CONSTANT_NEAR_PLANE }
enum StereoType { STEREO_NONE, STEREO_ANAGLYPH, STEREO_QUADBUFFER,
    STEREO_INTERLEAVED_ROWS, STEREO_INTERLEAVED_COLUMNS }

πŸ”₯ Static Public Member Functions inherited from SoQtRenderArea

  • static uint32_t getDefaultRedrawPriority (void) β€” hand it the default redraw priority. Static, so no object needed, slay.

πŸ’œ Static Public Member Functions inherited from SoQtComponent

  • static void initClass (void) β€” init the class.
  • static SoType getClassTypeId (void) β€” get the class type id.
  • static void setWidgetCursor (QWidget *w, const SoQtCursor &cursor) β€” set a widget's cursor.
  • static SoQtComponent * getComponent (QWidget *widget) β€” look up the component for a widget.
  • static void initClasses (void) β€” init the classes (plural version, careful πŸ‘€).

πŸŽ€ Static Public Member Functions inherited from SoQtObject

  • static void initClass (void) β€” init the class.
  • static SoType getClassTypeId (void) β€” get the class type id.
  • static void init (void) β€” plain init, yes, separate from initClass.

🌈 Protected Attributes inherited from SoQtFullViewer

  • QWidget * leftWheel
  • QWidget * rightWheel
  • QWidget * bottomWheel
  • QWidget * leftDecoration
  • QWidget * rightDecoration
  • QWidget * bottomDecoration
  • QWidget * leftWheelLabel
  • char * leftWheelStr
  • float leftWheelVal
  • QWidget * rightWheelLabel
  • char * rightWheelStr
  • float rightWheelVal
  • QWidget * bottomWheelLabel
  • char * bottomWheelStr
  • float bottomWheelVal
  • SoQtPopupMenu * prefmenu

πŸ“ Protected Attributes inherited from SoQtGLWidget

  • SbBool waitForExpose
  • SbBool drawToFrontBuffer

πŸ’– Detailed Description

okay so real talk: SoQtConstrainedViewer is the superclass for viewers that put constraints on the viewpoint. It's abstract, bestie, so you don't instantiate it directly.

This abstract viewer class adds new methods to keep the camera in an upright position according to some arbitrary up-direction. That up-direction can be decided by either the application programmer β€” by using SoQtConstrainedViewer::setUpDirection() β€” or by the end-user, through the interaction mechanisms that the subclasses define. iykyk πŸ‘‘


✨ Constructor & Destructor Documentation

🌸 SoQtConstrainedViewer::SoQtConstrainedViewer (QWidget * parent, const char *const name, SbBool embed, SoQtFullViewer::BuildFlag flag, SoQtViewer::Type type, SbBool build) [protected]

Constructor. That's it, that's the whole ~~vibe~~ description ✨

πŸŽ€ SoQtConstrainedViewer::~SoQtConstrainedViewer () [protected]

Virtual destructor. Clean up after yourself, queen πŸ’…


πŸ¦‹ Member Function Documentation

πŸ’« void SoQtConstrainedViewer::setUpDirection (const SbVec3f & dir)

Set the up-direction vector for the camera viewpoint. This is you deciding which way is up, literally 🌈

⭐ const SbVec3f & SoQtConstrainedViewer::getUpDirection (void ) const

Return the up-direction vector for the camera viewpoint.

πŸ”₯ void SoQtConstrainedViewer::setCamera (SoCamera * cam) [virtual]

Set the camera we want the viewer to manipulate when interacting with the viewer controls.

bestie READ THIS PART πŸ‘€ the camera you pass in as an argument to this method must already be part of the viewer's scene graph. You do not inject viewpoint cameras to the viewer with this method.

So what you actually do is: insert a camera into the scene graph first (if necessary β€” often one will be present already 🌸), then register it as the camera used by the viewer controls with this method.

If the application code doesn't explicitly set up a camera through this method, the viewer will automatically scan through the scene graph to find a camera to use. And if no camera is available in the scene graph at all? It'll set up its own camera. Self-sufficient icon behaviour, honestly 🫢

See also: getCamera()

Reimplemented from SoQtViewer.

Reimplemented in SoQtFlyViewer.

πŸ’œ void SoQtConstrainedViewer::saveHomePosition (void ) [virtual]

Store the current camera settings for later retrieval with resetToHomePosition().

See also: resetToHomePosition()

Reimplemented from SoQtViewer.

🧚 void SoQtConstrainedViewer::resetToHomePosition (void ) [virtual]

Restore the saved camera settings. Home sweet home 🏠✨

See also: saveHomePosition()

Reimplemented from SoQtViewer.

Reimplemented in SoQtFlyViewer.

πŸ“ void SoQtConstrainedViewer::tiltCamera (float delta) [protected], [virtual]

This method tilts the camera delta degrees closer to the up direction.

🌈 void SoQtConstrainedViewer::bottomWheelMotion (float value) [protected], [virtual]

Called repeatedly as the user drags the thumbwheel in the bottom frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.

See also: bottomWheelStart(), bottomWheelFinish(), leftWheelStart(), rightWheelStart()

Reimplemented from SoQtFullViewer.

πŸŽ€ void SoQtConstrainedViewer::leftWheelMotion (float value) [protected], [virtual]

Called repeatedly as the user drags the thumbwheel in the left frame. Override this method in subclassed viewers to provide your own functionality on the thumbwheel.

See also: leftWheelStart(), leftWheelFinish(), bottomWheelStart(), rightWheelStart()

Reimplemented from SoQtFullViewer.

🌸 void SoQtConstrainedViewer::changeCameraValues (SoCamera * camera) [protected], [virtual]

Copies the settings of camera into our current camera. Cameras must be of the same class type β€” no mixing, no matching, no exceptions πŸ’€

Reimplemented from SoQtViewer.

⭐ void SoQtConstrainedViewer::findUpDirection (SbVec2s mouselocation) [protected]

Executes a ray pick at the given mouse pointer location and sets the viewer's camera up-vector direction to the normal vector of the picked geometry. Point at a thing, up becomes that thing's normal β€” science, fr fr 🧚

πŸ’… void SoQtConstrainedViewer::checkForCameraUpConstrain (void ) [protected]

If necessary, "tilts" the camera sideways so the up-direction is heeded. Yes, "constrain" β€” that's the spelling, don't come for me πŸ™ˆ


πŸ‘‘ Author

Generated automatically by Doxygen for SoQt from the source code. Not a human, not a vibe, just a robot doing its best 🫑


aaaand that's the whole page!! πŸ’– this was documented for SoQt version 1.6.2, stamped Sat Jan 6 2024 12:20:55 β€” go forth and keep that camera upright, bestie, SoQtConstrainedViewer(3) out πŸŽ€βœ¨

πŸ“¦ where this page comes from