Open Inventor Reference
SoClipPlaneElement Class Reference

Element that stores the current set of clipping planes, specified as SbPlanes. More...

#include <Inventor/elements/SoClipPlaneElement.h>

Inheritance diagram for SoClipPlaneElement:
SoAccumulatedElement SoElement SoGLClipPlaneElement

List of all members.

Public Member Functions

virtual void init (SoState *state)
 Initializes element.
virtual void push (SoState *state)
 Overrides push() method to copy values from next instance in the stack.
virtual void pop (SoState *state, const SoElement *prevTopElement)
 Overrides pop() method to free up planes that were added.
int getNum () const
 Returns the number of planes in an instance.
const SbPlaneget (int index, SbBool inWorldSpace=TRUE) const
 Returns the indexed plane an element as an SbPlane.
virtual void print (FILE *fp) const
 Prints element (for debugging)

Static Public Member Functions

static void add (SoState *state, SoNode *node, const SbPlane &plane)
 Adds a clip plane to the current set in the state.
static const SoClipPlaneElementgetInstance (SoState *state)
 Returns the top (current) instance of the element in the state.
static void initClass ()
 Initializes the SoClipPlaneElement class.

Protected Member Functions

virtual void addToElt (const SbPlane &plane, const SbMatrix &modelMatrix)
 Adds the clipping plane to an instance.
virtual ~SoClipPlaneElement ()

Protected Attributes

SbPList planes
 List of plane structures.
int startIndex
 Index of 1st plane created in this instance.

Detailed Description

When a plane is added, this element gets the current model matrix from the state and stores it in the instance. This allows the get() method to return the clip plane in object space (the plane as originally defined) or world space (after being transformed by the model matrix).

Definition at line 77 of file SoClipPlaneElement.h.


Constructor & Destructor Documentation

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

Member Function Documentation

static void SoClipPlaneElement::add ( SoState state,
SoNode node,
const SbPlane plane 
) [static]
virtual void SoClipPlaneElement::addToElt ( const SbPlane plane,
const SbMatrix modelMatrix 
) [protected, virtual]

Takes the new plane and the current model matrix

Reimplemented in SoGLClipPlaneElement.

const SbPlane& SoClipPlaneElement::get ( int  index,
SbBool  inWorldSpace = TRUE 
) const

The plane can be returned in object or world space.

static const SoClipPlaneElement* SoClipPlaneElement::getInstance ( SoState state) [static]
int SoClipPlaneElement::getNum ( ) const
virtual void SoClipPlaneElement::init ( SoState state) [virtual]

Reimplemented from SoElement.

static void SoClipPlaneElement::initClass ( ) [static]

Reimplemented from SoAccumulatedElement.

Reimplemented in SoGLClipPlaneElement.

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

Reimplemented from SoElement.

Reimplemented in SoGLClipPlaneElement.

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

Reimplemented from SoAccumulatedElement.

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

Reimplemented from SoElement.


Member Data Documentation

Definition at line 113 of file SoClipPlaneElement.h.

Definition at line 114 of file SoClipPlaneElement.h.


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