SBXFBOX3F(3iv)
π SbXfBox3f β like, the whole vibe π
okay bestie, gather round, because we're talking about SbXfBox3f, which lives in manual section 3iv (yes, the (3IV) in the corner is just its little name tag π). It's a 3D box with an associated transformation matrix, and honestly? she's iconic.
πΈ INHERITS FROM πΈ
SbBox3f > SbXfBox3f
so yes, she's a SbBox3f at heart, just with extra main character energy π
β¨ SYNOPSIS β¨
#include <Inventor/SbBox.h>
π¦ Methods from class SbXfBox3f:
SbXfBox3f()
SbXfBox3f(const SbVec3f &_min, const SbVec3f &_max)
SbXfBox3f(const SbBox3f &box)
~SbXfBox3f()
void setTransform(const SbMatrix &m)
const SbMatrix & getTransform() const
const SbMatrix & getInverse() const
SbVec3f getCenter() const
void extendBy(const SbVec3f &pt)
void extendBy(const SbBox3f &bb)
void extendBy(const SbXfBox3f &bb)
SbBool intersect(const SbVec3f &pt) const
SbBool intersect(const SbBox3f &bb) const
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) const
void getBounds(SbVec3f &_min, SbVec3f &_max) const
void getOrigin(float &originX, float &originY, float
&originZ)
void getSize(float &sizeX, float &sizeY, float &sizeZ)
float getVolume() const
void makeEmpty()
SbBool isEmpty() const
SbBool hasVolume() const
void getSpan(const SbVec3f &direction, float &dMin, float
&dMax) const
void transform(const SbMatrix &m)
SbBox3f project() const
int operator ==(const SbXfBox3f &b1, const SbXfBox3f &b2)
int operator !=(const SbXfBox3f &b1, const SbXfBox3f &b2)
π Methods from class SbBox3f:
const SbVec3f & getMin()
const SbVec3f & getMax()
π DESCRIPTION π
So picture this: it's a 3D box, but with an arbitrary transformation applied to it. That's the whole thing. That's her.
Why do you care? Because this class is literally built for when a box is gonna get transformed frequently. Here's the tea β β if you used a plain SbBox3f for that job, it would expand every single time you transformed it, because it has to keep itself axis-aligned. Every transform, boom, bigger box. Not cute.
But an SbXfBox3f? Transformations can be accumulated on it without expanding the box at all. Then, once all your transformations are done, you can expand it to an axis-aligned box if you need to. Periodt. π
π METHODS π
SbXfBox3f()
SbXfBox3f(const SbVec3f &_min, const SbVec3f &_max)
SbXfBox3f(const SbBox3f &box)
~SbXfBox3f()
Constructors and destructor. π
void setTransform(const SbMatrix &m)β sets the transformation on the box.const SbMatrix & getTransform() constconst SbMatrix & getInverse() const
gets the transformation on the box, and its inverse. both of them. a matching set π«Ά
SbVec3f getCenter() constβ returns the center of the box.void extendBy(const SbVec3f &pt)β extends the box (if necessary) so it contains the given 3D point. Important caveat though bestie: if the box has had a non-identity transformation applied using thesetTransform()method, the point is assumed to be in the transformed space. Like, here's the example from the source, verbatim:
SbXfBox3f bbox; bbox.extendBy(SbVec3f(0,0,0));
SbMatrix trans; trans.setTranslate(SbVec3f(1,1,1));
bbox.setTransform(trans);
bbox.extendBy(SbVec3f(0,0,0));
and that will result in a bounding box extending from (-1,-1,-1) to (0,0,0) in bbox'es local (untransformed) space. iykyk π
void extendBy(const SbBox3f &bb)β extends the box (if necessary) so it contains the givenSbBox3f. Same caveat energy: if the box has had a non-identity transformation applied usingsetTransform(), the givenSbBox3fis assumed to be in the transformed space.void extendBy(const SbXfBox3f &bb)β extends the box (if necessary) so it contains the givenSbXfBox3f.SbBool intersect(const SbVec3f &pt) constβ returnsTRUEif the intersection of the given point and this box is not empty.SbBool intersect(const SbBox3f &bb) constβ returnsTRUEif the intersection of the given box and this box is not empty.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) constvoid getBounds(SbVec3f &_min, SbVec3f &_max) const
set and get the bounds of the box. your classic getter/setter duo π
void getOrigin(float &originX, float &originY, float &originZ)β returns the origin (minimum point) of the box.void getSize(float &sizeX, float &sizeY, float &sizeZ)β returns the size of the box.float getVolume() constβ gives the volume of the box (0for an empty box).void makeEmpty()β sets the box to contain nothing. the void era π³οΈSbBool isEmpty() constβ checks if the box is empty (degenerate).SbBool hasVolume() constβ checks if the box has volume; i.e., all three dimensions have positive size.void getSpan(const SbVec3f &direction, float &dMin, float &dMax) constβ finds the extent of the box along a particular direction.void transform(const SbMatrix &m)β transforms the box by the given matrix.SbBox3f project() constβ projects anSbXfBox3fto anSbBox3f. she's demoting herself, respectfully πint operator ==(const SbXfBox3f &b1, const SbXfBox3f &b2)int operator !=(const SbXfBox3f &b1, const SbXfBox3f &b2)
equality comparisons. are they the same? are they not? find out π
π₯ SEE ALSO π₯
SbBox3f, SbBox2f, SbBox2s, SbVec3f, SbVec2f, SbVec2s, SbMatrix, SoGetBoundingBoxAction
go read those too, they're all in the friend group π¦
okay that's the whole page!! π this was SbXfBox3f(3IV)() from the 3iv section β go slay your bounding boxes bestie, you got this β¨πΈπ
π¦ 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