SOCOMPUTEBOUNDINGBOX(3iv)

✨ SoComputeBoundingBox β€” the girlies of SoComputeBoundingBox(3IV) ✨

okay bestie, sit down, hydrate, because today we're computing bounding boxes and it's gonna be so satisfying πŸ’–


πŸŽ€ NAME πŸŽ€

SoComputeBoundingBox β€” she computes the bounding box and the center of a scene graph. no cap, that's the whole job description, and she does it flawlessly πŸ‘‘


🌸 INHERITS FROM 🌸

SoBase > SoFieldContainer > SoEngine > SoComputeBoundingBox

it's giving royal lineage. she got the whole family tree in her bloodline πŸ’…


✨ SYNOPSIS ✨

#include <Inventor/engines/SoComputeBoundingBox.h>

Inputs from class SoComputeBoundingBox:

SoSFNode            node
SoSFPath            path

Outputs from class SoComputeBoundingBox:

(SoSFVec3f)         min
(SoSFVec3f)         max
(SoSFVec3f)         boxCenter
(SoSFVec3f)         objectCenter

Methods from class SoComputeBoundingBox:

                     SoComputeBoundingBox()
void                      setViewportRegion(const SbViewportRegion
                              &vpReg);
const SbViewportRegion &  getViewportRegion();

Methods from class SoEngine:

static SoType       getClassTypeId()
virtual int         getOutputs(SoEngineOutputList &list) const
SoEngineOutput *    getOutput(const SbName &outputName) const
SbBool              getOutputName(const SoEngineOutput *output, SbName
                         &outputName) const
SoEngine *          copy() const
static SoEngine *   getByName(const SbName &name)
static int          getByName(const SbName &name, SoEngineList &list)

Methods from class SoFieldContainer:

void                setToDefaults()
SbBool              hasDefaultValues() const
SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
void                copyFieldValues(const SoFieldContainer *fc, SbBool
                         copyConnections = FALSE)
SbBool              set(const char *fieldDataString)
void                get(SbString &fieldDataString)
virtual int         getFields(SoFieldList &resultList) const
virtual SoField *   getField(const SbName &fieldName) const
SbBool              getFieldName(const SoField *field, SbName &fieldName)
                         const
SbBool              isNotifyEnabled() const
SbBool              enableNotify(SbBool flag)

Methods from class SoBase:

void                ref()
void                unref() const
void                unrefNoDelete() const
void                touch()
virtual SoType      getTypeId() const
SbBool              isOfType(SoType type) const
virtual void        setName(const SbName &name)
virtual SbName      getName() const

πŸ’– DESCRIPTION πŸ’–

so basically this engine is the main character who computes the bounding box and the center of a scene graph. the scene graph can be defined by a path or by a root node β€” pick your fighter, bestie πŸ₯Š

here's the tea β˜•:

  • 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. like, she simply will not speak. πŸ’€

she uses a default viewport region. so if your 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. that's the move, trust 🫢


πŸ¦‹ INPUTS πŸ¦‹

  • SoSFNode node β€” defines the graph for which the bounding box is computed. 🌈
  • SoSFPath path β€” alternatively, defines the graph for which the bounding box is computed. she's the alternative route, and honestly? iconic. πŸ’…

πŸ‘‘ OUTPUTS πŸ‘‘

  • (SoSFVec3f) min β€” minimum point of the computed bounding box. the low point, literally. πŸ“
  • (SoSFVec3f) max β€” maximum point of the computed bounding box. the high point, and yes she's highkey slaying. πŸ”₯
  • (SoSFVec3f) boxCenter β€” center of the computed bounding box. dead center, no notes. ✨
  • (SoSFVec3f) objectCenter β€” center of the objects in the graph. a whole different center, don't get it twisted. 🧚

πŸ’… METHODS πŸ’…

SoComputeBoundingBox()

Constructor. she's born. πŸŽ€

void setViewportRegion(const SbViewportRegion &vpReg);

Sets the viewport region to use for the bounding box computation. πŸ“

const SbViewportRegion & getViewportRegion();

Returns the viewport region to use for the bounding box computation. she gives it right back to you, generous queen πŸ‘‘


πŸ“„ FILE FORMAT/DEFAULTS πŸ“„

ComputeBoundingBox {
    node  NULL
    path  NULL
}

both NULL by default, meaning she's quiet until you give her something to work with. respectful. πŸ™ˆ


🌟 SEE ALSO 🌟

SoEngineOutput, SoGetBoundingBoxAction, SbBox3f

go read those too, bestie, they're all in the same friend group πŸ’œ


a note from your girl: keep the outputs in mind, because if both inputs are NULL you get nothing β€” outputs disabled, no vibe, no box. set your node or your path first. periodt. πŸ’–

and that's the whole page, babes! this was SoComputeBoundingBox(3IV)() β€” both the header AND the footer said so, and honestly? consistency is so cute. written under the SoComputeBoundingBox(3IV)() banner, dated with all the love of an unnamed date, and signed off with a kiss πŸŽ€βœ¨πŸ’–