#include <Inventor/SbBox.h>
Inheritance diagram for SbXfBox3f::
Public Methods | |
SbXfBox3f () | |
SbXfBox3f (const SbVec3f &_min, const SbVec3f &_max) | |
SbXfBox3f (const SbBox3f &box) | |
~SbXfBox3f () | |
void | setTransform (const SbMatrix &m) |
const SbMatrix & | getTransform () const |
const SbMatrix & | getInverse () const |
SbVec3f | getCenter () const |
void | extendBy (const SbVec3f &pt) |
void | extendBy (const SbBox3f &bb) |
void | extendBy (const SbXfBox3f &bb) |
SbBool | intersect (const SbVec3f &pt) const |
SbBool | intersect (const SbBox3f &bb) const |
void | getSpan (const SbVec3f &direction, float &dMin, float &dMax) const |
SbBox3f | project () const |
void | transform (const SbMatrix &m) |
float | getVolume (void) const |
void | print (FILE *file) const |
Friends | |
COIN_DLL_API int | operator== (const SbXfBox3f &b1, const SbXfBox3f &b2) |
COIN_DLL_API int | operator!= (const SbXfBox3f &b1, const SbXfBox3f &b2) |
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.
|
The default constructor makes an empty box and identity matrix. |
|
Constructs a box with the given corners. The coordinates of min should be less than the coordinates of max if you want to make a valid box. |
|
Constructs a box from the given SbBox3f. The transformation is set to the identity matrix. |
|
Default destructor does nothing. |
|
Sets the transformation to the given SbMatrix. |
|
Returns the current transformation matrix. |
|
Returns the inverse of the current transformation matrix. |
|
Return the transformed center point of the box. Reimplemented from SbBox3f. |
|
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. Reimplemented from SbBox3f. |
|
Extend the boundaries of the box by the given bb parameter. 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 this SbXfBox3f will sometimes be flattened before it's combined with bb. Reimplemented from SbBox3f. |
|
Extend the boundaries of the box by the given bb parameter. The given box is assumed to be in transformed space. |
|
Check if the given point lies within the boundaries of this box. The point is assumed to be in transformed space. Reimplemented from SbBox3f. |
|
Check if the given box lies wholly or partly within the boundaries of this box. The given box is assumed to be in transformed space. Reimplemented from SbBox3f. |
|
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. Reimplemented from SbBox3f. |
|
Project the SbXfBox3f into a SbBox3f. This gives the same resulting SbBox3f as doing a SbBox3f::transform() with this transformation matrix as parameter. |
|
Overloaded from SbBox3f, as the transformations are to be kept separate from the box in the SbXfBox3f class. Reimplemented from SbBox3f. |
|
Return box volume. Overloaded from parent class to take into account the possibility of scaling in the transformation matrix. Reimplemented from SbBox3f. |
|
Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile. Reimplemented from SbBox3f. |
|
Check if b1 and b2 are 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. |
|
Check if b1 and b2 are unequal. Return 0 if they are equal, or 1 if they are unequal. See the note on operator==. |