SbXfBox3d(3)
π SbXfBox3d(3) π
okay so welcome to the SbXfBox3d page, bestie!! π
this is the one from the Library Functions Manual, and it's genuinely iconic β it's a whole 3D box with double precision coordinates AND a transformation matrix attached, like the box brought its own glow-up. β¨
πΈ NAME πΈ
SbXfBox3d β The SbXfBox3d class is a 3 dimensional box with double precision coordinates and an attached transformation.
π SYNOPSIS π
#include <Inventor/SbBox.h>
Inherits SbBox3d.
π 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 π¦
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
void getSpan (const SbVec3d &dir, double &dmin, double &dmax) const
void print (FILE *file) const
π Additional Inherited Members π
π§ Protected Attributes inherited from SbBox3d π§
SbVec3d minpt
SbVec3d maxpt
β Related Symbols inherited from SbBox3d β
int operator== (const SbBox3d &b1, const SbBox3d &b2)
int operator!= (const SbBox3d &b1, const SbBox3d &b2)
π₯ Detailed Description π₯
The SbXfBox3d class is a 3 dimensional box with double precision coordinates and an attached transformation.
It provides storage for two box corners with double precision floating point coordinates, and for a double precision 4x4 transformation matrix. π«Ά
See also
SbBox2d,SbBox2f,SbBox2i32,SbBox2s,SbBox3d,SbBox3f,SbBox3i32,SbBox3s,SbXfBox3f,SbDPMatrix
π Constructor & Destructor Documentation π
SbXfBox3d::SbXfBox3d (void )
The default constructor makes an empty box and identity matrix. no thoughts, head empty, matrix identity. π
Referenced by extendBy(), extendBy(), and intersect().
SbXfBox3d::SbXfBox3d (const SbVec3d & boxmin, const SbVec3d & boxmax)
Constructs a box with the given corners.
The coordinates of min should be less than the coordinates of max if you want to make a valid box. like, that's the whole vibe check right there β if min isn't less than max, bestie, you did not make a valid box. π
SbXfBox3d::SbXfBox3d (const SbBox3d & box)
Constructs a box from the given SbBox3d.
The transformation is set to the identity matrix.
References SbBox3d::SbBox3d().
π Member Function Documentation π
void SbXfBox3d::setTransform (const SbDPMatrix & m)
Sets the transformation to the given SbMatrix.
Referenced by extendBy(), and transform().
const SbDPMatrix & SbXfBox3d::getTransform (void ) const [inline]
Returns the current transformation matrix. she's showing you her whole self. π
Referenced by extendBy().
const SbDPMatrix & SbXfBox3d::getInverse (void ) const
Returns the inverse of the current transformation matrix.
Referenced by extendBy(), extendBy(), extendBy(), and intersect().
SbVec3d SbXfBox3d::getCenter (void ) const
Return the transformed center point of the box. main character energy, dead center. π
References SbBox3d::getCenter().
void SbXfBox3d::extendBy (const SbVec3d & 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 giving "make room for the new girl". β¨
The point is assumed to be in transformed space.
References SbBox3d::extendBy(), getInverse(), SbBox3d::isEmpty(), and SbDPMatrix::multVecMatrix().
void SbXfBox3d::extendBy (const SbBox3d & 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. (yes, that says SbXfBox3f, we don't ask questions, we just report the facts π)
References SbBox3d::extendBy(), getInverse(), SbBox3d::getMax(), SbBox3d::getMin(), SbBox3d::getVolume(), getVolume(), SbBox3d::isEmpty(), SbDPMatrix::multVecMatrix(), SoDebugError::postInfo(), SoDebugError::postWarning(), project(), SbBox3d::SbBox3d(), SbXfBox3d(), SbBox3d::setBounds(), setTransform(), and SbVec3d::setValue().
void SbXfBox3d::extendBy (const SbXfBox3d & 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. so likeβ¦ it might not eat. π₯²
References getInverse(), SbBox3d::getMax(), SbBox3d::getMin(), getTransform(), getVolume(), SbBox3d::isEmpty(), SbDPMatrix::multRight(), SbDPMatrix::multVecMatrix(), SoDebugError::postInfo(), SoDebugError::postWarning(), SbBox3d::SbBox3d(), SbXfBox3d(), and SbVec3d::setValue().
SbBool SbXfBox3d::intersect (const SbVec3d & pt) const
Check if the given point lies within the boundaries of this box.
The point is assumed to be in transformed space.
References SbBox3d::intersect().
Referenced by intersect().
SbBool SbXfBox3d::intersect (const SbBox3d & bb) const
Check if the given box lies wholly or partly within the boundaries of this box. wholly OR partly, we accept all commitment levels. π
The given box is assumed to be in transformed space.
References SbBox3d::getMax(), SbBox3d::getMin(), SbDPMatrix::identity(), SbBox3d::intersect(), SbBox3d::isEmpty(), SoDebugError::postWarning(), and SbBox3d::SbBox3d().
SbBool SbXfBox3d::intersect (const SbXfBox3d & 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. Coin exclusive, iykyk. π
Since
- Coin 2.0
References getInverse(), intersect(), SbBox3d::SbBox3d(), SbXfBox3d(), and transform().
SbBox3d SbXfBox3d::project (void ) const
Project the SbXfBox3d into a SbBox3d.
This gives the same resulting SbBox3d as doing a SbBox3d::transform() with this transformation matrix as parameter. same result, different route, no cap. π₯
References SbBox3d::getMax(), SbBox3d::getMin(), SbBox3d::isEmpty(), SbBox3d::SbBox3d(), and SbBox3d::transform().
Referenced by extendBy(), and getSpan().
void SbXfBox3d::getSpan (const SbVec3d & direction, double & dMin, double & 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. basically: how much space does this box take up in that direction? that's the span, periodt. π
References SbBox3d::getSpan(), and project().
void SbXfBox3d::transform (const SbDPMatrix & m)
Overridden from SbBox3d, as the transformations are to be kept separate from the box in the SbXfBox3d class. they're keeping it separate, it's a boundaries thing, we respect it. π¦
References setTransform().
Referenced by intersect().
double SbXfBox3d::getVolume (void ) const
Return box volume. Overridden from parent class to take into account the possibility of scaling in the transformation matrix. the matrix can scale, and we are NOT about to ignore that. β
References SbDPMatrix::det3(), SbBox3d::getVolume(), and SbBox3d::hasVolume().
Referenced by extendBy(), and extendBy().
πΈ Author πΈ
Generated automatically by Doxygen for Coin from the source code.
and that's the whole page, bestie!! π«Ά this was Coin, Version 2.5.0, SbXfBox3d(3) from the Library Functions Manual β generated automatically by Doxygen for Coin straight from the source code, so you know it's the real thing. go forth and build boxes with transformations attached, you absolute icon. πβ¨π
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.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