SoQtConstrainedViewer(3)
π 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, plusvaluedefaulting to0.6f, plus anSoQtAutoClippingCB *cbdefaulting toNULL, plusvoid *cbuserdatadefaulting toNULL. 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 anSbBool, 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.datadefaults toNULL.void addFinishCallback (SoQtViewerCB *func, void *data=NULL)β hook a callback to the finish event.datadefaults toNULL.void removeStartCallback (SoQtViewerCB *func, void *data=NULL)β unhook that start callback.datadefaults toNULL.void removeFinishCallback (SoQtViewerCB *func, void *data=NULL)β unhook that finish callback.datadefaults toNULL.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;zbEnabledefaults toTRUE.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;userdefaults toNULL.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 anSoEventthrough 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 anSbBool.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;userdefaults toNULL.
π 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 bydelta. 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 unnamedfloatβ 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 anSoEvent.
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, notGLβ 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, withuser=NULLby 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)β plaininit, yes, separate frominitClass.
π Protected Attributes inherited from SoQtFullViewer
QWidget * leftWheelQWidget * rightWheelQWidget * bottomWheelQWidget * leftDecorationQWidget * rightDecorationQWidget * bottomDecorationQWidget * leftWheelLabelchar * leftWheelStrfloat leftWheelValQWidget * rightWheelLabelchar * rightWheelStrfloat rightWheelValQWidget * bottomWheelLabelchar * bottomWheelStrfloat bottomWheelValSoQtPopupMenu * prefmenu
π Protected Attributes inherited from SoQtGLWidget
SbBool waitForExposeSbBool 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
- opensuse-leap 16.0: SoQt-devel 1.6.2-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: SoQt-devel 1.6.2-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: SoQt-devel 1.6.2-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: SoQt-devel 1.6.2-bp160.1.13 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms