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

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

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

+ Inheritance diagram for RenderAreaInteractive:

Public Types

enum  ClippingPlanesAdjustMode {
  AUTO ,
  MANUAL
}
 Camera clipping planes adjustment mode. More...
 
- 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...
 

Public Member Functions

 RenderAreaInteractive (QWidget *parent)
 This constructor initializes the QOpenGLWidget using the default QSurfaceFormat.
 
virtual ~RenderAreaInteractive ()
 Destructor.
 
virtual void setSceneGraph (SoNode *sceneGraph)
 Sets the scene graph to render.
 
void setClippingPlanesAdjustMode (ClippingPlanesAdjustMode mode)
 Set the camera clipping planes adjustment mode.
 
ClippingPlanesAdjustMode getClippingPlanesAdjustMode ()
 Get the camera clipping planes adjustment mode.
 
SoDEPRECATED SceneInteractorgetRootSceneGraph () const
 Return the root of the scene graph.
 
virtual SceneInteractorgetSceneInteractor () const
 Return the root of the scene graph.
 
virtual void viewAll (const SbViewportRegion &viewport)
 Move the camera to view the scene defined by the given path.
 
virtual void viewAxis (const SbVec3f &direction, const SbVec3f &up)
 Moves the camera to be aligned with the given direction vector while keeping the "up" direction of the camera parallel to the specified up vector.
 
virtual void activateStereo (bool activated)
 Activate/Deactivate stereo.
 
virtual bool isStereoSupported () const
 Returns true if stereo can be activated.
 
void setStereoCameraOffset (float offset)
 Set the stereo offset.
 
void setStereoCameraBalance (float balance)
 Set the stereo balance.
 
virtual SbBool processEvent (const SoEvent *event)
 Processes the passed event to the scene graph managed here.
 
virtual SbBool processEvents (const std::vector< const SoEvent * > &eventList)
 Processes the passed event to the scene graph managed here.
 
Deprecated
SoDEPRECATED void setInteractiveMode (SoInteractiveComplexity::InteractiveMode mode)
 Sets the current interactive mode.
 
virtual SoDEPRECATED SoInteractiveComplexity::InteractiveMode getInteractiveMode () const
 Gets the current interactive mode.
 
- Public Member Functions inherited from RenderArea
 RenderArea (QWidget *parent)
 This constructor initializes the QOpenGLWidget using the default QSurfaceFormat.
 
virtual ~RenderArea ()
 Destructor.
 
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 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 ()
 
Deprecated

Detailed Description

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

This class extends RenderArea to add mouse and keyboard interactions.

Definition at line 21 of file RenderAreaInteractive.h.

Member Enumeration Documentation

◆ ClippingPlanesAdjustMode

Camera clipping planes adjustment mode.

When adjustment mode is set to AUTO, the camera near and far planes are dynamically adjusted to be as tight as possible (least amount of stuff is clipped) before each render traversal. When adjustment mode is set to MANUAL, the user is expected to manually set the camera near and far planes.

Enumerator
AUTO 
MANUAL 

Definition at line 34 of file RenderAreaInteractive.h.

Constructor & Destructor Documentation

◆ RenderAreaInteractive()

RenderAreaInteractive::RenderAreaInteractive ( QWidget *  parent)

This constructor initializes the QOpenGLWidget using the default QSurfaceFormat.

◆ ~RenderAreaInteractive()

virtual RenderAreaInteractive::~RenderAreaInteractive ( )
virtual

Destructor.

Member Function Documentation

◆ activateStereo()

virtual void RenderAreaInteractive::activateStereo ( bool  activated)
virtual

Activate/Deactivate stereo.

Reimplemented from RenderArea.

◆ getClippingPlanesAdjustMode()

ClippingPlanesAdjustMode RenderAreaInteractive::getClippingPlanesAdjustMode ( )

Get the camera clipping planes adjustment mode.

◆ getInteractiveMode()

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

Gets the current interactive mode.

Implements SiRenderAreaInteractive.

◆ getRootSceneGraph()

SoDEPRECATED SceneInteractor * RenderAreaInteractive::getRootSceneGraph ( ) const

Return the root of the scene graph.

◆ getSceneInteractor()

virtual SceneInteractor * RenderAreaInteractive::getSceneInteractor ( ) const
virtual

Return the root of the scene graph.

Reimplemented in RenderAreaOrbiter, and RenderAreaExaminer.

◆ isStereoSupported()

virtual bool RenderAreaInteractive::isStereoSupported ( ) const
virtual

Returns true if stereo can be activated.

◆ processEvent()

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

Processes the passed event to the scene graph managed here.

Returns TRUE if the event was handled by a node.

NOTES

◆ processEvents()

virtual SbBool RenderAreaInteractive::processEvents ( const std::vector< const SoEvent * > &  eventList)
virtual

Processes the passed event to the scene graph managed here.

Returns TRUE if at least one event was handled by a node.

NOTES

◆ setClippingPlanesAdjustMode()

void RenderAreaInteractive::setClippingPlanesAdjustMode ( ClippingPlanesAdjustMode  mode)

Set the camera clipping planes adjustment mode.

When adjustment mode is set to AUTO, the camera near and far planes are dynamically adjusted to be as tight as possible (least amount of stuff is clipped) before each render traversal. When adjustment mode is set to MANUAL, the user is expected to manually set those planes. Updating clipping planes after a camera move is not enough, if a dragger or a rendered shape is moved, they can disappear or become partially clipped. Default is AUTO.

◆ setInteractiveMode()

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

Sets the current interactive mode.

Implements SiRenderAreaInteractive.

◆ setSceneGraph()

virtual void RenderAreaInteractive::setSceneGraph ( SoNode sceneGraph)
virtual

Sets the scene graph to render.

Reimplemented from RenderArea.

◆ setStereoCameraBalance()

void RenderAreaInteractive::setStereoCameraBalance ( float  balance)

Set the stereo balance.

◆ setStereoCameraOffset()

void RenderAreaInteractive::setStereoCameraOffset ( float  offset)

Set the stereo offset.

◆ viewAll()

virtual void RenderAreaInteractive::viewAll ( const SbViewportRegion viewport)
virtual

Move the camera to view the scene defined by the given path.

Equivalent to calling the SoCamera method viewAll(). Camera position is changed, but not orientation.

◆ viewAxis()

virtual void RenderAreaInteractive::viewAxis ( const SbVec3f direction,
const SbVec3f up 
)
virtual

Moves the camera to be aligned with the given direction vector while keeping the "up" direction of the camera parallel to the specified up vector.


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