Open Inventor Reference
SoGLUpdateAreaElement Class Reference

Element that stores the rectangular area within the current viewport region that needs to be updated when rendering. More...

#include <Inventor/elements/SoGLUpdateAreaElement.h>

Inheritance diagram for SoGLUpdateAreaElement:
SoElement

List of all members.

Public Member Functions

virtual void init (SoState *state)
 Initializes element.
virtual void push (SoState *state)
 Override push() and pop() methods to keep GL up to date.
virtual void pop (SoState *state, const SoElement *prevTopElement)
virtual SbBool matches (const SoElement *elt) const
 Returns TRUE if the update areas match in both elements.
virtual SoElementcopyMatchInfo () const
 Create and return a copy of this element.
virtual void print (FILE *fp) const
 Prints element (for debugging)

Static Public Member Functions

static void set (SoState *state, const SbVec2f &origin, const SbVec2f &size)
 Sets the current update area in the state. May have GL side effects.
static SbBool get (SoState *state, SbVec2f &origin, SbVec2f &size)
 Returns current update area from the state.
static SbVec2f getDefaultOrigin ()
 Returns the default update area origin and size.
static SbVec2f getDefaultSize ()
static void initClass ()
 Initializes the SoGLUpdateAreaElement class.

Protected Member Functions

virtual ~SoGLUpdateAreaElement ()

Protected Attributes

SbVec2f origin
SbVec2f size

Detailed Description

It can be used for partial rendering updates when applications know that only a portion of the objects need to be rerendered. Cameras can use the info in this element to set up a view volume against which culling can be performed. This element also sets up the GL scissor box to limit drawing.

The update area is specified in normalized viewport coordinates, where (0,0) is the lower left corner of the viewport and (1,1) is the upper right corner. The area is given as an origin and a size.

Definition at line 80 of file SoGLUpdateAreaElement.h.


Constructor & Destructor Documentation

virtual SoGLUpdateAreaElement::~SoGLUpdateAreaElement ( ) [protected, virtual]

Member Function Documentation

virtual SoElement* SoGLUpdateAreaElement::copyMatchInfo ( ) const [virtual]

Implements SoElement.

static SbBool SoGLUpdateAreaElement::get ( SoState state,
SbVec2f origin,
SbVec2f size 
) [static]

Returns TRUE if the update area is the default, namely, the entire viewport.

static SbVec2f SoGLUpdateAreaElement::getDefaultOrigin ( ) [inline, static]

Definition at line 97 of file SoGLUpdateAreaElement.h.

static SbVec2f SoGLUpdateAreaElement::getDefaultSize ( ) [inline, static]

Definition at line 98 of file SoGLUpdateAreaElement.h.

virtual void SoGLUpdateAreaElement::init ( SoState state) [virtual]

Reimplemented from SoElement.

static void SoGLUpdateAreaElement::initClass ( ) [static]

Reimplemented from SoElement.

virtual SbBool SoGLUpdateAreaElement::matches ( const SoElement elt) const [virtual]

Implements SoElement.

virtual void SoGLUpdateAreaElement::pop ( SoState state,
const SoElement prevTopElement 
) [virtual]

Reimplemented from SoElement.

virtual void SoGLUpdateAreaElement::print ( FILE *  fp) const [virtual]

Reimplemented from SoElement.

virtual void SoGLUpdateAreaElement::push ( SoState state) [virtual]

Reimplemented from SoElement.

static void SoGLUpdateAreaElement::set ( SoState state,
const SbVec2f origin,
const SbVec2f size 
) [static]

Member Data Documentation

Definition at line 118 of file SoGLUpdateAreaElement.h.

Definition at line 118 of file SoGLUpdateAreaElement.h.


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