SbXfBox3d(3)

๐Ÿ“ฆ
version 4.0.10 ยท 4 versions
, in fedora 43, fedora 44

๐Ÿ’– 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

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