SBBOX3F(3iv)

πŸ’– SbBox3f β€” the 3D box class πŸ’–

okay bestie, welcome to the 3IV manual, this is SbBox3f(3IV) and it's literally just a box. a 3D one. she's boxy, she's floaty, she's iconic ✨


🌸 NAME 🌸

SbBox3f β€” the 3D box class. yes that's the whole name. short, sweet, slays πŸ’…


🧬 INHERITS FROM 🧬

SbBox3f

ngl she inherits from herself, main character energy only, no ancestors to report 🫢


✨ SYNOPSIS ✨

first you gotta let her in, so:

#include <Inventor/SbBox.h>

then here's the whole friend group β€” methods from class SbBox3f:

                     SbBox3f()
                     SbBox3f(float xmin, float ymin, float zmin float xmax,
                          float ymax, float zmax)
                     SbBox3f(const SbVec3f &min, const SbVec3f &max)
 void                ~SbBox3f()
 const SbVec3f &     getMin()
 const SbVec3f &     getMax()
 SbVec3f             getCenter()
 void                extendBy(const SbVec3f &point)
 void                extendBy(const SbBox3f &box)
 SbBool              intersect(const SbVec3f &point)
 SbBool              intersect(const SbBox3f &box)
 void                setBounds(float xmin, float ymin, float zmin, float
                          xmax, float ymax, float zmax)
 void                setBounds(const SbVec3f &min, const SbVec3f &max)
 void                getBounds(float &xmin, float &ymin, float &zmin, float
                          &xmax, float &ymax, float &zmax)
 void                getBounds(SbVec3f &min, SbVec3f &max)
 void                getOrigin(float &x0, float &y0, float &z0)
 void                getSize(float &x, float &y, float &z)
 void                makeEmpty()
 SbBool              isEmpty()
 SbBool              hasVolume()
 void                getSpan(SbVec3f &dir, float &dMin, float &dMax)
 void                transform(const SbMatrix &mx)
 float               getVolume()
not me noticing the missing comma in float zmin float xmax up there πŸ™ˆ we keep it exactly as the manual says it, no editing the queen's typo, periodt.

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, imagine a box. a 3D box. her planes are all parallel to the major axes (so she's perfectly straight, no tilt, we love a structured queen πŸ‘‘) and she gets specified by two points on a diagonal. that's it. that's the whole vibe.

this class is part of the standard Inventor datatype classes and she's used as input and output to geometry operations β€” peep SoGetBoundingBoxAction if you wanna see her in her natural habitat πŸŽ€


πŸ’… METHODS πŸ’…

πŸŽ€ Constructors & destructor πŸŽ€

                     SbBox3f()
                     SbBox3f(float xmin, float ymin, float zmin float xmax,
                          float ymax, float zmax)
                     SbBox3f(const SbVec3f &min, const SbVec3f &max)
 void                ~SbBox3f()

Constructors and destructor for a 3D float box, bestie. xmin, ymin, zmin, xmax, ymax and zmax are the bounds of the box. and min and max are the corners of the diagonal that define the box β€” like, she's built from the diagonal, that's her whole thing πŸ’–


🧚 getMin() / getMax() 🧚

 const SbVec3f &     getMin()
 const SbVec3f &     getMax()

returns the minimum and maximum points of the box. the minimum point is the corner of the box with the lowest X, Y, and Z values. the maximum point is the corner with the highest X, Y, and Z values. low corner, high corner, that's the pair 🫢


⭐ getCenter() ⭐

 SbVec3f             getCenter()

returns the center of the box. dead center. the middle. her heart πŸ₯Ί


🌈 extendBy() 🌈

 void                extendBy(const SbVec3f &point)
 void                extendBy(const SbBox3f &box)

extends this box (if necessary) to contain the specified point or other box. so if a point or another box is hanging outside, she stretches to swallow it up. she's accommodating like that ✨


πŸ”₯ intersect() πŸ”₯

 SbBool              intersect(const SbVec3f &point)
 SbBool              intersect(const SbBox3f &box)

returns TRUE if the specified point or box intersects this box. TRUE = they're touching/overlapping, FALSE = she said no thanks πŸ’€


πŸ’œ setBounds() πŸ’œ

 void                setBounds(float xmin, float ymin, float zmin, float
                          xmax, float ymax, float zmax)
 void                setBounds(const SbVec3f &min, const SbVec3f &max)

sets the corners of the box. pick your six floats or pick your two SbVec3fs, either way the corners are set, no cap πŸŽ€


πŸ“ getBounds() πŸ“

 void                getBounds(float &xmin, float &ymin, float &zmin, float
                          &xmax, float &ymax, float &zmax)
 void                getBounds(SbVec3f &min, SbVec3f &max)

gets the corners of the box. six floats out, or two SbVec3fs out. you choose, bestie πŸ’–


🌸 getOrigin() 🌸

 void                getOrigin(float &x0, float &y0, float &z0)

gets box origin which is the same as the minimum corner of the box. so like, the origin is the min corner. same girl, two names πŸ‘‘


πŸ¦‹ getSize() πŸ¦‹

 void                getSize(float &x, float &y, float &z)

gets box size. how big she is in x, y, z. that's it ✨


πŸŽ€ makeEmpty() πŸŽ€

 void                makeEmpty()

makes an empty box. she's giving nothing. empty. void. a whole mood πŸ™ˆ


πŸ’… isEmpty() πŸ’…

 SbBool              isEmpty()

returns TRUE if the box is empty, and FALSE otherwise. vibe check on the box's emptiness 🫢


🌈 hasVolume() 🌈

 SbBool              hasVolume()

returns TRUE if all three dimensions of the box have positive size, and FALSE otherwise. all three, bestie. not two, not one. three. slay ✨


⭐ getSpan() ⭐

 void                getSpan(SbVec3f &dir, float &dMin, float &dMax)

finds the span of a box along a specified direction. the span is the total distance the box occupies along a given direction. that total distance comes back as a minimum and maximum distance from the origin of each of the corners of the box along the given direction. and the difference between those two values? that's the span. math ate that πŸ’…


πŸ’œ transform() πŸ’œ

 void                transform(const SbMatrix &mx)

transforms box by matrix, enlarging box to contain result. she moves, and she grows to fit whatever she turned into πŸ”₯


🧚 getVolume() 🧚

 float               getVolume()

returns the volume of the box. the actual number. the cubic truth ⭐


πŸ‘‘ SEE ALSO πŸ‘‘

SbXfBox3f, SbBox2f, SbBox2s, SbVec3f, SbVec2f, SbVec2s, SbMatrix, SoGetBoundingBoxAction

go read those too, they're the extended universe, iykyk 🌈


okay that's the whole page!! this one lives in the 3IV manual and signs off as SbBox3f(3IV)() β€” the date slot is just… empty, she left it blank, iconic honestly, and there's no other version info to report. anyway bestie go forth and box πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά