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.OffscreenLayerOption
,com.jogamp.nativewindow.WindowClosingProtocol
,com.jogamp.opengl.GLEventListener
,IRenderArea
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
- Direct Known Subclasses:
RenderAreaInteractive
public class RenderArea extends com.jogamp.newt.awt.NewtCanvasAWT implements com.jogamp.opengl.GLEventListener, IRenderArea
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RenderArea()
RenderArea(boolean enableStereo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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)
SoSceneManager.AntialiasingModes
getAntialiasingMode()
Gets the antialiasing mode.float
getAntialiasingQuality()
Gets the antialiasing quality value.java.awt.Canvas
getComponent()
Gets the parent component of this render area.SoGLRenderAction
getGLRenderAction()
Gets the GLRenderAction used for rendering.int
getStillSuperSamplingDelay()
Gets delay for supersampling when "still" (not interacting).float
getStillSuperSamplingQuality()
Gets quality for supersampling when "still" (not interacting).SoGLRenderAction.TransparencyTypes
getTransparencyType()
Gets the global transparency algorithm to use when rendering.void
init(com.jogamp.opengl.GLAutoDrawable drawable)
boolean
isRawStereoAvailable()
Gets availability of raw stereo.void
reshape(com.jogamp.opengl.GLAutoDrawable drawable, int x, int y, int width, int height)
void
scheduleRedraw()
Schedules a redraw for some time in the near future.void
setAntialiasingMode(SoSceneManager.AntialiasingModes mode)
Sets the antialiasing mode.void
setAntialiasingQuality(float quality)
Sets the antialiasing quality value.void
setGLRenderAction(SoGLRenderAction ra)
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
setTransparencyType(SoGLRenderAction.TransparencyTypes type)
Sets the global transparency algorithm to use when rendering.-
Methods inherited from class com.jogamp.newt.awt.NewtCanvasAWT
addNotify, destroy, getDefaultCloseOperation, getGraphicsConfiguration, 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
-
-
-
-
Method Detail
-
setTransparencyType
public void setTransparencyType(SoGLRenderAction.TransparencyTypes type)
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
public SoGLRenderAction.TransparencyTypes 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
public void setGLRenderAction(SoGLRenderAction ra)
Description copied from interface:IRenderArea
Sets the GLRenderAction used for rendering.- Specified by:
setGLRenderAction
in interfaceIRenderArea
- Parameters:
ra
- the GLRenderAction used for rendering
-
getGLRenderAction
public SoGLRenderAction 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
public SoSceneManager.AntialiasingModes getAntialiasingMode()
Description copied from interface:IRenderArea
Gets the antialiasing mode.- Specified by:
getAntialiasingMode
in interfaceIRenderArea
- Returns:
- the antialiasing algorithm
-
setAntialiasingMode
public void setAntialiasingMode(SoSceneManager.AntialiasingModes mode)
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
public java.awt.Canvas 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
public void setSceneGraph(SoNode sceneGraph)
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
-
-