.TH "SbXfBox3d" 3 "Tue Jun 23 2026 23:48:38" "Version 4.0.10" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SbXfBox3d \- The \fBSbXfBox3d\fP class is a 3 dimensional box with double precision coordinates and an attached transformation\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSbBox3d\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbXfBox3d\fP (void)" .br .ti -1c .RI "\fBSbXfBox3d\fP (const \fBSbVec3d\fP &boxmin, const \fBSbVec3d\fP &boxmax)" .br .ti -1c .RI "\fBSbXfBox3d\fP (const \fBSbBox3d\fP &box)" .br .ti -1c .RI "void \fBsetTransform\fP (const \fBSbDPMatrix\fP &matrix)" .br .ti -1c .RI "const \fBSbDPMatrix\fP & \fBgetTransform\fP (void) const" .br .ti -1c .RI "const \fBSbDPMatrix\fP & \fBgetInverse\fP (void) const" .br .ti -1c .RI "\fBSbVec3d\fP \fBgetCenter\fP (void) const" .br .ti -1c .RI "void \fBextendBy\fP (const \fBSbVec3d\fP &pt)" .br .ti -1c .RI "void \fBextendBy\fP (const \fBSbBox3d\fP &bb)" .br .ti -1c .RI "void \fBextendBy\fP (const \fBSbXfBox3d\fP &bb)" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbVec3d\fP &pt) const" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbBox3d\fP &bb) const" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbXfBox3d\fP &bb) const" .br .ti -1c .RI "\fBSbBox3d\fP \fBproject\fP (void) const" .br .ti -1c .RI "void \fBgetSpan\fP (const \fBSbVec3d\fP &direction, double &dMin, double &dMax) const" .br .ti -1c .RI "void \fBtransform\fP (const \fBSbDPMatrix\fP &matrix)" .br .ti -1c .RI "double \fBgetVolume\fP (void) const" .br .in -1c Public Member Functions inherited from \fBSbBox3d\fP .in +1c .ti -1c .RI "\fBSbBox3d\fP (void)" .br .ti -1c .RI "\fBSbBox3d\fP (double xmin, double ymin, double zmin, double xmax, double ymax, double zmax)" .br .ti -1c .RI "\fBSbBox3d\fP (const \fBSbVec3d\fP &minpoint, const \fBSbVec3d\fP &maxpoint)" .br .ti -1c .RI "\fBSbBox3d\fP (const \fBSbBox3f\fP &box)" .br .ti -1c .RI "\fBSbBox3d\fP (const \fBSbBox3s\fP &box)" .br .ti -1c .RI "\fBSbBox3d\fP (const \fBSbBox3i32\fP &box)" .br .ti -1c .RI "\fBSbBox3d\fP & \fBsetBounds\fP (double xmin, double ymin, double zmin, double xmax, double ymax, double zmax)" .br .ti -1c .RI "\fBSbBox3d\fP & \fBsetBounds\fP (const \fBSbVec3d\fP &minpoint, const \fBSbVec3d\fP &maxpoint)" .br .ti -1c .RI "\fBSbBox3d\fP & \fBsetBounds\fP (const \fBSbBox3f\fP &box)" .br .ti -1c .RI "\fBSbBox3d\fP & \fBsetBounds\fP (const \fBSbBox3s\fP &box)" .br .ti -1c .RI "\fBSbBox3d\fP & \fBsetBounds\fP (const \fBSbBox3i32\fP &box)" .br .ti -1c .RI "void \fBgetBounds\fP (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const" .br .ti -1c .RI "void \fBgetBounds\fP (\fBSbVec3d\fP &minpoint, \fBSbVec3d\fP &maxpoint) const" .br .ti -1c .RI "const \fBSbVec3d\fP & \fBgetMin\fP (void) const" .br .ti -1c .RI "\fBSbVec3d\fP & \fBgetMin\fP (void)" .br .ti -1c .RI "const \fBSbVec3d\fP & \fBgetMax\fP (void) const" .br .ti -1c .RI "\fBSbVec3d\fP & \fBgetMax\fP (void)" .br .ti -1c .RI "void \fBextendBy\fP (const \fBSbVec3d\fP &pt)" .br .ti -1c .RI "void \fBextendBy\fP (const \fBSbBox3d\fP &box)" .br .ti -1c .RI "void \fBtransform\fP (const \fBSbDPMatrix\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 "double \fBgetVolume\fP (void) const" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbVec3d\fP &point) const" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbBox3d\fP &box) const" .br .ti -1c .RI "\fBSbVec3d\fP \fBgetClosestPoint\fP (const \fBSbVec3d\fP &point) const" .br .ti -1c .RI "SbBool \fBoutside\fP (const \fBSbDPMatrix\fP &mvp, int &cullbits) const" .br .ti -1c .RI "\fBSbVec3d\fP \fBgetCenter\fP (void) const" .br .ti -1c .RI "void \fBgetOrigin\fP (double &origoX, double &origoY, double &origoZ) const" .br .ti -1c .RI "void \fBgetSize\fP (double &sizeX, double &sizeY, double &sizeZ) const" .br .ti -1c .RI "\fBSbVec3d\fP \fBgetSize\fP (void) const" .br .ti -1c .RI "void \fBgetSpan\fP (const \fBSbVec3d\fP &dir, double &dmin, double &dmax) const" .br .ti -1c .RI "void \fBprint\fP (FILE *file) const" .br .in -1c .SS "Additional Inherited Members" Protected Attributes inherited from \fBSbBox3d\fP .in +1c .ti -1c .RI "\fBSbVec3d\fP \fBminpt\fP" .br .ti -1c .RI "\fBSbVec3d\fP \fBmaxpt\fP" .br .in -1c Related Symbols inherited from \fBSbBox3d\fP .in +1c .ti -1c .RI "int \fBoperator==\fP (const \fBSbBox3d\fP &b1, const \fBSbBox3d\fP &b2)" .br .ti -1c .RI "int \fBoperator!=\fP (const \fBSbBox3d\fP &b1, const \fBSbBox3d\fP &b2)" .br .in -1c .SH "Detailed Description" .PP The \fBSbXfBox3d\fP 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\&. .PP \fBSee also\fP .RS 4 \fBSbBox3d\fP, \fBSbDPMatrix\fP, \fBSbXfBox3f\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SbXfBox3d::SbXfBox3d (void )" The default constructor makes an empty box and identity matrix\&. .SS "SbXfBox3d::SbXfBox3d (const \fBSbVec3d\fP & boxmin, const \fBSbVec3d\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 "SbXfBox3d::SbXfBox3d (const \fBSbBox3d\fP & box)" Constructs a box from the given \fBSbBox3d\fP\&. .PP The transformation is set to the identity matrix\&. .SH "Member Function Documentation" .PP .SS "void SbXfBox3d::setTransform (const \fBSbDPMatrix\fP & m)" Sets the transformation to the given \fBSbMatrix\fP\&. .SS "const \fBSbDPMatrix\fP & SbXfBox3d::getTransform (void ) const\fR [inline]\fP" Returns the current transformation matrix\&. .SS "const \fBSbDPMatrix\fP & SbXfBox3d::getInverse (void ) const" Returns the inverse of the current transformation matrix\&. .SS "\fBSbVec3d\fP SbXfBox3d::getCenter (void ) const" Return the transformed center point of the box\&. .SS "void SbXfBox3d::extendBy (const \fBSbVec3d\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 SbXfBox3d::extendBy (const \fBSbBox3d\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 SbXfBox3d::extendBy (const \fBSbXfBox3d\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 SbXfBox3d::intersect (const \fBSbVec3d\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 SbXfBox3d::intersect (const \fBSbBox3d\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 SbXfBox3d::intersect (const \fBSbXfBox3d\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 "\fBSbBox3d\fP SbXfBox3d::project (void ) const" Project the \fBSbXfBox3d\fP into a \fBSbBox3d\fP\&. .PP This gives the same resulting \fBSbBox3d\fP as doing a \fBSbBox3d::transform()\fP with this transformation matrix as parameter\&. .SS "void SbXfBox3d::getSpan (const \fBSbVec3d\fP & 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\&. .SS "void SbXfBox3d::transform (const \fBSbDPMatrix\fP & m)" Overridden from \fBSbBox3d\fP, as the transformations are to be kept separate from the box in the \fBSbXfBox3d\fP class\&. .SS "double SbXfBox3d::getVolume (void ) const" Return box volume\&. Overridden from parent class to take into account the possibility of scaling in the transformation matrix\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.