logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SoXtFlyViewer — viewer component for flying through space, with a constant world up

Description

       Fly Viewer — this viewer is intended  to  simulate  flight  through  space,  with  a  constant  world  up
       direction.  The  viewer  only  constrains  the  camera to keep the user from flying upside down. No mouse
       buttons need to be pressed in order to fly. The mouse position is used only  for  steering,  while  mouse
       clicks are used to increase or decrease the viewer speed.

       The  viewer  allows  you  to  tilt your head up/down/right/left and move in the direction you are looking
       (forward or backward). The viewer also supports seek to quickly move the camera to a  desired  object  or
       point.

Inherits From

       SoXtComponent  >  SoXtGLWidget  >  SoXtRenderArea > SoXtViewer > SoXtFullViewer > SoXtConstrainedViewer >
       SoXtFlyViewer

Methods

SoXtFlyViewer(Widgetparent=NULL,constchar*name=NULL,SbBoolbuildInsideParent=TRUE,SoXtFullViewer::BuildFlagflag=BUILD_ALL,SoXtViewer::Typetype=BROWSER)~SoXtFlyViewer()
          Constructor  and  destructor which specifies the viewer type. Please refer to the SoXtViewer reference
          page for a description of the viewer types.

Name

       SoXtFlyViewer — viewer component for flying through space, with a constant world up

Resources

          *SoXtFlyViewer.decoration: on (on | off)
          *SoXtFlyViewer.seekAnimationTime: 2.0 (float)
          *SoXtFlyViewer.seekTo: point (point | object)
          *SoXtFlyViewer.seekDistanceUsage: percentage (percentage | absolute)
          *SoXtFlyViewer.zoomMin: 1.0 (float)
          *SoXtFlyViewer.zoomMax: 179.0 (float)
          *SoXtFlyViewer.autoClipping: on (on | off)
          *SoXtFlyViewer.nearDistance: 2.4 (float, when autoClipping is off)
          *SoXtFlyViewer.farDistance: 2.8 (float, when autoClipping is off)
          *SoXtFlyViewer*BackgroundColor: black (color name or hex value)

See Also

SoXtFullViewer,SoXtViewer,SoXtComponent,SoXtRenderArea,SoXtWalkViewer,SoXtExaminerViewer,SoXtPlaneViewerSoXtFlyViewer(3IV)()

