Class RenderArea
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- org.eclipse.swt.widgets.Canvas
-
- com.jogamp.opengl.swt.GLCanvas
-
- com.openinventor.inventor.viewercomponents.swt.glcanvas.renderareas.RenderArea
-
- 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.graphics.Drawable
- Direct Known Subclasses:
RenderAreaInteractive
public class RenderArea extends com.jogamp.opengl.swt.GLCanvas implements com.jogamp.opengl.GLEventListener
-
-
Constructor Summary
Constructors Constructor Description RenderArea(org.eclipse.swt.widgets.Composite parent, int style)RenderArea(org.eclipse.swt.widgets.Composite parent, int style, com.jogamp.opengl.GLCapabilities caps)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivateStereo(boolean activated)voiddisplay(com.jogamp.opengl.GLAutoDrawable drawable)voiddispose(com.jogamp.opengl.GLAutoDrawable drawable)SoSceneManager.AntialiasingModesgetAntialiasingMode()Gets the antialiasing mode.floatgetAntialiasingQuality()Gets the antialiasing quality value.SoGLRenderActiongetGLRenderAction()Gets the render action used for rendering.intgetStillSuperSamplingDelay()Gets delay for supersampling when "still" (not interacting).floatgetStillSuperSamplingQuality()Gets quality for supersampling when "still" (not interacting).voidinit(com.jogamp.opengl.GLAutoDrawable drawable)booleanisRawStereoAvailable()voidreshape(com.jogamp.opengl.GLAutoDrawable drawable, int x, int y, int width, int height)voidscheduleRedraw()Schedules a redraw for some time in the near future.voidsetAntialiasingMode(SoSceneManager.AntialiasingModes mode)Sets the antialiasing mode.voidsetAntialiasingQuality(float quality)Sets the antialiasing quality value.voidsetGLRenderAction(SoGLRenderAction ra)Defines the render action used for rendering.voidsetSceneGraph(SoNode sceneGraph)voidsetStillSuperSamplingDelay(int delay)Sets delay for supersampling when "still" (not interacting).voidsetStillSuperSamplingQuality(float quality)Sets quality for supersampling when "still" (not interacting).-
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
-
-
-
-
Method Detail
-
setGLRenderAction
public void setGLRenderAction(SoGLRenderAction ra)
Defines the render action used for rendering.
-
getGLRenderAction
public SoGLRenderAction getGLRenderAction()
Gets the render action used for rendering.
-
getAntialiasingQuality
public float getAntialiasingQuality()
Gets the antialiasing quality value.- Returns:
- the antialiasing quality, factor in the range [0.0,1.0].
-
setAntialiasingQuality
public void setAntialiasingQuality(float quality)
Sets the antialiasing quality value.Default value is 0.0. The value 0.0 turns off antialiasing.
- Parameters:
quality- The quality is a factor in the range [0.0,1.0].
-
getAntialiasingMode
public SoSceneManager.AntialiasingModes getAntialiasingMode()
Gets the antialiasing mode.- Returns:
- the antialiasing algorithm
-
setAntialiasingMode
public void setAntialiasingMode(SoSceneManager.AntialiasingModes mode)
Sets the antialiasing mode.Default value is NO_ANTIALIASING which turns off antialiasing.
- Parameters:
mode- the antialiasing algorithm.
-
getStillSuperSamplingQuality
public float getStillSuperSamplingQuality()
Gets quality for supersampling when "still" (not interacting).- Returns:
- the quality for supersampling, factor in the range [0.0,1.0].
-
setStillSuperSamplingQuality
public void setStillSuperSamplingQuality(float quality)
Sets quality for supersampling when "still" (not interacting).When quality is greater than 0, still images will be automatically supersampled. Default value is 0.0. Use the value 0.0 to turn off still supersampling. 0.5 is a typical value.
- Parameters:
quality- The quality is a factor in the range [0.0,1.0].
-
getStillSuperSamplingDelay
public int getStillSuperSamplingDelay()
Gets delay for supersampling when "still" (not interacting).- Returns:
- the delay for supersampling in milliseconds.
-
setStillSuperSamplingDelay
public void setStillSuperSamplingDelay(int delay)
Sets delay for supersampling when "still" (not interacting).If greater than 0, images will be supersampled after the specified delay. Default value is 0. The delay is in milliseconds.
- Parameters:
delay- The delay for supersampling in milliseconds.
-
activateStereo
public void activateStereo(boolean activated)
-
isRawStereoAvailable
public boolean isRawStereoAvailable()
-
setSceneGraph
public void setSceneGraph(SoNode sceneGraph)
-
scheduleRedraw
public void scheduleRedraw()
Schedules a redraw for some time in the near future.
-
init
public void init(com.jogamp.opengl.GLAutoDrawable drawable)
- Specified by:
initin interfacecom.jogamp.opengl.GLEventListener
-
dispose
public void dispose(com.jogamp.opengl.GLAutoDrawable drawable)
- Specified by:
disposein interfacecom.jogamp.opengl.GLEventListener
-
display
public void display(com.jogamp.opengl.GLAutoDrawable drawable)
- Specified by:
displayin interfacecom.jogamp.opengl.GLEventListener
-
reshape
public void reshape(com.jogamp.opengl.GLAutoDrawable drawable, int x, int y, int width, int height)- Specified by:
reshapein interfacecom.jogamp.opengl.GLEventListener
-
-