SoRenderAreaCore Class Reference
[Components]

VSG extension Utility class to render a scene with an OpenGl context [BETA] More...

#include <Inventor/ViewerComponents/SoRenderAreaCore.h>

Inheritance diagram for SoRenderAreaCore:
SoRefCounter

List of all members.

Public Types

enum  InteractiveMode {
  AUTO = SoInteractiveComplexity::AUTO,
  FORCE_INTERACTION = SoInteractiveComplexity::FORCE_INTERACTION,
  FORCE_STILL = SoInteractiveComplexity::FORCE_STILL
}
enum  RenderStatus {
  ABORTED,
  INTERACTIVE,
  STILL
}

Public Member Functions

 SoRenderAreaCore (SoGLContext *glContext)
void setSceneGraph (SoNode *newScene)
SoNodegetSceneGraph () const
SbBool processEvent (const SoEvent *event)
SbBool processEvents (const std::vector< const SoEvent * > &eventList)
virtual RenderStatus render (SbBool clearWindow=TRUE, SbBool clearZbuffer=TRUE)
void setRedrawRequestCallback (SoRedrawRequestCB *redrawRequest, void *userData)
virtual void setViewportRegion (const SbViewportRegion &newRegion)
void setTransparencyType (SoGLRenderAction::TransparencyType type)
SoSceneManagergetSceneManager () const
void setInteractive (InteractiveMode mode)
SoRenderAreaCore::InteractiveMode getInteractiveMode () const

Detailed Description

VSG extension Utility class to render a scene with an OpenGl context [BETA]
Beta Features:

[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 related examples:

MFCRenderArea, MFCRenderAreaExaminer, MFCRenderAreaGuiIntegration, QtRenderArea, QtRenderAreaExaminer, QtRenderAreaGuiIntegration, WinRenderArea, WinRenderAreaExaminer


Member Enumeration Documentation

Interactive mode.

Enumerator:
AUTO 

Automatically detect when a user interaction is occurring (default).

FORCE_INTERACTION 

Behave like a user interaction is occurring.

FORCE_STILL 

Behave like there isn't any interaction.

Returned by the render method.

Enumerator:
ABORTED 

The frame rendering has been ended before its completion.

INTERACTIVE 

The frame has been rendered in interactive mode (some shapes may have been rendered with low quality settings).

STILL 

The frame has been rendered in still mode.


Constructor & Destructor Documentation

SoRenderAreaCore::SoRenderAreaCore ( SoGLContext glContext  ) 

Build a new SoRenderAreaCore that uses an existing glContext.


Member Function Documentation

SoRenderAreaCore::InteractiveMode SoRenderAreaCore::getInteractiveMode (  )  const

Returns the current interactive mode.

SoNode* SoRenderAreaCore::getSceneGraph (  )  const

Gets the scene graph which is managed here.

This is the Open Inventor scene which will be traversed for rendering and event processing.

SoSceneManager* SoRenderAreaCore::getSceneManager (  )  const
SbBool SoRenderAreaCore::processEvent ( const SoEvent event  ) 

Processes the passed event by applying an SoHandleEventAction to the scene graph managed here.

Returns TRUE if the event was handled by a node.

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

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.

virtual RenderStatus SoRenderAreaCore::render ( SbBool  clearWindow = TRUE,
SbBool  clearZbuffer = TRUE 
) [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

void SoRenderAreaCore::setInteractive ( InteractiveMode  mode  ) 

Set the current interactive mode.

Use enum InteractiveMode. Default is AUTO.

void SoRenderAreaCore::setRedrawRequestCallback ( SoRedrawRequestCB redrawRequest,
void *  userData 
)

Set a callback function that is called by Open Inventor when a redraw is needed, for example when a change has been made to the scene graph.

By default, no callback is provided. Usually, this callback function is implemented by calling a "repaint" command on the system canvas like:

  • QT : update()
  • JOGl: canvas.paint
void SoRenderAreaCore::setSceneGraph ( SoNode newScene  ) 

Sets the scene graph which is managed here.

This is the Open Inventor scene which will be traversed for rendering and event processing.

void SoRenderAreaCore::setTransparencyType ( SoGLRenderAction::TransparencyType  type  ) 

Sets the algorithm for rendering transparent objects.

Default is SCREEN_DOOR. See SoGLRenderAction for possible transparency types. See also the SoTransparencyType node.

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.

virtual void SoRenderAreaCore::setViewportRegion ( const SbViewportRegion newRegion  )  [virtual]

Sets current viewport region to use for rendering.

Typically this method must be called when the render area has been resized or moved.


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

Open Inventor by FEI reference manual, generated on 21 Sep 2015
Copyright © FEI S.A.S. All rights reserved.
http://www.vsg3d.com