Synopsis

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

          Methods from class SoXtFlyViewer:

                         SoXtFlyViewer(Widgetparent=NULL,constchar*name=NULL,SbBoolbuildInsideParent=TRUE,SoXtFullViewer::BuildFlagflag=BUILD_ALL,SoXtViewer::Typetype=BROWSER)~SoXtFlyViewer()

          Methods from class SoXtConstrainedViewer:

     voidsetUpDirection(constSbVec3f&newUpDirection)SbVec3fgetUpDirection()

          Methods from class SoXtFullViewer:

     voidsetDecoration(SbBoolonOrOff)SbBoolisDecoration()voidsetPopupMenuEnabled(SbBooltrueOrFalse)SbBoolisPopupMenuEnabled()WidgetgetAppPushButtonParent()constvoidaddAppPushButton(WidgetnewButton)voidinsertAppPushButton(WidgetnewButton,intindex)voidremoveAppPushButton(WidgetoldButton)intfindAppPushButton(WidgetoldButton)intlengthAppPushButton()WidgetgetRenderAreaWidget()

          Methods from class SoXtViewer:

     virtualvoidsetCamera(SoCamera*cam)SoCamera*getCamera()virtualvoidsetCameraType(SoTypetype)SoTypegetCameraType()virtualvoidviewAll()virtualvoidsaveHomePosition()virtualvoidresetToHomePosition()virtualvoidsetHeadlight(SbBoolonOrOff)SbBoolisHeadlight()SoDirectionalLight*getHeadlight()virtualvoidsetDrawStyle(SoXtViewer::DrawTypetype,SoXtViewer::DrawStylestyle)SoXtViewer::DrawStylegetDrawStyle(SoXtViewer::DrawTypetype)virtualvoidsetBufferingType(SoXtViewer::BufferTypetype)SoXtViewer::BufferTypegetBufferingType()virtualvoidsetViewing(SbBoolonOrOff)SbBoolisViewing()constvirtualvoidsetCursorEnabled(SbBoolonOrOff)SbBoolisCursorEnabled()constvoidsetAutoClipping(SbBoolonOrOff)SbBoolisAutoClipping()constvirtualvoidsetStereoViewing(SbBoolonOrOff)virtualSbBoolisStereoViewing()voidsetStereoOffset(floatdist)floatgetStereoOffset()voidsetDetailSeek(SbBoolonOrOff)SbBoolisDetailSeek()voidsetSeekTime(floatseconds)floatgetSeekTime()voidaddStartCallback(SoXtViewerCB*f,void*userData=NULL)voidaddFinishCallback(SoXtViewerCB*f,void*userData=NULL)voidremoveStartCallback(SoXtViewerCB*f,void*userData=NULL)voidremoveFinishCallback(SoXtViewerCB*f,void*userData=NULL)voidcopyView(TimeeventTime)voidpasteView(TimeeventTime)virtualvoidrecomputeSceneSize()

          Methods from class SoXtRenderArea:

     virtualvoidsetSceneGraph(SoNode*newScene)virtualSoNode*getSceneGraph()voidsetOverlaySceneGraph(SoNode*newScene)SoNode*getOverlaySceneGraph()voidregisterDevice(SoXtDevice*)voidunregisterDevice(SoXtDevice*)voidsetBackgroundColor(constSbColor&c)constSbColor&getBackgroundColor()constvoidsetBackgroundIndex(intindex)intgetBackgroundIndex()constvoidsetOverlayBackgroundIndex(intindex)intgetOverlayBackgroundIndex()constvoidsetColorMap(intstartIndex,intnum,constSbColor*colors)voidsetOverlayColorMap(intstartIndex,intnum,constSbColor*colors)voidsetViewportRegion(constSbViewportRegion&newRegion)constSbViewportRegion&getViewportRegion()constvoidsetTransparencyType(SoGLRenderAction::TransparencyTypetype)SoGLRenderAction::TransparencyTypegetTransparencyType()constvoidsetAntialiasing(SbBoolsmoothing,intnumPasses)voidgetAntialiasing(SbBool&smoothing,int&numPasses)constvoidsetClearBeforeRender(SbBooltrueOrFalse)SbBoolisClearBeforeRender()constvoidsetClearBeforeOverlayRender(SbBooltrueOrFalse)SbBoolisClearBeforeOverlayRender()constvoidsetAutoRedraw(SbBooltrueOrFalse)SbBoolisAutoRedraw()constvoidsetRedrawPriority(uint32_tpriority)uint32_tgetRedrawPriority()conststaticuint32_tgetDefaultRedrawPriority()voidrender()voidrenderOverlay()voidscheduleRedraw()voidscheduleOverlayRedraw()voidredrawOnSelectionChange(SoSelection*s)voidredrawOverlayOnSelectionChange(SoSelection*s)voidsetEventCallback(SoXtRenderAreaEventCB*fcn,void*userData=NULL)voidsetGLRenderAction(SoGLRenderAction*ra)SoGLRenderAction*getGLRenderAction()constvoidsetOverlayGLRenderAction(SoGLRenderAction*ra)SoGLRenderAction*getOverlayGLRenderAction()constvoidsetSceneManager(SoSceneManager*sm)SoSceneManager*getSceneManager()constvoidsetOverlaySceneManager(SoSceneManager*sm)SoSceneManager*getOverlaySceneManager()const

          Methods from class SoXtGLWidget:

     voidsetBorder(SbBoolonOrOff)SbBoolisBorder()constvirtualvoidsetDoubleBuffer(SbBoolonOrOff)SbBoolisDoubleBuffer()WindowgetNormalWindow()WindowgetOverlayWindow()GLXContextgetNormalContext()GLXContextgetOverlayContext()WidgetgetNormalWidget()WidgetgetOverlayWidget()virtualvoidsetNormalVisual(XVisualInfo*vis)XVisualInfo*getNormalVisual()virtualvoidsetOverlayVisual(XVisualInfo*vis)XVisualInfo*getOverlayVisual()voidsetDrawToFrontBufferEnable(SbBoolenableFlag)SbBoolisDrawToFrontBufferEnable()const

          Methods from class SoXtComponent:

     virtualvoidshow()virtualvoidhide()SbBoolisVisible()WidgetgetWidget()constSbBoolisTopLevelShell()constWidgetgetShellWidget()constWidgetgetParentWidget()constvoidsetSize(constSbVec2s&size)SbVec2sgetSize()Display*getDisplay()voidsetTitle(constchar*newTitle)constchar*getTitle()constvoidsetIconTitle(constchar*newIconTitle)constchar*getIconTitle()constvoidsetWindowCloseCallback(SoXtComponentCB*func,void*data=NULL)staticSoXtComponent*getComponent(Widgetw)constchar*getWidgetName()constconstchar*getClassName()const

Usage

LeftMouse: Click to increase speed.

       <s>+LeftMouse: Alternative to the Seek button. Press (but do not hold down) the <s> key, then click on
       a target object.

       <u>+LeftMouse: Press (but do not hold down) the <u> key, then click on a target object to set the "up"
       direction to the surface normal. By default +y is the "up" direction.

       MiddleMouse: Click to decrease speed.

       LeftandMiddleMouse: Click boths simultaneously to stop.

       Ctrl: Hold the key down to temporary stop and rotate the viewpoint.

       RightMouse: Open the popup menu.

See Also