.TH "SbXfBox3d" 3 "Tue Dec 26 2023 17:59:22" "Version 4.0.2" "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 \fC#include \fP .PP Inherits \fBSbBox3d\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbXfBox3d\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSbXfBox3d\fP (\fBconst\fP \fBSbVec3d\fP &\fBboxmin\fP, \fBconst\fP \fBSbVec3d\fP &\fBboxmax\fP)" .br .ti -1c .RI "\fBSbXfBox3d\fP (\fBconst\fP \fBSbBox3d\fP &\fBbox\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetTransform\fP (\fBconst\fP \fBSbDPMatrix\fP &matrix)" .br .ti -1c .RI "\fBconst\fP \fBSbDPMatrix\fP & \fBgetTransform\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbDPMatrix\fP & \fBgetInverse\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3d\fP \fBgetCenter\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBextendBy\fP (\fBconst\fP \fBSbVec3d\fP &\fBpt\fP)" .br .ti -1c .RI "\fBvoid\fP \fBextendBy\fP (\fBconst\fP \fBSbBox3d\fP &\fBbb\fP)" .br .ti -1c .RI "\fBvoid\fP \fBextendBy\fP (\fBconst\fP \fBSbXfBox3d\fP &\fBbb\fP)" .br .ti -1c .RI "SbBool \fBintersect\fP (\fBconst\fP \fBSbVec3d\fP &\fBpt\fP) \fBconst\fP" .br .ti -1c .RI "SbBool \fBintersect\fP (\fBconst\fP \fBSbBox3d\fP &\fBbb\fP) \fBconst\fP" .br .ti -1c .RI "SbBool \fBintersect\fP (\fBconst\fP \fBSbXfBox3d\fP &\fBbb\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbBox3d\fP \fBproject\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBgetSpan\fP (\fBconst\fP \fBSbVec3d\fP &direction, double &\fBdMin\fP, double &\fBdMax\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBtransform\fP (\fBconst\fP \fBSbDPMatrix\fP &matrix)" .br .ti -1c .RI "double \fBgetVolume\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c Public Member Functions inherited from \fBSbBox3d\fP .in +1c .ti -1c .RI "\fBSbBox3d\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSbBox3d\fP (double \fBxmin\fP, double ymin, double \fBzmin\fP, double \fBxmax\fP, double ymax, double \fBzmax\fP)" .br .ti -1c .RI "\fBSbBox3d\fP (\fBconst\fP \fBSbVec3d\fP &\fBminpoint\fP, \fBconst\fP \fBSbVec3d\fP &\fBmaxpoint\fP)" .br .ti -1c .RI "\fBSbBox3d\fP (\fBconst\fP \fBSbBox3f\fP &\fBbox\fP)" .br .ti -1c .RI "\fBSbBox3d\fP (\fBconst\fP \fBSbBox3s\fP &\fBbox\fP)" .br .ti -1c .RI "\fBSbBox3d\fP (\fBconst\fP \fBSbBox3i32\fP &\fBbox\fP)" .br .ti -1c .RI "\fBSbBox3d\fP & \fBsetBounds\fP (double \fBxmin\fP, double ymin, double \fBzmin\fP, double \fBxmax\fP, double ymax, double \fBzmax\fP)" .br .ti -1c .RI "\fBSbBox3d\fP & \fBsetBounds\fP (\fBconst\fP \fBSbVec3d\fP &\fBminpoint\fP, \fBconst\fP \fBSbVec3d\fP &\fBmaxpoint\fP)" .br .ti -1c .RI "\fBSbBox3d\fP & \fBsetBounds\fP (\fBconst\fP \fBSbBox3f\fP &\fBbox\fP)" .br .ti -1c .RI "\fBSbBox3d\fP & \fBsetBounds\fP (\fBconst\fP \fBSbBox3s\fP &\fBbox\fP)" .br .ti -1c .RI "\fBSbBox3d\fP & \fBsetBounds\fP (\fBconst\fP \fBSbBox3i32\fP &\fBbox\fP)" .br .ti -1c .RI "\fBvoid\fP \fBgetBounds\fP (double &\fBxmin\fP, double &ymin, double &\fBzmin\fP, double &\fBxmax\fP, double &ymax, double &\fBzmax\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBgetBounds\fP (\fBSbVec3d\fP &\fBminpoint\fP, \fBSbVec3d\fP &\fBmaxpoint\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec3d\fP & \fBgetMin\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3d\fP & \fBgetMin\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBconst\fP \fBSbVec3d\fP & \fBgetMax\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3d\fP & \fBgetMax\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBextendBy\fP (\fBconst\fP \fBSbVec3d\fP &\fBpt\fP)" .br .ti -1c .RI "\fBvoid\fP \fBextendBy\fP (\fBconst\fP \fBSbBox3d\fP &\fBbox\fP)" .br .ti -1c .RI "\fBvoid\fP \fBtransform\fP (\fBconst\fP \fBSbDPMatrix\fP &matrix)" .br .ti -1c .RI "\fBvoid\fP \fBmakeEmpty\fP (\fBvoid\fP)" .br .ti -1c .RI "SbBool \fBisEmpty\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "SbBool \fBhasVolume\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "double \fBgetVolume\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "SbBool \fBintersect\fP (\fBconst\fP \fBSbVec3d\fP &point) \fBconst\fP" .br .ti -1c .RI "SbBool \fBintersect\fP (\fBconst\fP \fBSbBox3d\fP &\fBbox\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3d\fP \fBgetClosestPoint\fP (\fBconst\fP \fBSbVec3d\fP &point) \fBconst\fP" .br .ti -1c .RI "SbBool \fBoutside\fP (\fBconst\fP \fBSbDPMatrix\fP &\fBmvp\fP, int &\fBcullbits\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3d\fP \fBgetCenter\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBgetOrigin\fP (double &\fBorigoX\fP, double &\fBorigoY\fP, double &\fBorigoZ\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBgetSize\fP (double &\fBsizeX\fP, double &\fBsizeY\fP, double &\fBsizeZ\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3d\fP \fBgetSize\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBgetSpan\fP (\fBconst\fP \fBSbVec3d\fP &dir, double &\fBdmin\fP, double &\fBdmax\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBprint\fP (\fBFILE\fP *\fBfile\fP) \fBconst\fP" .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 (\fBconst\fP \fBSbBox3d\fP &\fBb1\fP, \fBconst\fP \fBSbBox3d\fP &\fBb2\fP)" .br .ti -1c .RI "int \fBoperator!=\fP (\fBconst\fP \fBSbBox3d\fP &\fBb1\fP, \fBconst\fP \fBSbBox3d\fP &\fBb2\fP)" .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 (\fBvoid\fP)" The default constructor makes an empty box and identity matrix\&. .SS "SbXfBox3d::SbXfBox3d (\fBconst\fP \fBSbVec3d\fP & boxmin, \fBconst\fP \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 (\fBconst\fP \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 "\fBvoid\fP SbXfBox3d::setTransform (\fBconst\fP \fBSbDPMatrix\fP & m)" Sets the transformation to the given \fBSbMatrix\fP\&. .SS "\fBconst\fP \fBSbDPMatrix\fP & SbXfBox3d::getTransform (\fBvoid\fP) const\fC [inline]\fP" Returns the current transformation matrix\&. .SS "\fBconst\fP \fBSbDPMatrix\fP & SbXfBox3d::getInverse (\fBvoid\fP) const" Returns the inverse of the current transformation matrix\&. .SS "\fBSbVec3d\fP SbXfBox3d::getCenter (\fBvoid\fP) const" Return the transformed center point of the box\&. .SS "\fBvoid\fP SbXfBox3d::extendBy (\fBconst\fP \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 "\fBvoid\fP SbXfBox3d::extendBy (\fBconst\fP \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 "\fBvoid\fP SbXfBox3d::extendBy (\fBconst\fP \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 (\fBconst\fP \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 (\fBconst\fP \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 (\fBconst\fP \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 \fBv2\&.1\fP API\&. .br .PP \fBSince\fP .RS 4 Coin \fB2\&.0\fP .RE .PP .SS "\fBSbBox3d\fP SbXfBox3d::project (\fBvoid\fP) 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 "\fBvoid\fP SbXfBox3d::getSpan (\fBconst\fP \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 "\fBvoid\fP SbXfBox3d::transform (\fBconst\fP \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 (\fBvoid\fP) 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\&.