SbXfBox3f(3)
๐ SbXfBox3f ๐
okay bestie, sit down, hydrate, because today we're learning about SbXfBox3f, from the SbXfBox3f(3) manual. it's a 3 dimensional box with floating point coordinates AND an attached transformation. yes, the box has a whole glow-up attached to it. iconic behavior fr fr. ๐
โจ SYNOPSIS โจ
#include <Inventor/SbBox.h>
Inherits SbBox3f.
๐ธ Public Member Functions ๐ธ
SbXfBox3f (void)SbXfBox3f (const SbVec3f &boxmin, const SbVec3f &boxmax)SbXfBox3f (const SbBox3f &box)~SbXfBox3f ()void setTransform (const SbMatrix &m)const SbMatrix & getTransform (void) constconst SbMatrix & getInverse (void) constSbVec3f getCenter (void) constvoid extendBy (const SbVec3f &pt)void extendBy (const SbBox3f &bb)void extendBy (const SbXfBox3f &bb)SbBool intersect (const SbVec3f &pt) constSbBool intersect (const SbBox3f &bb) constSbBool intersect (const SbXfBox3f &bb) constvoid getSpan (const SbVec3f &direction, float &dMin, float &dMax) constSbBox3f project (void) constvoid transform (const SbMatrix &m)float getVolume (void) constvoid print (FILE *file) const
๐ฆ Public Member Functions inherited from SbBox3f ๐ฆ
SbBox3f (void)SbBox3f (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)SbBox3f (const SbVec3f &minpoint, const SbVec3f &maxpoint)SbBox3f (const SbBox3d &box)SbBox3f (const SbBox3s &box)SbBox3f (const SbBox3i32 &box)SbBox3f & setBounds (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)SbBox3f & setBounds (const SbVec3f &minpoint, const SbVec3f &maxpoint)SbBox3f & setBounds (const SbBox3d &box)SbBox3f & setBounds (const SbBox3s &box)SbBox3f & setBounds (const SbBox3i32 &box)void getBounds (float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax) constvoid getBounds (SbVec3f &minpoint, SbVec3f &maxpoint) constconst SbVec3f & getMin (void) constSbVec3f & getMin (void)const SbVec3f & getMax (void) constSbVec3f & getMax (void)void extendBy (const SbVec3f &pt)void extendBy (const SbBox3f &box)void transform (const SbMatrix &matrix)void makeEmpty (void)SbBool isEmpty (void) constSbBool hasVolume (void) constfloat getVolume (void) constSbBool intersect (const SbVec3f &pt) constSbBool intersect (const SbBox3f &box) constSbVec3f getClosestPoint (const SbVec3f &point) constSbBool outside (const SbMatrix &mvp, int &cullbits) constSbVec3f getCenter (void) constvoid getOrigin (float &originX, float &originY, float &originZ) constvoid getSize (float &sizeX, float &sizeY, float &sizeZ) constSbVec3f getSize (void) constvoid getSpan (const SbVec3f &dir, float &dmin, float &dmax) constvoid print (FILE *file) const
๐ Additional Inherited Members ๐
Related Symbols inherited from</purpose> SbBox3f
int operator== (const SbBox3f &b1, const SbBox3f &b2)int operator!= (const SbBox3f &b1, const SbBox3f &b2)
๐ Detailed Description ๐
The SbXfBox3f class is a 3 dimensional box with floating point coordinates and an attached transformation.
This box class is used by many other classes in Coin for data exchange. It provides storage for two box corners with floating point coordinates, and for a floating point 4x4 transformation matrix. so it's basically a box that also carries its own little transformation passport everywhere it goes. main character energy, honestly. ๐
๐ See also
SbBox2s, SbBox2f, SbBox2d, SbBox3s, SbBox3f, SbBox3d, SbMatrix.
๐ง Constructor & Destructor Documentation ๐ง
SbXfBox3f::SbXfBox3f (void )
The default constructor makes an empty box and an identity matrix. blank slate, no notes, fresh start. we love a clean slate. โจ
SbXfBox3f::SbXfBox3f (const SbVec3f & boxmin, const SbVec3f & boxmax)
Constructs a box with the given corners.
heads up bestie: the coordinates of min should be less than the coordinates of max if you want to make a valid box. it's giving "please color inside the lines" but for geometry. ๐
SbXfBox3f::SbXfBox3f (const SbBox3f & box)
Constructs a box from the given SbBox3f.
The transformation is set to the identity matrix. so it inherits the box, but the vibe matrix starts neutral. ๐
SbXfBox3f::~SbXfBox3f ()
Default destructor does nothing. it's literally just there, chilling, existing, serving zero function but looking cute. ๐
๐ฅ Member Function Documentation ๐ฅ
void SbXfBox3f::setTransform (const SbMatrix & m)
Sets the transformation to the given SbMatrix. assign the vibe. lock it in. ๐
const SbMatrix & SbXfBox3f::getTransform (void ) const
Returns the current transformation matrix. hand it back, exactly as it is. ๐ซถ
const SbMatrix & SbXfBox3f::getInverse (void ) const
Returns the inverse of the current transformation matrix. yes, it undoes the transformation. the un-glow-up. the reverse card. ๐
SbVec3f SbXfBox3f::getCenter (void ) const
Return the transformed center point of the box. not just the center โ the transformed center. the center that went through the matrix and came out the other side with a whole new look. โจ
void SbXfBox3f::extendBy (const SbVec3f & pt)
Extend the boundaries of the box by the given point, i.e. make the point fit inside the box if it isn't already so. it's the box saying "come in, join us, we'll make room." ๐ซ
The point is assumed to be in transformed space.
void SbXfBox3f::extendBy (const SbBox3f & bb)
Extend the boundaries of the box by the given bb parameter. The given box is assumed to be in transformed space.
The two given boxes will be combined in such a way so that the resultant bounding box always has the smallest possible volume. To accomplish this, the transformation on this SbXfBox3f will sometimes be flattened before it's combined with bb.
so yeah โ occasionally the transformation gets squished flat in the name of efficiency. it's not a bug, it's a sacrifice for the smallest box. ๐
void SbXfBox3f::extendBy (const SbXfBox3f & bb)
Extend the boundaries of the box by the given bb parameter.
The given box is assumed to be in transformed space.
Note: is not guaranteed to give an optimal result if used for bbox calculation since the transformation matrix might change. See documentation in SoGetBoundingBoxAction for more details.
translation: don't @ me if your bounding box is slightly off, the matrix was moving, it's not my fault. ๐ญ go read SoGetBoundingBoxAction.
SbBool SbXfBox3f::intersect (const SbVec3f & pt) const
Check if the given point lies within the boundaries of this box. is the point in the box or not. simple question, box-shaped answer. ๐ฆ
The point is assumed to be in transformed space.
SbBool SbXfBox3f::intersect (const SbBox3f & bb) const
Check if the given box lies wholly or partly within the boundaries of this box. fully inside, partially inside, doesn't matter โ if there's overlap, we're counting it. ๐ซถ
The given box is assumed to be in transformed space.
SbBool SbXfBox3f::intersect (const SbXfBox3f & xfbb) const
Check if two transformed boxes intersect.
This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. so if you're on ancient SGI tech, this one's not for you, bestie. ๐
Since
Coin 2.0
void SbXfBox3f::getSpan (const SbVec3f & direction, float & dMin, float & dMax) const
Find the span of the box in the given direction (i.e. how much room in the given direction the box needs). The distance is returned as the minimum and maximum distance from origo to the closest and furthest plane defined by the direction vector and each of the box' corners. The difference between these values gives the span.
so like... how much space does this box take up if you look at it from this one specific angle? dMin is how close it gets to origo, dMax is how far it reaches, and the difference between them is the whole span. math but make it make sense. ๐งฎโจ
SbBox3f SbXfBox3f::project (void ) const
Project the SbXfBox3f into a SbBox3f.
This gives the same resulting SbBox3f as doing a SbBox3f::transform() with this transformation matrix as parameter. so it's the flat version of the fancy box. same answer, less drama. ๐
void SbXfBox3f::transform (const SbMatrix & m)
Overridden from SbBox3f, as the transformations are to be kept separate from the box in the SbXfBox3f class. the box and the transformation are NOT a couple, they're just roommates. ๐ซถ
float SbXfBox3f::getVolume (void ) const
Return box volume. Overridden from parent class to take into account the possibility of scaling in the transformation matrix. so the volume actually reflects the transformation instead of pretending the scaling isn't there. periodt. ๐
void SbXfBox3f::print (FILE * fp) const
Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile. so in release builds this is just a very confident no-op. ๐
๐ธ Author ๐ธ
Generated automatically by Doxygen for Coin from the source code.
and that's the whole page, bestie!! you now know everything there is to know about SbXfBox3f. go forth and box, but like, transformed. ๐ฆ
this cutie was brought to you by Coin, Version 3.1.3, on the SbXfBox3f(3) page. mwah. ๐โจ๐
๐ฆ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 ยท GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 ยท GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 ยท GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms