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 voidactivateStereo(boolean activated)Activates or deactivates raw stereo.voiddisplay(com.jogamp.opengl.GLAutoDrawable drawable)voiddispose()Dispose area resources.voiddispose(com.jogamp.opengl.GLAutoDrawable drawable)SoSceneManager.AntialiasingModesgetAntialiasingMode()Gets the antialiasing mode.floatgetAntialiasingQuality()Gets the antialiasing quality value.java.awt.CanvasgetComponent()Gets the parent component of this render area.SoGLRenderActiongetGLRenderAction()Gets the GLRenderAction used for rendering.intgetStillSuperSamplingDelay()Gets delay for supersampling when "still" (not interacting).floatgetStillSuperSamplingQuality()Gets quality for supersampling when "still" (not interacting).SoGLRenderAction.TransparencyTypesgetTransparencyType()Gets the global transparency algorithm to use when rendering.voidinit(com.jogamp.opengl.GLAutoDrawable drawable)booleanisRawStereoAvailable()Gets availability of raw stereo.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)Sets the GLRenderAction used for rendering.voidsetSceneGraph(SoNode sceneGraph)Sets the scene graph.voidsetStillSuperSamplingDelay(int delay)Sets delay for supersampling when "still" (not interacting).voidsetStillSuperSamplingQuality(float quality)Sets quality for supersampling when "still" (not interacting).voidsetTransparencyType(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:IRenderAreaSets the global transparency algorithm to use when rendering.- Specified by:
setTransparencyTypein interfaceIRenderArea- Parameters:
type- the global transparency algorithm
-
getTransparencyType
public SoGLRenderAction.TransparencyTypes getTransparencyType()
Description copied from interface:IRenderAreaGets the global transparency algorithm to use when rendering.- Specified by:
getTransparencyTypein interfaceIRenderArea- Returns:
- the global transparency algorithm
-
setGLRenderAction
public void setGLRenderAction(SoGLRenderAction ra)
Description copied from interface:IRenderAreaSets the GLRenderAction used for rendering.- Specified by:
setGLRenderActionin interfaceIRenderArea- Parameters:
ra- the GLRenderAction used for rendering
-
getGLRenderAction
public SoGLRenderAction getGLRenderAction()
Description copied from interface:IRenderAreaGets the GLRenderAction used for rendering.- Specified by:
getGLRenderActionin interfaceIRenderArea- Returns:
- the GLRenderAction used for rendering
-
getAntialiasingQuality
public float getAntialiasingQuality()
Description copied from interface:IRenderAreaGets the antialiasing quality value.- Specified by:
getAntialiasingQualityin interfaceIRenderArea- Returns:
- the antialiasing quality, factor in the range [0.0,1.0].
-
setAntialiasingQuality
public void setAntialiasingQuality(float quality)
Description copied from interface:IRenderAreaSets the antialiasing quality value.Default value is 0.0. The value 0.0 turns off antialiasing.
- Specified by:
setAntialiasingQualityin interfaceIRenderArea- Parameters:
quality- The quality is a factor in the range [0.0,1.0].
-
getAntialiasingMode
public SoSceneManager.AntialiasingModes getAntialiasingMode()
Description copied from interface:IRenderAreaGets the antialiasing mode.- Specified by:
getAntialiasingModein interfaceIRenderArea- Returns:
- the antialiasing algorithm
-
setAntialiasingMode
public void setAntialiasingMode(SoSceneManager.AntialiasingModes mode)
Description copied from interface:IRenderAreaSets the antialiasing mode.Default value is NO_ANTIALIASING which turns off antialiasing.
- Specified by:
setAntialiasingModein interfaceIRenderArea- Parameters:
mode- the antialiasing algorithm.
-
getStillSuperSamplingQuality
public float getStillSuperSamplingQuality()
Description copied from interface:IRenderAreaGets quality for supersampling when "still" (not interacting).- Specified by:
getStillSuperSamplingQualityin interfaceIRenderArea- Returns:
- the quality for supersampling, factor in the range [0.0,1.0].
-
setStillSuperSamplingQuality
public void setStillSuperSamplingQuality(float quality)
Description copied from interface:IRenderAreaSets 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:
setStillSuperSamplingQualityin interfaceIRenderArea- Parameters:
quality- The quality is a factor in the range [0.0,1.0].
-
getStillSuperSamplingDelay
public int getStillSuperSamplingDelay()
Description copied from interface:IRenderAreaGets delay for supersampling when "still" (not interacting).- Specified by:
getStillSuperSamplingDelayin interfaceIRenderArea- Returns:
- the delay for supersampling in milliseconds.
-
setStillSuperSamplingDelay
public void setStillSuperSamplingDelay(int delay)
Description copied from interface:IRenderAreaSets 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:
setStillSuperSamplingDelayin interfaceIRenderArea- Parameters:
delay- The delay for supersampling in milliseconds.
-
getComponent
public java.awt.Canvas getComponent()
Description copied from interface:IRenderAreaGets the parent component of this render area.- Specified by:
getComponentin interfaceIRenderArea- Returns:
- the parent component
-
activateStereo
public void activateStereo(boolean activated)
Description copied from interface:IRenderAreaActivates or deactivates raw stereo.- Specified by:
activateStereoin interfaceIRenderArea- Parameters:
activated- true to activate raw stereo
-
isRawStereoAvailable
public boolean isRawStereoAvailable()
Description copied from interface:IRenderAreaGets availability of raw stereo.- Specified by:
isRawStereoAvailablein interfaceIRenderArea- Returns:
- true if the raw stereo is available
-
setSceneGraph
public void setSceneGraph(SoNode sceneGraph)
Description copied from interface:IRenderAreaSets the scene graph. This is the Open Inventor scene which will be traversed for rendering and event processing.- Specified by:
setSceneGraphin interfaceIRenderArea- Parameters:
sceneGraph- the scene graph
-
scheduleRedraw
public void scheduleRedraw()
Description copied from interface:IRenderAreaSchedules a redraw for some time in the near future.- Specified by:
scheduleRedrawin interfaceIRenderArea
-
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
-
dispose
public void dispose()
Description copied from interface:IRenderAreaDispose area resources.- Specified by:
disposein interfaceIRenderArea
-
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
-
-