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 πβ¨ππ¦πΈπ
π«Ά
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms