Class RenderAreaInteractive

  • All Implemented Interfaces:
    com.jogamp.nativewindow.NativeSurfaceHolder, com.jogamp.opengl.GLAutoDrawable, com.jogamp.opengl.GLDrawable, com.jogamp.opengl.GLEventListener, com.jogamp.opengl.GLSharedContextSetter, java.util.EventListener,,,,,,, org.eclipse.swt.internal.SWTEventListener
    Direct Known Subclasses:
    RenderAreaExaminer, RenderAreaOrbiter

    public class RenderAreaInteractive
    extends RenderArea
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  RenderAreaInteractive.ClippingPlanesAdjustMode
      Camera clipping planes adjustment mode.
      When adjustment mode is set to AUTO, the camera near and far planes are dynamically adjusted to be as tight as possible (least amount of stuff is clipped) before each render traversal.
      When adjustment mode is set to MANUAL, the user is expected to manually set the camera near and far planes.
    • Field Summary

      • Fields inherited from class org.eclipse.swt.widgets.Control

      • Fields inherited from interface com.jogamp.opengl.GLAutoDrawable

    • Constructor Summary

      Constructor Description
      RenderAreaInteractive​(org.eclipse.swt.widgets.Composite parent, int style)  
      RenderAreaInteractive​(org.eclipse.swt.widgets.Composite parent, int style, com.jogamp.opengl.GLCapabilities caps)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void activateStereo​(boolean activated)  
      RenderAreaInteractive.ClippingPlanesAdjustMode getClippingPlanesAdjustMode()
      Get the camera clipping planes adjustment mode.
      SceneInteractor getRootSceneGraph()
      SceneInteractor getSceneInteractor()  
      void init​(com.jogamp.opengl.GLAutoDrawable drawable)  
      boolean isStereoSupported()  
      void keyPressed​( e)  
      void keyReleased​( e)  
      void mouseDoubleClick​( e)  
      void mouseDown​( e)  
      void mouseEnter​( e)  
      void mouseExit​( e)  
      void mouseHover​( e)  
      void mouseMove​( e)  
      void mouseScrolled​( e)  
      void mouseUp​( e)  
      void restoreCamera()  
      void saveCamera()  
      void setCameraType​(SceneInteractor.CameraMode mode)  
      void setClippingPlanesAdjustMode​(RenderAreaInteractive.ClippingPlanesAdjustMode mode)
      Set the camera clipping planes adjustment mode.
      void setSceneGraph​(SoNode sceneGraph)  
      void setStereoCameraBalance​(float balance)  
      void setStereoCameraOffset​(float offset)  
      void viewAll​(SbViewportRegion viewport)  
      void viewAxis​(SbVec3f direction, SbVec3f up)  
      • Methods inherited from class com.jogamp.opengl.swt.GLCanvas

        addGLEventListener, addGLEventListener, areAllGLEventListenerInitialized, create, createContext, destroy, display, dispose, disposeGLEventListener, flushGLRunnables, getAnimator, getAutoSwapBufferMode, getChosenGLCapabilities, getContext, getContextCreationFlags, getDelegatedDrawable, getExclusiveContextThread, getFactory, getGL, getGLEventListener, getGLEventListenerCount, getGLEventListenerInitState, getGLProfile, getHandle, getNativeSurface, getRequestedGLCapabilities, getSurfaceHeight, getSurfaceWidth, getUpstreamLock, getUpstreamWidget, invoke, invoke, isGLOriented, isRealized, isThreadGLCapable, main, removeGLEventListener, setAnimator, setAutoSwapBufferMode, setContext, setContextCreationFlags, setExclusiveContextThread, setGL, setGLEventListenerInitState, setRealized, setSharedAutoDrawable, setSharedContext, swapBuffers, toString, update
      • Methods inherited from class org.eclipse.swt.widgets.Canvas

        drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME
      • Methods inherited from class org.eclipse.swt.widgets.Composite

        changed, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
      • Methods inherited from class org.eclipse.swt.widgets.Scrollable

        computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
      • Methods inherited from class org.eclipse.swt.widgets.Control

        addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse
      • Methods inherited from class org.eclipse.swt.widgets.Widget

        addDisposeListener, addListener, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface

    • Constructor Detail

      • RenderAreaInteractive

        public RenderAreaInteractive​(org.eclipse.swt.widgets.Composite parent,
                                     int style)
      • RenderAreaInteractive

        public RenderAreaInteractive​(org.eclipse.swt.widgets.Composite parent,
                                     int style,
                                     com.jogamp.opengl.GLCapabilities caps)
    • Method Detail

      • init

        public void init​(com.jogamp.opengl.GLAutoDrawable drawable)
        Specified by:
        init in interface com.jogamp.opengl.GLEventListener
        init in class RenderArea
      • setClippingPlanesAdjustMode

        public void setClippingPlanesAdjustMode​(RenderAreaInteractive.ClippingPlanesAdjustMode mode)
        Set the camera clipping planes adjustment mode.
        When adjustment mode is set to AUTO, the camera near and far planes are dynamically adjusted to be as tight as possible (least amount of stuff is clipped) before each render traversal.
        When adjustment mode is set to MANUAL, the user is expected to manually set those planes. Updating clipping planes after a camera move is not enough, if a dragger or a rendered shape is moved, they can disappear or become partially clipped.
        Default is AUTO.
      • getRootSceneGraph

        public SceneInteractor getRootSceneGraph()
      • saveCamera

        public void saveCamera()
      • restoreCamera

        public void restoreCamera()
      • isStereoSupported

        public boolean isStereoSupported()
      • setStereoCameraOffset

        public void setStereoCameraOffset​(float offset)
      • setStereoCameraBalance

        public void setStereoCameraBalance​(float balance)
      • mouseDown

        public void mouseDown​( e)
        Specified by:
        mouseDown in interface
      • mouseScrolled

        public void mouseScrolled​( e)
        Specified by:
        mouseScrolled in interface
      • mouseMove

        public void mouseMove​( e)
        Specified by:
        mouseMove in interface
      • mouseDoubleClick

        public void mouseDoubleClick​( e)
        Specified by:
        mouseDoubleClick in interface
      • mouseUp

        public void mouseUp​( e)
        Specified by:
        mouseUp in interface
      • mouseEnter

        public void mouseEnter​( e)
        Specified by:
        mouseEnter in interface
      • mouseExit

        public void mouseExit​( e)
        Specified by:
        mouseExit in interface
      • mouseHover

        public void mouseHover​( e)
        Specified by:
        mouseHover in interface
      • keyPressed

        public void keyPressed​( e)
        Specified by:
        keyPressed in interface
      • keyReleased

        public void keyReleased​( e)
        Specified by:
        keyReleased in interface