Open Inventor Reference
SoComputeBoundingBox Class Reference

Computes the bounding box and center of a scene graph. More...

#include <Inventor/engines/SoComputeBoundingBox.h>

Inheritance diagram for SoComputeBoundingBox:
SoEngine SoFieldContainer SoBase

List of all members.

Public Member Functions

 SoComputeBoundingBox ()
 Constructor.
void setViewportRegion (const SbViewportRegion &vpReg)
 Sets the viewport region to use for the bounding box computation.
const SbViewportRegiongetViewportRegion () const

Static Public Member Functions

static void initClass ()
 Initializes base engine class.

Public Attributes

SoSFNode node
 Inputs:
SoSFPath path
 Pointer to path defining graph.
SoEngineOutput min
 Outputs:
SoEngineOutput max
 (SoSFVec3f) Maximum point of bbox
SoEngineOutput boxCenter
 (SoSFVec3f) Center point of bbox
SoEngineOutput objectCenter
 (SoSFVec3f) Center of object(s)

Protected Member Functions

virtual void inputChanged (SoField *whichInput)
 Indicates that an input has changed - we use this to determine whether to use the node or path, or to disable output entirely.

Detailed Description

This engine computes the bounding box and center of a scene graph. The scene graph can be defined by a path or by a root node.

If the path input is not NULL, the bounding box of the graph defined by the path will be computed. If path is NULL, but the node input is not NULL, the bounding box is computed on the graph rooted by the node. By default, the two inputs are NULL. If both the inputs are NULL, the outputs are disabled.

The engine uses a default viewport region. If the graph includes screen-based objects (such as SoText2) you can call setViewportRegion() on the engine instance to set up the correct viewport region to use.

File Format/Default
ComputeBoundingBox {
  path NULL
}
See Also
SoEngineOutput, SoGetBoundingBoxAction, SbBox3f

Definition at line 107 of file SoComputeBoundingBox.h.


Constructor & Destructor Documentation

SoComputeBoundingBox::SoComputeBoundingBox ( )

Member Function Documentation

const SbViewportRegion& SoComputeBoundingBox::getViewportRegion ( ) const
static void SoComputeBoundingBox::initClass ( ) [static]

Reimplemented from SoEngine.

virtual void SoComputeBoundingBox::inputChanged ( SoField whichInput) [protected, virtual]

Reimplemented from SoEngine.

void SoComputeBoundingBox::setViewportRegion ( const SbViewportRegion vpReg)

Member Data Documentation

(SoSFVec3f) Minimum point of bbox

Definition at line 117 of file SoComputeBoundingBox.h.

Pointer to root node of graph

Definition at line 113 of file SoComputeBoundingBox.h.


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