Class RenderArea
java.lang.Object
java.awt.Component
java.awt.Canvas
com.jogamp.newt.awt.NewtCanvasAWT
com.openinventor.inventor.viewercomponents.awt.newt.renderareas.RenderArea
- All Implemented Interfaces:
com.jogamp.nativewindow.awt.AWTPrintLifecycle
,com.jogamp.nativewindow.NativeSurfaceHolder
,com.jogamp.nativewindow.NativeWindowHolder
,com.jogamp.nativewindow.OffscreenLayerOption
,com.jogamp.nativewindow.WindowClosingProtocol
,com.jogamp.opengl.GLEventListener
,IRenderArea
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
- Direct Known Subclasses:
RenderAreaInteractive
public class RenderArea
extends com.jogamp.newt.awt.NewtCanvasAWT
implements com.jogamp.opengl.GLEventListener, IRenderArea
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
Nested classes/interfaces inherited from interface com.jogamp.nativewindow.awt.AWTPrintLifecycle
com.jogamp.nativewindow.awt.AWTPrintLifecycle.Context
Nested classes/interfaces inherited from interface com.jogamp.nativewindow.WindowClosingProtocol
com.jogamp.nativewindow.WindowClosingProtocol.WindowClosingMode
-
Field Summary
Fields inherited from class com.jogamp.newt.awt.NewtCanvasAWT
DEBUG
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface com.jogamp.nativewindow.awt.AWTPrintLifecycle
DEFAULT_PRINT_TILE_SIZE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
activateStereo
(boolean activated) Activates or deactivates raw stereo.void
display
(com.jogamp.opengl.GLAutoDrawable drawable) void
dispose()
Dispose area resources.void
dispose
(com.jogamp.opengl.GLAutoDrawable drawable) Gets the antialiasing mode.float
Gets the antialiasing quality value.Gets the parent component of this render area.Gets the GLRenderAction used for rendering.int
Gets delay for supersampling when "still" (not interacting).float
Gets quality for supersampling when "still" (not interacting).Gets the global transparency algorithm to use when rendering.void
init
(com.jogamp.opengl.GLAutoDrawable drawable) boolean
Gets availability of raw stereo.void
reshape
(com.jogamp.opengl.GLAutoDrawable drawable, int x, int y, int width, int height) void
Schedules a redraw for some time in the near future.void
Sets the antialiasing mode.void
setAntialiasingQuality
(float quality) Sets the antialiasing quality value.void
Sets the GLRenderAction used for rendering.void
setSceneGraph
(SoNode sceneGraph) Sets the scene graph.void
setStillSuperSamplingDelay
(int delay) Sets delay for supersampling when "still" (not interacting).void
setStillSuperSamplingQuality
(float quality) Sets quality for supersampling when "still" (not interacting).void
Sets the global transparency algorithm to use when rendering.Methods inherited from class com.jogamp.newt.awt.NewtCanvasAWT
addNotify, destroy, getDefaultCloseOperation, getGraphicsConfiguration, getNativeSurface, getNativeWindow, getNEWTChild, getShallUseOffscreenLayer, getSkipJAWTDestroy, isApplet, isAWTEventPassThrough, isOffscreenLayerSurfaceEnabled, paint, print, releasePrint, removeNotify, reshape, setDefaultCloseOperation, setNEWTChild, setShallUseOffscreenLayer, setSkipJAWTDestroy, setupPrint, update
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
-
Constructor Details
-
RenderArea
public RenderArea() -
RenderArea
public RenderArea(boolean enableStereo)
-
-
Method Details
-
setTransparencyType
Description copied from interface:IRenderArea
Sets the global transparency algorithm to use when rendering.- Specified by:
setTransparencyType
in interfaceIRenderArea
- Parameters:
type
- the global transparency algorithm
-
getTransparencyType
Description copied from interface:IRenderArea
Gets the global transparency algorithm to use when rendering.- Specified by:
getTransparencyType
in interfaceIRenderArea
- Returns:
- the global transparency algorithm
-
setGLRenderAction
Description copied from interface:IRenderArea
Sets the GLRenderAction used for rendering.- Specified by:
setGLRenderAction
in interfaceIRenderArea
- Parameters:
ra
- the GLRenderAction used for rendering
-
getGLRenderAction
Description copied from interface:IRenderArea
Gets the GLRenderAction used for rendering.- Specified by:
getGLRenderAction
in interfaceIRenderArea
- Returns:
- the GLRenderAction used for rendering
-
getAntialiasingQuality
public float getAntialiasingQuality()Description copied from interface:IRenderArea
Gets the antialiasing quality value.- Specified by:
getAntialiasingQuality
in interfaceIRenderArea
- Returns:
- the antialiasing quality, factor in the range [0.0,1.0].
-
setAntialiasingQuality
public void setAntialiasingQuality(float quality) Description copied from interface:IRenderArea
Sets the antialiasing quality value.Default value is 0.0. The value 0.0 turns off antialiasing.
- Specified by:
setAntialiasingQuality
in interfaceIRenderArea
- Parameters:
quality
- The quality is a factor in the range [0.0,1.0].
-
getAntialiasingMode
Description copied from interface:IRenderArea
Gets the antialiasing mode.- Specified by:
getAntialiasingMode
in interfaceIRenderArea
- Returns:
- the antialiasing algorithm
-
setAntialiasingMode
Description copied from interface:IRenderArea
Sets the antialiasing mode.Default value is NO_ANTIALIASING which turns off antialiasing.
- Specified by:
setAntialiasingMode
in interfaceIRenderArea
- Parameters:
mode
- the antialiasing algorithm.
-
getStillSuperSamplingQuality
public float getStillSuperSamplingQuality()Description copied from interface:IRenderArea
Gets quality for supersampling when "still" (not interacting).- Specified by:
getStillSuperSamplingQuality
in interfaceIRenderArea
- Returns:
- the quality for supersampling, factor in the range [0.0,1.0].
-
setStillSuperSamplingQuality
public void setStillSuperSamplingQuality(float quality) Description copied from interface:IRenderArea
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.
- Specified by:
setStillSuperSamplingQuality
in interfaceIRenderArea
- Parameters:
quality
- The quality is a factor in the range [0.0,1.0].
-
getStillSuperSamplingDelay
public int getStillSuperSamplingDelay()Description copied from interface:IRenderArea
Gets delay for supersampling when "still" (not interacting).- Specified by:
getStillSuperSamplingDelay
in interfaceIRenderArea
- Returns:
- the delay for supersampling in milliseconds.
-
setStillSuperSamplingDelay
public void setStillSuperSamplingDelay(int delay) Description copied from interface:IRenderArea
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.
- Specified by:
setStillSuperSamplingDelay
in interfaceIRenderArea
- Parameters:
delay
- The delay for supersampling in milliseconds.
-
getComponent
Description copied from interface:IRenderArea
Gets the parent component of this render area.- Specified by:
getComponent
in interfaceIRenderArea
- Returns:
- the parent component
-
activateStereo
public void activateStereo(boolean activated) Description copied from interface:IRenderArea
Activates or deactivates raw stereo.- Specified by:
activateStereo
in interfaceIRenderArea
- Parameters:
activated
- true to activate raw stereo
-
isRawStereoAvailable
public boolean isRawStereoAvailable()Description copied from interface:IRenderArea
Gets availability of raw stereo.- Specified by:
isRawStereoAvailable
in interfaceIRenderArea
- Returns:
- true if the raw stereo is available
-
setSceneGraph
Description copied from interface:IRenderArea
Sets the scene graph. This is the Open Inventor scene which will be traversed for rendering and event processing.- Specified by:
setSceneGraph
in interfaceIRenderArea
- Parameters:
sceneGraph
- the scene graph
-
scheduleRedraw
public void scheduleRedraw()Description copied from interface:IRenderArea
Schedules a redraw for some time in the near future.- Specified by:
scheduleRedraw
in interfaceIRenderArea
-
init
public void init(com.jogamp.opengl.GLAutoDrawable drawable) - Specified by:
init
in interfacecom.jogamp.opengl.GLEventListener
-
dispose
public void dispose(com.jogamp.opengl.GLAutoDrawable drawable) - Specified by:
dispose
in interfacecom.jogamp.opengl.GLEventListener
-
dispose
public void dispose()Description copied from interface:IRenderArea
Dispose area resources.- Specified by:
dispose
in interfaceIRenderArea
-
display
public void display(com.jogamp.opengl.GLAutoDrawable drawable) - Specified by:
display
in interfacecom.jogamp.opengl.GLEventListener
-
reshape
public void reshape(com.jogamp.opengl.GLAutoDrawable drawable, int x, int y, int width, int height) - Specified by:
reshape
in interfacecom.jogamp.opengl.GLEventListener
-