SbXfBox3d(3)
๐ SbXfBox3d ๐
okay bestie, welcome to the Coin manual, section 3, and today's main character is SbXfBox3d. she's a box. she's got a transformation. she's double precision. she's everything. ๐โจ
๐ธ NAME ๐ธ
SbXfBox3d โ the class that is literally a 3 dimensional box with double precision coordinates plus an attached transformation. that's the whole vibe. no notes. ๐ฆ
โจ SYNOPSIS โจ
#include <Inventor/SbXfBox3d.h>
she Inherits SbBox3d. yes she's a nepo baby but honestly? she earned it. ๐
๐ Public Member Functions ๐
SbXfBox3d (void)
SbXfBox3d (const SbVec3d &boxmin, const SbVec3d &boxmax)
SbXfBox3d (const SbBox3d &box)
void setTransform (const SbDPMatrix &matrix)
const SbDPMatrix & getTransform (void) const
const SbDPMatrix & getInverse (void) const
SbVec3d getCenter (void) const
void extendBy (const SbVec3d &pt)
void extendBy (const SbBox3d &bb)
void extendBy (const SbXfBox3d &bb)
SbBool intersect (const SbVec3d &pt) const
SbBool intersect (const SbBox3d &bb) const
SbBool intersect (const SbXfBox3d &bb) const
SbBox3d project (void) const
void getSpan (const SbVec3d &direction, double &dMin, double &dMax) const
void transform (const SbDPMatrix &matrix)
double getVolume (void) const
๐ Public Member Functions inherited from SbBox3d ๐
these are the family recipes she got handed down. still iconic, still in the will:
SbBox3d (void)
SbBox3d (double xmin, double ymin, double zmin, double xmax, double ymax, double zmax)
SbBox3d (const SbVec3d &minpoint, const SbVec3d &maxpoint)
SbBox3d (const SbBox3f &box)
SbBox3d (const SbBox3s &box)
SbBox3d (const SbBox3i32 &box)
SbBox3d & setBounds (double xmin, double ymin, double zmin, double xmax, double ymax, double zmax)
SbBox3d & setBounds (const SbVec3d &minpoint, const SbVec3d &maxpoint)
SbBox3d & setBounds (const SbBox3f &box)
SbBox3d & setBounds (const SbBox3s &box)
SbBox3d & setBounds (const SbBox3i32 &box)
void getBounds (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const
void getBounds (SbVec3d &minpoint, SbVec3d &maxpoint) const
const SbVec3d & getMin (void) const
SbVec3d & getMin (void)
const SbVec3d & getMax (void) const
SbVec3d & getMax (void)
void extendBy (const SbVec3d &pt)
void extendBy (const SbBox3d &box)
void transform (const SbDPMatrix &matrix)
void makeEmpty (void)
SbBool isEmpty (void) const
SbBool hasVolume (void) const
double getVolume (void) const
SbBool intersect (const SbVec3d &point) const
SbBool intersect (const SbBox3d &box) const
SbVec3d getClosestPoint (const SbVec3d &point) const
SbBool outside (const SbDPMatrix &mvp, int &cullbits) const
SbVec3d getCenter (void) const
void getOrigin (double &origoX, double &origoY, double &origoZ) const
void getSize (double &sizeX, double &sizeY, double &sizeZ) const
SbVec3d getSize (void) const
void getSpan (const SbVec3d &dir, double &dmin, double &dmax) const
void print (FILE *file) const
๐ง Additional Inherited Members ๐ง
๐ Protected Attributes inherited from SbBox3d
the sacred corner data. do not touch unless you're her:
SbVec3d minpt
SbVec3d maxpt
โญ Related Symbols inherited from SbBox3d
comparison besties:
int operator== (const SbBox3d &b1, const SbBox3d &b2)
int operator!= (const SbBox3d &b1, const SbBox3d &b2)
๐ DETAILED DESCRIPTION ๐
SbXfBox3d is a 3 dimensional box with double precision coordinates and an attached transformation. like, she's a box but she also has layers. ๐ซถ
she provides storage for two box corners with double precision floating point coordinates, and for a double precision 4x4 transformation matrix. that's it, that's the whole personality, and it slays.
See also
SbBox3d,SbDPMatrix,SbXfBox3f
๐ ๏ธ Constructor & Destructor Documentation ๐ ๏ธ
SbXfBox3d::SbXfBox3d (void )
the default constructor. she shows up with an empty box and an identity matrix. a clean slate. a fresh start. a girl who has not yet been transformed. ๐
SbXfBox3d::SbXfBox3d (const SbVec3d & boxmin, const SbVec3d & boxmax)
constructs a box with the given corners, bestie. ๐
heads up though: the coordinates of min should be less than the coordinates of max if you actually want a valid box. do it backwards and, like, that's on you. ๐
SbXfBox3d::SbXfBox3d (const SbBox3d & box)
constructs a box from the given SbBox3d. ๐ซ
the transformation gets set to the identity matrix โ she arrives unbothered and unrotated.
๐ฅ Member Function Documentation ๐ฅ
void SbXfBox3d::setTransform (const SbDPMatrix & m)
sets the transformation to the given SbMatrix. that's it. glow up delivered. โจ
const SbDPMatrix & SbXfBox3d::getTransform (void ) const [inline]
returns the current transformation matrix. ๐
const SbDPMatrix & SbXfBox3d::getInverse (void ) const
returns the inverse of the current transformation matrix. she can undo her own transformation. main character energy fr fr. ๐
SbVec3d SbXfBox3d::getCenter (void ) const
returns the transformed center point of the box. the middle. the moment. the center of the whole situation. ๐ฏ
void SbXfBox3d::extendBy (const SbVec3d & pt)
extends the boundaries of the box by the given point โ like, makes the point fit inside the box if it isn't already living there. ๐
the point is assumed to be in transformed space. important!! iykyk.
void SbXfBox3d::extendBy (const SbBox3d & bb)
extends the boundaries of the box by the given bb parameter. that box is assumed to be in transformed space. ๐ฆ
the two given boxes get combined in such a way that the resultant bounding box always has the smallest possible volume. to pull that off, the transformation on this SbXfBox3f will sometimes be flattened before it's combined with bb. she'll fold for the right box. ๐ซ
void SbXfBox3d::extendBy (const SbXfBox3d & bb)
extends the boundaries of the box by the given bb parameter. ๐ฆ
the given box is assumed to be in transformed space.
Note: this is not guaranteed to give an optimal result if you use it for bounding box calculation, because the transformation matrix might change. see the documentation in SoGetBoundingBoxAction for more details. it's giving "good enough" not "perfect" and honestly? valid.
SbBool SbXfBox3d::intersect (const SbVec3d & pt) const
checks if the given point lies within the boundaries of this box. ๐
the point is assumed to be in transformed space.
SbBool SbXfBox3d::intersect (const SbBox3d & bb) const
checks if the given box lies entirely or partially within the boundaries of this box. overlap check!! ๐ซ
the given box is assumed to be in transformed space.
SbBool SbXfBox3d::intersect (const SbXfBox3d & xfbb) const
checks 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 old SGI code, sorry bestie, she wasn't invented yet. ๐
Since
- Coin 2.0 ๐ฑ
SbBox3d SbXfBox3d::project (void ) const
projects the SbXfBox3d into a SbBox3d. ๐
this gives you the same resulting SbBox3d as doing a SbBox3d::transform() with this transformation matrix as the parameter. same result, different route. slay.
void SbXfBox3d::getSpan (const SbVec3d & direction, double & dMin, double & dMax) const
finds the span of the box in the given direction โ i.e. how much room in that direction the box actually 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 you the span. math but make it cute. ๐งฎโจ
void SbXfBox3d::transform (const SbDPMatrix & m)
overridden from SbBox3d, because in the SbXfBox3d class the transformations are meant to be kept separate from the box. boundaries bestie. she doesn't merge her identity with her box. ๐
double SbXfBox3d::getVolume (void ) const
returns the box volume. ๐ฆ
overridden from the parent class so it can take into account the possibility of scaling in the transformation matrix. because a transformed box might be a bigger box, and she refuses to be underestimated.
๐ Author ๐
Generated automatically by Doxygen for Coin from the source code. yes the robots wrote this one, and they ate. ๐ค๐
and that's the page, bestie!! ๐โจ you just read the SbXfBox3d(3) manual page from Version 4.0.10, dated Thu Jun 25 2026 00:00:00 โ remember that date, it's basically her birthday. ๐ go forth and extend your boxes. periodt. ๐
๐๐ฆ
๐ฆ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 ยท BSD-3-Clause AND GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms