public class SoRenderAreaCore extends Inventor implements SiRenderAreaAntialiasing, SiRenderAreaTransparency, SiRenderAreaStereo, SiRenderAreaInteractive, SiRenderArea, SiRenderAreaStillSuperSampling, SafeDisposable
Preview Feature means this class is fully supported and can be used in Open Inventor applications. Being tagged as a Preview Feature just means that the implementation is still subject to API changes and adjustments based on feedback from early adopters. Please be also aware that source compatibility might be broken regardless of the Open Inventor compatibility changes policy due to our commitment to bring needed changes to be sure the specifications of this Preview Feature match the expectations of our customers.
See also:RenderArea
Inventor.ConstructorCommand
SiRenderArea.ClearPolicies, SiRenderArea.RenderEventArg, SiRenderArea.RenderStatus
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoRenderAreaCore(SoGLContext glContext)
Build a new
SoRenderAreaCore that uses an existing glContext. |
Modifier and Type | Method and Description |
---|---|
void |
activateStereo(boolean activate)
Activate (or deactivate) stereo rendering with specified parameters (see setStereoParameters).
|
boolean |
dispose()
Explicitly call this method to force object to dispose its unmanaged
resources.
|
SoSceneManager.AntialiasingModes |
getAntialiasingMode() |
float |
getAntialiasingQuality() |
SbColorRGBA |
getClearColor() |
float |
getClearDepth() |
SiRenderArea.ClearPolicies |
getClearPolicy() |
SoInteractiveComplexity.InteractiveModes |
getInteractiveMode() |
SoNode |
getSceneGraph() |
SoSceneManager |
getSceneManager()
Returns the scene manager.
|
SbVec2i32 |
getSize() |
SoStereoParameters |
getStereoParameters() |
int |
getStillSuperSamplingDelay() |
float |
getStillSuperSamplingQuality() |
SoGLRenderAction.TransparencyTypes |
getTransparencyType() |
SbViewportRegion |
getViewportRegion()
|
boolean |
isDisposable()
Returns a boolean flag which indicates if it is safe to call
SafeDisposable.dispose() on the object. |
boolean |
isStereoActivated() |
SbEventHandler<SiRenderArea.RenderEventArg> |
onStartRender()
Returns the event handler that raises when a new render starts.
|
boolean |
processEvent(SoEvent event)
Processes the passed event by applying an
SoHandleEventAction to the scene graph managed here. |
boolean |
processEvents(java.util.Collection<SoEvent> eventList)
Processes the passed event by applying an
SoHandleEventAction to the scene graph managed here. |
SiRenderArea.RenderStatus |
render()
Applies an
SoGLRenderAction to the scene graph managed here. |
void |
setAntialiasingMode(SoSceneManager.AntialiasingModes mode)
Define the antialiasing mode.
|
void |
setAntialiasingQuality(float quality)
Define the antialiasing quality value.
|
void |
setClearColor(SbColorRGBA color)
Defines the RGBA value used when the color buffer is cleared.
|
void |
setClearDepth(float depth)
Defines the depth value used when the depth buffer is cleared.
|
void |
setClearPolicy(SiRenderArea.ClearPolicies policy)
Defines the color buffer and depth buffer clear policy.
|
void |
setInteractiveMode(SoInteractiveComplexity.InteractiveModes mode)
Set the current interactive mode.
|
void |
setSceneGraph(SoNode newScene)
Defines the scene graph which is managed here.
|
void |
setSize(SbVec2i32 size)
Defines the size to use for rendering.
|
void |
setStereoParameters(SoStereoParameters parameters)
Defines the stereo parameters.
|
void |
setStillSuperSamplingDelay(int delay)
Set delay for supersampling when "still" (not interacting).
|
void |
setStillSuperSamplingQuality(float quality)
Set quality for supersampling when "still" (not interacting).
|
void |
setTransparencyType(SoGLRenderAction.TransparencyTypes type)
Defines the algorithm for rendering transparent objects.
|
getNativeResourceHandle
public SoRenderAreaCore(SoGLContext glContext)
SoRenderAreaCore
that uses an existing glContext.public SbEventHandler<SiRenderArea.RenderEventArg> onStartRender()
onStartRender
in interface SiRenderArea
public boolean isDisposable()
SafeDisposable
SafeDisposable.dispose()
on the object.isDisposable
in interface SafeDisposable
true
if the object can be disposed in a safe mannerpublic boolean dispose()
Inventor
dispose
in interface SafeDisposable
dispose
in class Inventor
true
if this object native resources were successfully
disposed; false
if it was already disposed or no
native resources has been registered for this object.public float getStillSuperSamplingQuality()
getStillSuperSamplingQuality
in interface SiRenderAreaStillSuperSampling
setStillSuperSamplingQuality()
public void setStillSuperSamplingDelay(int delay)
setStillSuperSamplingDelay
in interface SiRenderAreaStillSuperSampling
delay
- The delay is in seconds. public void setSize(SbVec2i32 size)
setSize
in interface SiRenderArea
public SbVec2i32 getSize()
getSize
in interface SiRenderArea
setSize()
public void setTransparencyType(SoGLRenderAction.TransparencyTypes type)
SoGLRenderAction
for possible transparency types. See also SoGLRenderAction.TransparencyType
.
Note: When using transparency types with DELAYED in the name, the depth buffer is not updated (depth buffer writes are disabled) while rendering transparent objects. As a result complex 3D shapes may not be rendered correctly.
setTransparencyType
in interface SiRenderAreaTransparency
public SoGLRenderAction.TransparencyTypes getTransparencyType()
getTransparencyType
in interface SiRenderAreaTransparency
setTransparencyType()
public void setStillSuperSamplingQuality(float quality)
setStillSuperSamplingQuality
in interface SiRenderAreaStillSuperSampling
quality
- The quality is a factor in the range [0.0,1.0]. public SbViewportRegion getViewportRegion()
setViewportRegion().
public void setSceneGraph(SoNode newScene)
setSceneGraph
in interface SiRenderArea
public SoNode getSceneGraph()
getSceneGraph
in interface SiRenderArea
setSceneGraph()
public void activateStereo(boolean activate)
SoRawStereoParameters
object activates OpenGL "quad buffered" stereo (if possible on the current graphics board).
SoStereoCamera
to be activated. The edited camera is the first stereo camera found in the current scene graph. If no stereo camera is found, a warning is displayed. This method must be called to update the edited camera if the scene graph changed.
activateStereo
in interface SiRenderAreaStereo
public int getStillSuperSamplingDelay()
getStillSuperSamplingDelay
in interface SiRenderAreaStillSuperSampling
setStillSuperSamplingDelay()
public SiRenderArea.RenderStatus render()
SoGLRenderAction
to the scene graph managed here.
See RenderStatus documentation for details on the returned value. The rendering may have been aborted, so check this function result before calling swap buffer for examplerender
in interface SiRenderArea
public boolean processEvent(SoEvent event)
SoHandleEventAction
to the scene graph managed here.
Returns true if the event was handled by a node.processEvent
in interface SiRenderAreaInteractive
public boolean processEvents(java.util.Collection<SoEvent> eventList)
SoHandleEventAction
to the scene graph managed here.
Returns true if at least one event was handled by a node.processEvents
in interface SiRenderAreaInteractive
public void setClearPolicy(SiRenderArea.ClearPolicies policy)
setClearPolicy
in interface SiRenderArea
policy
- color buffer and depth buffer clear policy.public boolean isStereoActivated()
isStereoActivated
in interface SiRenderAreaStereo
activateStereo()
public SoStereoParameters getStereoParameters()
getStereoParameters
in interface SiRenderAreaStereo
setStereoParameters()
public SiRenderArea.ClearPolicies getClearPolicy()
getClearPolicy
in interface SiRenderArea
setClearPolicy()
public void setAntialiasingQuality(float quality)
setAntialiasingQuality
in interface SiRenderAreaAntialiasing
quality
- The quality is a factor in the range [0.0,1.0]. public SoSceneManager.AntialiasingModes getAntialiasingMode()
getAntialiasingMode
in interface SiRenderAreaAntialiasing
setAntialiasingMode()
public float getAntialiasingQuality()
getAntialiasingQuality
in interface SiRenderAreaAntialiasing
setAntialiasingQuality()
public void setAntialiasingMode(SoSceneManager.AntialiasingModes mode)
setAntialiasingMode
in interface SiRenderAreaAntialiasing
mode
- The antialiasing algorithm. Default is NO_ANTIALIASING which turns off antialiasing.public void setInteractiveMode(SoInteractiveComplexity.InteractiveModes mode)
setInteractiveMode
in interface SiRenderAreaInteractive
mode
- interactive mode. Default is AUTO.public void setClearDepth(float depth)
setClearDepth
in interface SiRenderArea
depth
- value used to clear the depth buffer.public SoSceneManager getSceneManager()
public float getClearDepth()
getClearDepth
in interface SiRenderArea
setClearDepth()
public void setStereoParameters(SoStereoParameters parameters)
setStereoParameters
in interface SiRenderAreaStereo
parameters
- Provides specific parameters for a stereo mode. Use one of the subclasses of SoStereoParameters
.
SoRenderAreaCore
makes a copy of the parameter values.
public void setClearColor(SbColorRGBA color)
This is equivalent to setBackgroundColor() in the classical view classes.
setClearColor
in interface SiRenderArea
color
- RGBA value used to clear the color buffer.public SoInteractiveComplexity.InteractiveModes getInteractiveMode()
getInteractiveMode
in interface SiRenderAreaInteractive
setInteractiveMode()
public SbColorRGBA getClearColor()
getClearColor
in interface SiRenderArea
setClearColor()
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com