Class SoComputeBoundingBox

  • All Implemented Interfaces:
    SafeDisposable

    public class SoComputeBoundingBox
    extends SoEngine
    Computes the bounding box and center of a scene graph. 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 {

      node NULL
      path NULL
    }

    See Also:
    SoEngineOutput, SoGetBoundingBoxAction, SbBox3f
    • Field Detail

      • node

        public final SoSFNode node
        Defines the graph for which the bounding box is computed.
      • path

        public final SoSFPath path
        Alternatively, defines the graph for which the bounding box is computed.
    • Constructor Detail

      • SoComputeBoundingBox

        public SoComputeBoundingBox()
        Constructor.
    • Method Detail

      • setViewportRegion

        public void setViewportRegion​(SbViewportRegion vpReg)
        Sets the viewport region to use for the bounding box computation.
      • getViewportRegion

        public SbViewportRegion getViewportRegion()
        Returns the viewport region to use for the bounding box computation.