Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoRenderAreaCore Class Reference

VSG extension (Preview feature) Utility class to render a scene with an OpenGl context. More...

#include <Inventor/ViewerComponents/SoRenderAreaCore.h>

+ Inheritance diagram for SoRenderAreaCore:

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 SoNodegetSceneGraph () 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 SoGLRenderActiongetGLRenderAction () 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
 
SoSceneManagergetSceneManager () const
 Returns the scene manager.
 
virtual void setStereoParameters (SoStereoParameters *parameters)
 Defines the stereo parameters.
 
virtual SoStereoParametersgetStereoParameters () 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...
 

Detailed Description

VSG extension (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.

SEE ALSO

RenderArea

Definition at line 77 of file SoRenderAreaCore.h.

Constructor & Destructor Documentation

◆ SoRenderAreaCore()

SoRenderAreaCore::SoRenderAreaCore ( SoGLContext glContext)

Build a new SoRenderAreaCore that uses an existing glContext.

Member Function Documentation

◆ activateStereo()

virtual void SoRenderAreaCore::activateStereo ( bool  activate)
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).

NOTES

    • Stereo rendering needs a 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.

    Implements SiRenderAreaStereo.

◆ getAntialiasingMode()

virtual SoSceneManager::AntialiasingMode SoRenderAreaCore::getAntialiasingMode ( ) const
virtual

◆ getAntialiasingQuality()

virtual float SoRenderAreaCore::getAntialiasingQuality ( ) const
virtual

◆ getClearColor()

virtual SbColorRGBA SoRenderAreaCore::getClearColor ( ) const
virtual
See also
setClearColor().

Implements SiRenderArea.

◆ getClearDepth()

virtual float SoRenderAreaCore::getClearDepth ( ) const
virtual
See also
setClearDepth().

Implements SiRenderArea.

◆ getClearPolicy()

virtual ClearPolicy SoRenderAreaCore::getClearPolicy ( ) const
virtual
See also
setClearPolicy().

Implements SiRenderArea.

◆ getGLRenderAction()

virtual SoGLRenderAction * SoRenderAreaCore::getGLRenderAction ( ) const
virtual

Returns the render action used for rendering.

◆ getInteractiveMode()

virtual SoDEPRECATED SoInteractiveComplexity::InteractiveMode SoRenderAreaCore::getInteractiveMode ( ) const
virtual

◆ getSceneGraph()

virtual SoNode * SoRenderAreaCore::getSceneGraph ( ) const
virtual
See also
setSceneGraph().

Implements SiRenderArea.

◆ getSceneManager()

SoSceneManager * SoRenderAreaCore::getSceneManager ( ) const

Returns the scene manager.

◆ getSize()

virtual SbVec2i32 SoRenderAreaCore::getSize ( ) const
virtual
See also
setSize().

Implements SiRenderArea.

◆ getStereoParameters()

virtual SoStereoParameters * SoRenderAreaCore::getStereoParameters ( ) const
virtual

◆ getStillSuperSamplingDelay()

virtual unsigned int SoRenderAreaCore::getStillSuperSamplingDelay ( ) const
virtual

◆ getStillSuperSamplingQuality()

virtual float SoRenderAreaCore::getStillSuperSamplingQuality ( ) const
virtual

◆ getTransparencyType()

virtual SoGLRenderAction::TransparencyType SoRenderAreaCore::getTransparencyType ( ) const
virtual

◆ isStereoActivated()

virtual bool SoRenderAreaCore::isStereoActivated ( ) const
virtual
See also
activateStereo().

Implements SiRenderAreaStereo.

◆ onStartRender()

virtual SbEventHandler< RenderEventArg & > & SoRenderAreaCore::onStartRender ( )
virtual

Returns the event handler that raises when a new render starts.

Implements SiRenderArea.

◆ processEvent()

virtual SbBool SoRenderAreaCore::processEvent ( const SoEvent event)
virtual

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.

◆ processEvents()

