Provided by: libcoin80-doc_3.1.4~abc9f50-4ubuntu2_all

**NAME**

SbXfBox3f - TheSbXfBox3fclass 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.

**SYNOPSIS**

InheritsSbBox3f.PublicMemberFunctionsSbXfBox3f(void)SbXfBox3f(constSbVec3f&boxmin, constSbVec3f&boxmax)SbXfBox3f(constSbBox3f&box)~SbXfBox3f() voidsetTransform(constSbMatrix&m) constSbMatrix&getTransform(void) const constSbMatrix&getInverse(void) constSbVec3fgetCenter(void) const voidextendBy(constSbVec3f&pt) voidextendBy(constSbBox3f&bb) voidextendBy(constSbXfBox3f&bb) SbBoolintersect(constSbVec3f&pt) const SbBoolintersect(constSbBox3f&bb) const SbBoolintersect(constSbXfBox3f&bb) const voidgetSpan(constSbVec3f&direction, float &dMin, float &dMax) constSbBox3fproject(void) const voidtransform(constSbMatrix&m) floatgetVolume(void) const voidFriendsintoperator==(constSbXfBox3f&b1, constSbXfBox3f&b2) intoperator!=(constSbXfBox3f&b1, constSbXfBox3f&b2)AdditionalInheritedMembers

**Detailed** **Description**

TheSbXfBox3fclass 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.SeeAlso:SbBox2s,SbBox2f,SbBox2d,SbBox3s,SbBox3f,SbBox3d,SbMatrix.

**Constructor** **&** **Destructor** **Documentation**

SbXfBox3f::SbXfBox3f(void)The default constructor makes an empty box and identity matrix.SbXfBox3f::SbXfBox3f(constSbVec3f&boxmin,constSbVec3f&boxmax)Constructs a box with the given corners. The coordinates ofminshould be less than the coordinates ofmaxif you want to make a valid box.SbXfBox3f::SbXfBox3f(constSbBox3f&box)Constructs a box from the givenSbBox3f. The transformation is set to the identity matrix.SbXfBox3f::~SbXfBox3f()Default destructor does nothing.

**Member** **Function** **Documentation**

voidSbXfBox3f::setTransform(constSbMatrix&m)Sets the transformation to the givenSbMatrix.constSbMatrix&SbXfBox3f::getTransform(void)constReturns the current transformation matrix.constSbMatrix&SbXfBox3f::getInverse(void)constReturns the inverse of the current transformation matrix.SbVec3fSbXfBox3f::getCenter(void)constReturn the transformed center point of the box.voidSbXfBox3f::extendBy(constSbVec3f&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. The point is assumed to be in transformed space.voidSbXfBox3f::extendBy(constSbBox3f&bb)Extend the boundaries of the box by the givenbbparameter. 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 thisSbXfBox3fwill sometimes be flattened before it's combined withbb.voidSbXfBox3f::extendBy(constSbXfBox3f&bb)Extend the boundaries of the box by the givenbbparameter. 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 inSoGetBoundingBoxActionfor more details.SbBoolSbXfBox3f::intersect(constSbVec3f&pt)constCheck if the given point lies within the boundaries of this box. The point is assumed to be in transformed space.SbBoolSbXfBox3f::intersect(constSbBox3f&bb)constCheck if the givenboxlies wholly or partly within the boundaries of this box. The given box is assumed to be in transformed space.SbBoolSbXfBox3f::intersect(constSbXfBox3f&xfbb)constCheck 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.Since:Coin 2.0voidSbXfBox3f::getSpan(constSbVec3f&direction,float&dMin,float&dMax)constFind 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.SbBox3fSbXfBox3f::project(void)constProject theSbXfBox3finto aSbBox3f. This gives the same resultingSbBox3fas doing aSbBox3f::transform()with this transformation matrix as parameter.voidSbXfBox3f::transform(constSbMatrix&m)Overridden fromSbBox3f, as the transformations are to be kept separate from the box in theSbXfBox3fclass.floatSbXfBox3f::getVolume(void)constReturn box volume. Overridden from parent class to take into account the possibility of scaling in the transformation matrix.voidSbXfBox3f::print(FILE*fp)constDump the state of this object to thefilestream. Only works in debug version of library, method does nothing in an optimized compile.

**Friends** **And** **Related** **Function** **Documentation**

intoperator==(constSbXfBox3f&b1,constSbXfBox3f&b2)[friend]Check ifb1andb2are equal. Return 1 if they are equal, or 0 if they are unequal. Note that the method will do a dumb component by component comparison.intoperator!=(constSbXfBox3f&b1,constSbXfBox3f&b2)[friend]Check ifb1andb2are unequal. Return 0 if they are equal, or 1 if they are unequal. See the note onoperator==().

**Author**

Generated automatically by Doxygen for Coin from the source code.