(Preview feature) Utility class to render a scene with an OpenGl context. More...
#include <Inventor/ViewerComponents/SoRenderAreaCore.h>
Public Member Functions | |
SoRenderAreaCore (SoGLContext *glContext) | |
Build a new SoRenderAreaCore that uses an existing glContext. | |
virtual void | setSceneGraph (SoNode *newScene) |
Defines the scene graph which is managed here. | |
virtual SoNode * | getSceneGraph () const |
virtual SbBool | processEvent (const SoEvent *event) |
Processes the passed event by applying an SoHandleEventAction to the scene graph managed here. | |
virtual SbBool | processEvents (const std::vector< const SoEvent * > &eventList) |
Processes the passed event by applying an SoHandleEventAction to the scene graph managed here. | |
virtual RenderStatus | render () |
Applies an SoGLRenderAction to the scene graph managed here. | |
virtual void | setSize (const SbVec2i32 &size) |
Defines the size to use for rendering. | |
virtual SbVec2i32 | getSize () const |
virtual void | setGLRenderAction (SoGLRenderAction *glAction) |
Defines the render action used for rendering. | |
virtual SoGLRenderAction * | getGLRenderAction () const |
Returns the render action used for rendering. | |
virtual void | setTransparencyType (SoGLRenderAction::TransparencyType type) |
Defines the algorithm for rendering transparent objects. | |
virtual SoGLRenderAction::TransparencyType | getTransparencyType () const |
SoSceneManager * | getSceneManager () const |
Returns the scene manager. | |
virtual void | setStereoParameters (SoStereoParameters *parameters) |
Defines the stereo parameters. | |
virtual SoStereoParameters * | getStereoParameters () const |
virtual void | activateStereo (bool activate) |
Activate (or deactivate) stereo rendering with specified parameters (see setStereoParameters). | |
virtual bool | isStereoActivated () const |
virtual void | setAntialiasingMode (SoSceneManager::AntialiasingMode mode) |
Define the antialiasing mode. | |
virtual SoSceneManager::AntialiasingMode | getAntialiasingMode () const |
virtual void | setAntialiasingQuality (float quality) |
Define the antialiasing quality value. | |
virtual float | getAntialiasingQuality () const |
virtual void | setClearPolicy (ClearPolicy policy) |
Defines the color buffer and depth buffer clear policy. | |
virtual ClearPolicy | getClearPolicy () const |
virtual void | setClearColor (const SbColorRGBA &color) |
Defines the RGBA value used when the color buffer is cleared. | |
virtual SbColorRGBA | getClearColor () const |
virtual void | setClearDepth (float depth) |
Defines the depth value used when the depth buffer is cleared. | |
virtual float | getClearDepth () const |
virtual SbEventHandler< RenderEventArg & > & | onStartRender () |
Returns the event handler that raises when a new render starts. | |
virtual void | setStillSuperSamplingQuality (float quality) |
Set quality for supersampling when "still" (not interacting). | |
virtual float | getStillSuperSamplingQuality () const |
virtual void | setStillSuperSamplingDelay (unsigned int delay) |
Set delay for supersampling when "still" (not interacting). | |
virtual unsigned int | getStillSuperSamplingDelay () const |
Deprecated | |
virtual SoDEPRECATED void | setInteractiveMode (SoInteractiveComplexity::InteractiveMode mode) |
Set the current interactive mode. | |
virtual SoDEPRECATED SoInteractiveComplexity::InteractiveMode | getInteractiveMode () const |
Public Member Functions inherited from SoRefCounter | |
void | ref () const |
Adds a reference to an instance. | |
void | unref () const |
Removes a reference from an instance. | |
void | unrefNoDelete () const |
unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero. | |
int | getRefCount () const |
Returns current reference count. | |
void | lock () const |
lock this instance. | |
void | unlock () const |
unlock this instance. | |
Deprecated | |
Additional Inherited Members | |
Public Types inherited from SiRenderArea | |
enum | ClearPolicy { NONE , COLORBUFFER , DEPTHBUFFER , COLORBUFFER_AND_DEPTHBUFFER } |
Policy values to clear color and depth buffers beforing rendering. More... | |
enum | RenderStatus { ABORTED , INTERACTIVE , STILL } |
Returned by the render method. More... | |
(Preview feature) Utility class to render a scene with an OpenGl context.
[C++] Reference counting:
This is a reference counted object, similar to a node or path. It can only be destroyed by incrementing and decrementing the reference count. The initial reference count is 0. You may use the ref() and unref() methods, but we recommend using the SoRef "smart pointer" template.
Definition at line 77 of file SoRenderAreaCore.h.
SoRenderAreaCore::SoRenderAreaCore | ( | SoGLContext * | glContext | ) |
Build a new SoRenderAreaCore that uses an existing glContext.
|
virtual |
Activate (or deactivate) stereo rendering with specified parameters (see setStereoParameters).
The stereo mode is determined by which subclass is used to set the parameters. For example, passing an SoRawStereoParameters object activates OpenGL "quad buffered" stereo (if possible on the current graphics board).
Implements SiRenderAreaStereo.
|
virtual |
Implements SiRenderAreaAntialiasing.
|
virtual |
Implements SiRenderAreaAntialiasing.
|
virtual |
Implements SiRenderArea.
|
virtual |
Implements SiRenderArea.
|
virtual |
Implements SiRenderArea.
|
virtual |
Returns the render action used for rendering.
|
virtual |
Implements SiRenderAreaInteractive.
|
virtual |
Implements SiRenderArea.
SoSceneManager * SoRenderAreaCore::getSceneManager | ( | ) | const |
Returns the scene manager.
|
virtual |
Implements SiRenderArea.
|
virtual |
Implements SiRenderAreaStereo.
|
virtual |
Implements SiRenderAreaStillSuperSampling.
|
virtual |
Implements SiRenderAreaStillSuperSampling.
|
virtual |
Implements SiRenderAreaTransparency.
|
virtual |
Implements SiRenderAreaStereo.
|
virtual |
Returns the event handler that raises when a new render starts.
Implements SiRenderArea.
Processes the passed event by applying an SoHandleEventAction to the scene graph managed here.
Returns TRUE if the event was handled by a node.
Implements SiRenderAreaInteractive.
|
virtual |
Processes the passed event by applying an SoHandleEventAction to the scene graph managed here.
Returns TRUE if at least one event was handled by a node.
Implements SiRenderAreaInteractive.
|
virtual |
Applies an 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 example
Implements SiRenderArea.
|
virtual |
Define the antialiasing mode.
mode | The antialiasing algorithm. Default is NO_ANTIALIASING which turns off antialiasing. |
Implements SiRenderAreaAntialiasing.
|
virtual |
Define the antialiasing quality value.
quality | The quality is a factor in the range [0.0,1.0]. Default is 0.0. The value 0.0 turns off antialiasing. |
Implements SiRenderAreaAntialiasing.
|
virtual |
Defines the RGBA value used when the color buffer is cleared.
See also setClearPolicy. Default is transparent black (0,0,0,0).
This is equivalent to setBackgroundColor() in the classical view classes.
color | RGBA value used to clear the color buffer. |
Implements SiRenderArea.
|
virtual |
Defines the depth value used when the depth buffer is cleared.
See also setClearPolicy. Default is 1. Range is 0..1.
depth | value used to clear the depth buffer. |
Implements SiRenderArea.
|
virtual |
Defines the color buffer and depth buffer clear policy.
See also setClearColor and setClearDepth. Use enum ClearPolicy Default is COLORBUFFER_AND_DEPTHBUFFER.
policy | color buffer and depth buffer clear policy. |
Implements SiRenderArea.
|
virtual |
Defines the render action used for rendering.
|
virtual |
Set the current interactive mode.
mode | interactive mode. Default is AUTO. |
Implements SiRenderAreaInteractive.
|
virtual |
Defines the scene graph which is managed here.
This is the Open Inventor scene which will be traversed for rendering and event processing.
Implements SiRenderArea.
|
virtual |
Defines the size to use for rendering.
Typically this method must be called when the render area has been resized or moved.
Implements SiRenderArea.
|
virtual |
Defines the stereo parameters.
parameters | Provides specific parameters for a stereo mode. Use one of the subclasses of SoStereoParameters. |
Implements SiRenderAreaStereo.
|
virtual |
Set delay for supersampling when "still" (not interacting).
If greater than 0, images will be supersampled after the specified delay.
delay | The delay is in milliseconds. If greater than 0, images will be supersampled after the specified delay See also setStillSuperSamplingQuality. |
Implements SiRenderAreaStillSuperSampling.
|
virtual |
Set quality for supersampling when "still" (not interacting).
When quality is greater than 0, still images will be automatically supersampled.
quality | The quality is a factor in the range [0.0,1.0]. Default value is 0.0. Use the value 0.0 to turn off still supersampling. 0.5 is a typical value. See also setStillSuperSamplingDelay. |
Implements SiRenderAreaStillSuperSampling.
|
virtual |
Defines the algorithm for rendering transparent objects.
Default is NO_SORT. See 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.
Implements SiRenderAreaTransparency.