virtual SbBool SoRenderAreaCore::processEvents ( const std::vector< const SoEvent * > &  eventList)
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.

◆ render()

virtual RenderStatus SoRenderAreaCore::render ( )
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.

◆ setAntialiasingMode()

virtual void SoRenderAreaCore::setAntialiasingMode ( SoSceneManager::AntialiasingMode  mode)
virtual

Define the antialiasing mode.

Parameters
modeThe antialiasing algorithm. Default is NO_ANTIALIASING which turns off antialiasing.

Implements SiRenderAreaAntialiasing.

◆ setAntialiasingQuality()

virtual void SoRenderAreaCore::setAntialiasingQuality ( float  quality)
virtual

Define the antialiasing quality value.

Parameters
qualityThe quality is a factor in the range [0.0,1.0].
Default is 0.0. The value 0.0 turns off antialiasing.

Implements SiRenderAreaAntialiasing.

◆ setClearColor()

virtual void SoRenderAreaCore::setClearColor ( const SbColorRGBA color)
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.

Parameters
colorRGBA value used to clear the color buffer.

Implements SiRenderArea.

◆ setClearDepth()

virtual void SoRenderAreaCore::setClearDepth ( float  depth)
virtual

Defines the depth value used when the depth buffer is cleared.

See also setClearPolicy. Default is 1. Range is 0..1.

Parameters
depthvalue used to clear the depth buffer.

Implements SiRenderArea.

◆ setClearPolicy()

virtual void SoRenderAreaCore::setClearPolicy ( ClearPolicy  policy)
virtual

Defines the color buffer and depth buffer clear policy.

See also setClearColor and setClearDepth. Use enum ClearPolicy Default is COLORBUFFER_AND_DEPTHBUFFER.

Parameters
policycolor buffer and depth buffer clear policy.

Implements SiRenderArea.

◆ setGLRenderAction()

virtual void SoRenderAreaCore::setGLRenderAction ( SoGLRenderAction glAction)
virtual

Defines the render action used for rendering.

◆ setInteractiveMode()

virtual SoDEPRECATED void SoRenderAreaCore::setInteractiveMode ( SoInteractiveComplexity::InteractiveMode  mode)
virtual

Set the current interactive mode.

Parameters
modeinteractive mode. Default is AUTO.

Implements SiRenderAreaInteractive.

◆ setSceneGraph()

virtual void SoRenderAreaCore::setSceneGraph ( SoNode newScene)
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.

◆ setSize()

virtual void SoRenderAreaCore::setSize ( const SbVec2i32 size)
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.

◆ setStereoParameters()

virtual void SoRenderAreaCore::setStereoParameters ( SoStereoParameters parameters)
virtual

Defines the stereo parameters.

Parameters
parametersProvides specific parameters for a stereo mode. Use one of the subclasses of SoStereoParameters.

NOTES

    • SoRenderAreaCore makes a copy of the parameter values. The caller is responsible for allocation and destruction of the params object. As a copy of the parameter values is done, the object can be destroyed after calling this method.

    Implements SiRenderAreaStereo.

◆ setStillSuperSamplingDelay()

virtual void SoRenderAreaCore::setStillSuperSamplingDelay ( unsigned int  delay)
virtual

Set delay for supersampling when "still" (not interacting).

If greater than 0, images will be supersampled after the specified delay.

Parameters
delayThe delay is in milliseconds.
If greater than 0, images will be supersampled after the specified delay See also setStillSuperSamplingQuality.

Implements SiRenderAreaStillSuperSampling.

◆ setStillSuperSamplingQuality()

virtual void SoRenderAreaCore::setStillSuperSamplingQuality ( float  quality)
virtual

Set quality for supersampling when "still" (not interacting).

When quality is greater than 0, still images will be automatically supersampled.

Parameters
qualityThe 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.

◆ setTransparencyType()

virtual void SoRenderAreaCore::setTransparencyType ( SoGLRenderAction::TransparencyType  type)
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.


The documentation for this class was generated from the following file: