.TH "SbXfBox3f" 3 "Tue Dec 26 2023 17:59:22" "Version 4.0.2" "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 \fC#include \fP .PP Inherits \fBSbBox3f\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbXfBox3f\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSbXfBox3f\fP (\fBconst\fP \fBSbVec3f\fP &\fBboxmin\fP, \fBconst\fP \fBSbVec3f\fP &\fBboxmax\fP)" .br .ti -1c .RI "\fBSbXfBox3f\fP (\fBconst\fP \fBSbBox3f\fP &\fBbox\fP)" .br .ti -1c .RI "\fB~SbXfBox3f\fP ()" .br .ti -1c .RI "\fBvoid\fP \fBsetTransform\fP (\fBconst\fP \fBSbMatrix\fP &\fBm\fP)" .br .ti -1c .RI "\fBconst\fP \fBSbMatrix\fP & \fBgetTransform\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbMatrix\fP & \fBgetInverse\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3f\fP \fBgetCenter\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBextendBy\fP (\fBconst\fP \fBSbVec3f\fP &\fBpt\fP)" .br .ti -1c .RI "\fBvoid\fP \fBextendBy\fP (\fBconst\fP \fBSbBox3f\fP &\fBbb\fP)" .br .ti -1c .RI "\fBvoid\fP \fBextendBy\fP (\fBconst\fP \fBSbXfBox3f\fP &\fBbb\fP)" .br .ti -1c .RI "SbBool \fBintersect\fP (\fBconst\fP \fBSbVec3f\fP &\fBpt\fP) \fBconst\fP" .br .ti -1c .RI "SbBool \fBintersect\fP (\fBconst\fP \fBSbBox3f\fP &\fBbb\fP) \fBconst\fP" .br .ti -1c .RI "SbBool \fBintersect\fP (\fBconst\fP \fBSbXfBox3f\fP &\fBbb\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBgetSpan\fP (\fBconst\fP \fBSbVec3f\fP &direction, float &\fBdMin\fP, float &\fBdMax\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbBox3f\fP \fBproject\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBtransform\fP (\fBconst\fP \fBSbMatrix\fP &\fBm\fP)" .br .ti -1c .RI "float \fBgetVolume\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBprint\fP (\fBFILE\fP *\fBfile\fP) \fBconst\fP" .br .in -1c Public Member Functions inherited from \fBSbBox3f\fP .in +1c .ti -1c .RI "\fBSbBox3f\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSbBox3f\fP (float \fBxmin\fP, float ymin, float \fBzmin\fP, float \fBxmax\fP, float ymax, float \fBzmax\fP)" .br .ti -1c .RI "\fBSbBox3f\fP (\fBconst\fP \fBSbVec3f\fP &\fBminpoint\fP, \fBconst\fP \fBSbVec3f\fP &\fBmaxpoint\fP)" .br .ti -1c .RI "\fBSbBox3f\fP (\fBconst\fP \fBSbBox3d\fP &\fBbox\fP)" .br .ti -1c .RI "\fBSbBox3f\fP (\fBconst\fP \fBSbBox3s\fP &\fBbox\fP)" .br .ti -1c .RI "\fBSbBox3f\fP (\fBconst\fP \fBSbBox3i32\fP &\fBbox\fP)" .br .ti -1c .RI "\fBSbBox3f\fP & \fBsetBounds\fP (float \fBxmin\fP, float ymin, float \fBzmin\fP, float \fBxmax\fP, float ymax, float \fBzmax\fP)" .br .ti -1c .RI "\fBSbBox3f\fP & \fBsetBounds\fP (\fBconst\fP \fBSbVec3f\fP &\fBminpoint\fP, \fBconst\fP \fBSbVec3f\fP &\fBmaxpoint\fP)" .br .ti -1c .RI "\fBSbBox3f\fP & \fBsetBounds\fP (\fBconst\fP \fBSbBox3d\fP &\fBbox\fP)" .br .ti -1c .RI "\fBSbBox3f\fP & \fBsetBounds\fP (\fBconst\fP \fBSbBox3s\fP &\fBbox\fP)" .br .ti -1c .RI "\fBSbBox3f\fP & \fBsetBounds\fP (\fBconst\fP \fBSbBox3i32\fP &\fBbox\fP)" .br .ti -1c .RI "\fBvoid\fP \fBgetBounds\fP (float &\fBxmin\fP, float &ymin, float &\fBzmin\fP, float &\fBxmax\fP, float &ymax, float &\fBzmax\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBgetBounds\fP (\fBSbVec3f\fP &\fBminpoint\fP, \fBSbVec3f\fP &\fBmaxpoint\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec3f\fP & \fBgetMin\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3f\fP & \fBgetMin\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBconst\fP \fBSbVec3f\fP & \fBgetMax\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3f\fP & \fBgetMax\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBextendBy\fP (\fBconst\fP \fBSbVec3f\fP &\fBpt\fP)" .br .ti -1c .RI "\fBvoid\fP \fBextendBy\fP (\fBconst\fP \fBSbBox3f\fP &\fBbox\fP)" .br .ti -1c .RI "\fBvoid\fP \fBtransform\fP (\fBconst\fP \fBSbMatrix\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 "float \fBgetVolume\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "SbBool \fBintersect\fP (\fBconst\fP \fBSbVec3f\fP &\fBpt\fP) \fBconst\fP" .br .ti -1c .RI "SbBool \fBintersect\fP (\fBconst\fP \fBSbBox3f\fP &\fBbox\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3f\fP \fBgetClosestPoint\fP (\fBconst\fP \fBSbVec3f\fP &point) \fBconst\fP" .br .ti -1c .RI "SbBool \fBoutside\fP (\fBconst\fP \fBSbMatrix\fP &\fBmvp\fP, int &\fBcullbits\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3f\fP \fBgetCenter\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBgetOrigin\fP (float &\fBoriginX\fP, float &\fBoriginY\fP, float &\fBoriginZ\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBgetSize\fP (float &\fBsizeX\fP, float &\fBsizeY\fP, float &\fBsizeZ\fP) \fBconst\fP" .br .ti -1c .RI "\fBSbVec3f\fP \fBgetSize\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBgetSpan\fP (\fBconst\fP \fBSbVec3f\fP &dir, float &\fBdmin\fP, float &\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" Related Symbols inherited from \fBSbBox3f\fP .in +1c .ti -1c .RI "int \fBoperator==\fP (\fBconst\fP \fBSbBox3f\fP &\fBb1\fP, \fBconst\fP \fBSbBox3f\fP &\fBb2\fP)" .br .ti -1c .RI "int \fBoperator!=\fP (\fBconst\fP \fBSbBox3f\fP &\fBb1\fP, \fBconst\fP \fBSbBox3f\fP &\fBb2\fP)" .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 (\fBvoid\fP)" The default constructor makes an empty box and identity matrix\&. .SS "SbXfBox3f::SbXfBox3f (\fBconst\fP \fBSbVec3f\fP & boxmin, \fBconst\fP \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 (\fBconst\fP \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 "\fBvoid\fP SbXfBox3f::setTransform (\fBconst\fP \fBSbMatrix\fP & m)" Sets the transformation to the given \fBSbMatrix\fP\&. .SS "\fBconst\fP \fBSbMatrix\fP & SbXfBox3f::getTransform (\fBvoid\fP) const" Returns the current transformation matrix\&. .SS "\fBconst\fP \fBSbMatrix\fP & SbXfBox3f::getInverse (\fBvoid\fP) const" Returns the inverse of the current transformation matrix\&. .SS "\fBSbVec3f\fP SbXfBox3f::getCenter (\fBvoid\fP) const" Return the transformed center point of the box\&. .SS "\fBvoid\fP SbXfBox3f::extendBy (\fBconst\fP \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 "\fBvoid\fP SbXfBox3f::extendBy (\fBconst\fP \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 "\fBvoid\fP SbXfBox3f::extendBy (\fBconst\fP \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 (\fBconst\fP \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 (\fBconst\fP \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 (\fBconst\fP \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 \fBv2\&.1\fP API\&. .br .PP \fBSince\fP .RS 4 Coin \fB2\&.0\fP .RE .PP .SS "\fBvoid\fP SbXfBox3f::getSpan (\fBconst\fP \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 (\fBvoid\fP) 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 "\fBvoid\fP SbXfBox3f::transform (\fBconst\fP \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 (\fBvoid\fP) const" Return box volume\&. Overridden from parent class to take into account the possibility of scaling in the transformation matrix\&. .SS "\fBvoid\fP SbXfBox3f::print (\fBFILE\fP * 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\&.