Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
RenderArea Class Reference

Class to render an OpenInventor scene in a Qt OpenGL window. More...

#include <Inventor/ViewerComponents/Qt/RenderArea.h>

+ Inheritance diagram for RenderArea:

Public Member Functions

 RenderArea (QWidget *parent)
 This constructor initializes the QOpenGLWidget using the default QSurfaceFormat.
 
virtual ~RenderArea ()
 Destructor.
 
virtual void setSceneGraph (SoNode *sceneGraph)
 Sets the scene graph to render.
 
virtual SoNodegetSceneGraph () const
 Gets the scene graph to render.
 
virtual void setClearPolicy (ClearPolicy policy)
 Defines the color buffer and depth buffer clear policy.
 
virtual ClearPolicy getClearPolicy () const
 Gets the color buffer and depth buffer clear policy.
 
virtual void setClearColor (const SbColorRGBA &color)
 Defines the RGBA value used when the color buffer is cleared.
 
virtual SbColorRGBA getClearColor () const
 Gets the RGBA value used when the color buffer is cleared.
 
virtual void setClearDepth (float depth)
 Defines the depth value used when the depth buffer is cleared.
 
virtual float getClearDepth () const
 Gets the depth value used when the depth buffer is cleared.
 
virtual void setSize (const SbVec2i32 &size)
 Defines the size used for rendering.
 
virtual SbVec2i32 getSize () const
 Gets the size used for rendering.
 
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)
 Sets the global transparency algorithm to use when rendering.
 
virtual SoGLRenderAction::TransparencyType getTransparencyType () const
 Gets the global transparency algorithm to use when rendering.
 
virtual void setAntialiasingMode (SoSceneManager::AntialiasingMode mode) override
 Define the antialiasing mode.
 
virtual SoSceneManager::AntialiasingMode getAntialiasingMode () const override
 
virtual void setAntialiasingQuality (float quality) override
 Define the antialiasing quality value.
 
virtual float getAntialiasingQuality () const override
 
virtual void setStillSuperSamplingQuality (float quality) override
 Set quality for supersampling when "still" (not interacting).
 
virtual float getStillSuperSamplingQuality () const override
 
virtual void setStillSuperSamplingDelay (unsigned int delay) override
 Set delay for supersampling when "still" (not interacting).
 
virtual unsigned int getStillSuperSamplingDelay () const override
 
virtual SbEventHandler< RenderEventArg & > & onStartRender ()
 Returns the event handler that raises when a new render starts.
 
virtual void activateStereo (bool activated)
 Activate/Deactivate stereo.
 
virtual bool isStereoActivated () const
 Returns true if stereo rendering is currently activated.
 
virtual void setStereoParameters (SoStereoParameters *parameters)
 Defines the stereo parameters.
 
virtual SoStereoParametersgetStereoParameters () const
 
bool isRawStereoAvailable ()
 Returns true if stereo buffering is enabled.
 
QWidget * getContainerWidget ()
 

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

Class to render an OpenInventor scene in a Qt OpenGL window.

RenderArea creates a 3D rendering window as a child of another widget. Use the setSceneGraph() method to specify the scene graph to be rendered.

A SceneExaminer node is typically used to allow the user to manipulate the scene camera.

SEE ALSO

RenderAreaInteractive, RenderAreaExaminer, SceneInteractor, SceneExaminer

Definition at line 45 of file RenderArea.h.

Constructor & Destructor Documentation

◆ RenderArea()

RenderArea::RenderArea ( QWidget *  parent)

This constructor initializes the QOpenGLWidget using the default QSurfaceFormat.

◆ ~RenderArea()

virtual RenderArea::~RenderArea ( )
virtual

Destructor.

Member Function Documentation

◆ activateStereo()

virtual void RenderArea::activateStereo ( bool  activated)
virtual

Activate/Deactivate stereo.

Implements SiRenderAreaStereo.

Reimplemented in RenderAreaInteractive.

◆ getAntialiasingMode()

virtual SoSceneManager::AntialiasingMode RenderArea::getAntialiasingMode ( ) const
overridevirtual

◆ getAntialiasingQuality()

virtual float RenderArea::getAntialiasingQuality ( ) const
overridevirtual

◆ getClearColor()

virtual SbColorRGBA RenderArea::getClearColor ( ) const
virtual

Gets the RGBA value used when the color buffer is cleared.

Implements SiRenderArea.

◆ getClearDepth()

virtual float RenderArea::getClearDepth ( ) const
virtual

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

Implements SiRenderArea.

◆ getClearPolicy()

virtual ClearPolicy RenderArea::getClearPolicy ( ) const
virtual

Gets the color buffer and depth buffer clear policy.

Implements SiRenderArea.

◆ getContainerWidget()

QWidget * RenderArea::getContainerWidget ( )
inline

Definition at line 219 of file RenderArea.h.

◆ getGLRenderAction()

virtual SoGLRenderAction * RenderArea::getGLRenderAction ( ) const
virtual

Returns the render action used for rendering.

This method returns nullptr if the show() of the main window is not done.

◆ getSceneGraph()

virtual SoNode * RenderArea::getSceneGraph ( ) const
virtual

Gets the scene graph to render.

Implements SiRenderArea.

◆ getSize()

virtual SbVec2i32 RenderArea::getSize ( ) const
virtual

Gets the size used for rendering.

Implements SiRenderArea.

◆ getStereoParameters()

virtual SoStereoParameters * RenderArea::getStereoParameters ( ) const
virtual

◆ getStillSuperSamplingDelay()

virtual unsigned int RenderArea::getStillSuperSamplingDelay ( ) const
overridevirtual

◆ getStillSuperSamplingQuality()

virtual float RenderArea::getStillSuperSamplingQuality ( ) const
overridevirtual

◆ getTransparencyType()

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

Gets the global transparency algorithm to use when rendering.

◆ isRawStereoAvailable()

bool RenderArea::isRawStereoAvailable ( )

Returns true if stereo buffering is enabled.

◆ isStereoActivated()

virtual bool RenderArea::isStereoActivated ( ) const
virtual

Returns true if stereo rendering is currently activated.

NOTES

    Stereo status can only be retrieved once rendering area is initialized.

    Implements SiRenderAreaStereo.

◆ onStartRender()

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

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

Implements SiRenderArea.

◆ setAntialiasingMode()

virtual void RenderArea::setAntialiasingMode ( SoSceneManager::AntialiasingMode  mode)
overridevirtual

Define the antialiasing mode.

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

Implements SiRenderAreaAntialiasing.

◆ setAntialiasingQuality()

virtual void RenderArea::setAntialiasingQuality ( float  quality)
overridevirtual

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

Defines the RGBA value used when the color buffer is cleared.

Default is transparent black (0,0,0,0).

Implements SiRenderArea.

◆ setClearDepth()

virtual void RenderArea::setClearDepth ( float  depth)
virtual

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

Default is 1. Range is 0..1.

Implements SiRenderArea.

◆ setClearPolicy()

virtual void RenderArea::setClearPolicy ( ClearPolicy  policy)
virtual

Defines the color buffer and depth buffer clear policy.

Use enum ClearPolicy Default is COLORBUFFER_AND_DEPTHBUFFER.

Implements SiRenderArea.

◆ setGLRenderAction()

virtual void RenderArea::setGLRenderAction ( SoGLRenderAction glAction)
virtual

Defines the render action used for rendering.

◆ setSceneGraph()

virtual void RenderArea::setSceneGraph ( SoNode sceneGraph)
virtual

Sets the scene graph to render.

Implements SiRenderArea.

Reimplemented in RenderAreaInteractive.

◆ setSize()

virtual void RenderArea::setSize ( const SbVec2i32 size)
virtual

Defines the size used for rendering.

Implements SiRenderArea.

◆ setStereoParameters()

virtual void RenderArea::setStereoParameters ( SoStereoParameters parameters)
virtual

Defines the stereo parameters.

NOTES

    Stereo parameters can only be set once rendering area is initialized.

    Implements SiRenderAreaStereo.

◆ setStillSuperSamplingDelay()

virtual void RenderArea::setStillSuperSamplingDelay ( unsigned int  delay)
overridevirtual

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 RenderArea::setStillSuperSamplingQuality ( float  quality)
overridevirtual

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

Sets the global transparency algorithm to use when rendering.

Parameters
typeThe global transparency algorithm

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