SoComputeBoundingBox — computes the bounding box and center of a scene graph
Contents
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/Defaults
ComputeBoundingBox{nodeNULLpathNULL}Inherits From
SoBase > SoFieldContainer > SoEngine > SoComputeBoundingBox
Inputs
SoSFNodenode
Defines the graph for which the bounding box is computed.
SoSFPathpath
Alternatively, defines the graph for which the bounding box is computed.
Methods
SoComputeBoundingBox()
Constructor
voidsetViewportRegion(constSbViewportRegion&vpReg);
Sets the viewport region to use for the bounding box computation.
constSbViewportRegion&getViewportRegion();
Returns the viewport region to use for the bounding box computation.
Name
SoComputeBoundingBox — computes the bounding box and center of a scene graph
Outputs
(SoSFVec3f)min
Minimum point of the computed bounding box.
(SoSFVec3f)max
Maximum point of the computed bounding box.
(SoSFVec3f)boxCenter
Center of the computed bounding box.
(SoSFVec3f)objectCenter
Center of the objects in the graph.
See Also
SoEngineOutput,SoGetBoundingBoxAction,SbBox3fSoComputeBoundingBox(3IV)()
Synopsis
#include<Inventor/engines/SoComputeBoundingBox.h>
Inputs from class SoComputeBoundingBox:
SoSFNodenodeSoSFPathpath
Outputs from class SoComputeBoundingBox:
(SoSFVec3f)min(SoSFVec3f)max(SoSFVec3f)boxCenter(SoSFVec3f)objectCenter
Methods from class SoComputeBoundingBox:
SoComputeBoundingBox()voidsetViewportRegion(constSbViewportRegion&vpReg);constSbViewportRegion&getViewportRegion();
Methods from class SoEngine:
staticSoTypegetClassTypeId()virtualintgetOutputs(SoEngineOutputList&list)constSoEngineOutput*getOutput(constSbName&outputName)constSbBoolgetOutputName(constSoEngineOutput*output,SbName&outputName)constSoEngine*copy()conststaticSoEngine*getByName(constSbName&name)staticintgetByName(constSbName&name,SoEngineList&list)
Methods from class SoFieldContainer:
voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)
Methods from class SoBase:
voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const