.TH "SbXfBox3f" 3 "Tue Jun 23 2026 23:48:38" "Version 4.0.10" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SbXfBox3f \- The \fBSbXfBox3f\fP class is a 3 dimensional box with floating point coordinates and an attached transformation\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSbBox3f\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbXfBox3f\fP (void)" .br .ti -1c .RI "\fBSbXfBox3f\fP (const \fBSbVec3f\fP &boxmin, const \fBSbVec3f\fP &boxmax)" .br .ti -1c .RI "\fBSbXfBox3f\fP (const \fBSbBox3f\fP &box)" .br .ti -1c .RI "\fB~SbXfBox3f\fP ()" .br .ti -1c .RI "void \fBsetTransform\fP (const \fBSbMatrix\fP &m)" .br .ti -1c .RI "const \fBSbMatrix\fP & \fBgetTransform\fP (void) const" .br .ti -1c .RI "const \fBSbMatrix\fP & \fBgetInverse\fP (void) const" .br .ti -1c .RI "\fBSbVec3f\fP \fBgetCenter\fP (void) const" .br .ti -1c .RI "void \fBextendBy\fP (const \fBSbVec3f\fP &pt)" .br .ti -1c .RI "void \fBextendBy\fP (const \fBSbBox3f\fP &bb)" .br .ti -1c .RI "void \fBextendBy\fP (const \fBSbXfBox3f\fP &bb)" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbVec3f\fP &pt) const" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbBox3f\fP &bb) const" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbXfBox3f\fP &bb) const" .br .ti -1c .RI "void \fBgetSpan\fP (const \fBSbVec3f\fP &direction, float &dMin, float &dMax) const" .br .ti -1c .RI "\fBSbBox3f\fP \fBproject\fP (void) const" .br .ti -1c .RI "void \fBtransform\fP (const \fBSbMatrix\fP &m)" .br .ti -1c .RI "float \fBgetVolume\fP (void) const" .br .ti -1c .RI "void \fBprint\fP (FILE *file) const" .br .in -1c Public Member Functions inherited from \fBSbBox3f\fP .in +1c .ti -1c .RI "\fBSbBox3f\fP (void)" .br .ti -1c .RI "\fBSbBox3f\fP (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)" .br .ti -1c .RI "\fBSbBox3f\fP (const \fBSbVec3f\fP &minpoint, const \fBSbVec3f\fP &maxpoint)" .br .ti -1c .RI "\fBSbBox3f\fP (const \fBSbBox3d\fP &box)" .br .ti -1c .RI "\fBSbBox3f\fP (const \fBSbBox3s\fP &box)" .br .ti -1c .RI "\fBSbBox3f\fP (const \fBSbBox3i32\fP &box)" .br .ti -1c .RI "\fBSbBox3f\fP & \fBsetBounds\fP (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)" .br .ti -1c .RI "\fBSbBox3f\fP & \fBsetBounds\fP (const \fBSbVec3f\fP &minpoint, const \fBSbVec3f\fP &maxpoint)" .br .ti -1c .RI "\fBSbBox3f\fP & \fBsetBounds\fP (const \fBSbBox3d\fP &box)" .br .ti -1c .RI "\fBSbBox3f\fP & \fBsetBounds\fP (const \fBSbBox3s\fP &box)" .br .ti -1c .RI "\fBSbBox3f\fP & \fBsetBounds\fP (const \fBSbBox3i32\fP &box)" .br .ti -1c .RI "void \fBgetBounds\fP (float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax) const" .br .ti -1c .RI "void \fBgetBounds\fP (\fBSbVec3f\fP &minpoint, \fBSbVec3f\fP &maxpoint) const" .br .ti -1c .RI "const \fBSbVec3f\fP & \fBgetMin\fP (void) const" .br .ti -1c .RI "\fBSbVec3f\fP & \fBgetMin\fP (void)" .br .ti -1c .RI "const \fBSbVec3f\fP & \fBgetMax\fP (void) const" .br .ti -1c .RI "\fBSbVec3f\fP & \fBgetMax\fP (void)" .br .ti -1c .RI "void \fBextendBy\fP (const \fBSbVec3f\fP &pt)" .br .ti -1c .RI "void \fBextendBy\fP (const \fBSbBox3f\fP &box)" .br .ti -1c .RI "void \fBtransform\fP (const \fBSbMatrix\fP &matrix)" .br .ti -1c .RI "void \fBmakeEmpty\fP (void)" .br .ti -1c .RI "SbBool \fBisEmpty\fP (void) const" .br .ti -1c .RI "SbBool \fBhasVolume\fP (void) const" .br .ti -1c .RI "float \fBgetVolume\fP (void) const" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbVec3f\fP &pt) const" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbBox3f\fP &box) const" .br .ti -1c .RI "\fBSbVec3f\fP \fBgetClosestPoint\fP (const \fBSbVec3f\fP &point) const" .br .ti -1c .RI "SbBool \fBoutside\fP (const \fBSbMatrix\fP &mvp, int &cullbits) const" .br .ti -1c .RI "\fBSbVec3f\fP \fBgetCenter\fP (void) const" .br .ti -1c .RI "void \fBgetOrigin\fP (float &originX, float &originY, float &originZ) const" .br .ti -1c .RI "void \fBgetSize\fP (float &sizeX, float &sizeY, float &sizeZ) const" .br .ti -1c .RI "\fBSbVec3f\fP \fBgetSize\fP (void) const" .br .ti -1c .RI "void \fBgetSpan\fP (const \fBSbVec3f\fP &dir, float &dmin, float &dmax) const" .br .ti -1c .RI "void \fBprint\fP (FILE *file) const" .br .in -1c .SS "Additional Inherited Members" Related Symbols inherited from \fBSbBox3f\fP .in +1c .ti -1c .RI "int \fBoperator==\fP (const \fBSbBox3f\fP &b1, const \fBSbBox3f\fP &b2)" .br .ti -1c .RI "int \fBoperator!=\fP (const \fBSbBox3f\fP &b1, const \fBSbBox3f\fP &b2)" .br .in -1c .SH "Detailed Description" .PP The \fBSbXfBox3f\fP 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\&. .PP \fBSee also\fP .RS 4 \fBSbBox2s\fP, \fBSbBox2f\fP, \fBSbBox2d\fP, \fBSbBox3s\fP, \fBSbBox3f\fP, \fBSbBox3d\fP, \fBSbMatrix\fP\&. .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SbXfBox3f::SbXfBox3f (void )" The default constructor makes an empty box and identity matrix\&. .SS "SbXfBox3f::SbXfBox3f (const \fBSbVec3f\fP & boxmin, const \fBSbVec3f\fP & boxmax)" Constructs a box with the given corners\&. .PP The coordinates of \fImin\fP should be less than the coordinates of \fImax\fP if you want to make a valid box\&. .SS "SbXfBox3f::SbXfBox3f (const \fBSbBox3f\fP & box)" Constructs a box from the given \fBSbBox3f\fP\&. .PP The transformation is set to the identity matrix\&. .SS "SbXfBox3f::~SbXfBox3f ()" Default destructor does nothing\&. .SH "Member Function Documentation" .PP .SS "void SbXfBox3f::setTransform (const \fBSbMatrix\fP & m)" Sets the transformation to the given \fBSbMatrix\fP\&. .SS "const \fBSbMatrix\fP & SbXfBox3f::getTransform (void ) const" Returns the current transformation matrix\&. .SS "const \fBSbMatrix\fP & SbXfBox3f::getInverse (void ) const" Returns the inverse of the current transformation matrix\&. .SS "\fBSbVec3f\fP SbXfBox3f::getCenter (void ) const" Return the transformed center point of the box\&. .SS "void SbXfBox3f::extendBy (const \fBSbVec3f\fP & 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\&. .PP The point is assumed to be in transformed space\&. .SS "void SbXfBox3f::extendBy (const \fBSbBox3f\fP & bb)" Extend the boundaries of the box by the given \fIbb\fP parameter\&. The given box is assumed to be in transformed space\&. .PP 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 \fBSbXfBox3f\fP will sometimes be flattened before it is combined with \fIbb\fP\&. .SS "void SbXfBox3f::extendBy (const \fBSbXfBox3f\fP & bb)" Extend the boundaries of the box by the given \fIbb\fP parameter\&. .PP The given box is assumed to be in transformed space\&. .PP Note: is not guaranteed to give an optimal result if used for bounding box calculation since the transformation matrix might change\&. See documentation in \fBSoGetBoundingBoxAction\fP for more details\&. .SS "SbBool SbXfBox3f::intersect (const \fBSbVec3f\fP & pt) const" Check if the given point lies within the boundaries of this box\&. .PP The point is assumed to be in transformed space\&. .SS "SbBool SbXfBox3f::intersect (const \fBSbBox3f\fP & bb) const" Check if the given \fIbox\fP lies entirely or partially within the boundaries of this box\&. .PP The given box is assumed to be in transformed space\&. .SS "SbBool SbXfBox3f::intersect (const \fBSbXfBox3f\fP & xfbb) const" Check if two transformed boxes intersect\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2\&.1 API\&. .br .PP \fBSince\fP .RS 4 Coin 2\&.0 .RE .PP .SS "void SbXfBox3f::getSpan (const \fBSbVec3f\fP & 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\&. .SS "\fBSbBox3f\fP SbXfBox3f::project (void ) const" Project the \fBSbXfBox3f\fP into a \fBSbBox3f\fP\&. .PP This gives the same resulting \fBSbBox3f\fP as doing a \fBSbBox3f::transform()\fP with this transformation matrix as parameter\&. .SS "void SbXfBox3f::transform (const \fBSbMatrix\fP & m)" Overridden from \fBSbBox3f\fP, as the transformations are to be kept separate from the box in the \fBSbXfBox3f\fP class\&. .SS "float SbXfBox3f::getVolume (void ) const" Return box volume\&. Overridden from parent class to take into account the possibility of scaling in the transformation matrix\&. .SS "void SbXfBox3f::print (FILE * fp) const" Dump the state of this object to the \fIfp\fP file stream\&. Only works in debug version of library, method does nothing in an optimized build\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.