Coin
4.0.3
Coin3D core library
|
The SbXfBox3f class is a 3 dimensional box with floating point coordinates and an attached transformation. More...
#include <Inventor/SbXfBox3f.h>
Additional Inherited Members | |
Related Symbols inherited from SbBox3f | |
int | operator!= (const SbBox3f &b1, const SbBox3f &b2) |
int | operator== (const SbBox3f &b1, const SbBox3f &b2) |
The SbXfBox3f 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.
SbXfBox3f::SbXfBox3f | ( | void | ) |
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.
SbXfBox3f::~SbXfBox3f | ( | ) |
Default destructor does nothing.
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 is combined with bb.
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.
Extend the boundaries of the box by the given bb parameter.
The given box is assumed to be in transformed space.
Note: is not guaranteed to give an optimal result if used for bounding box calculation since the transformation matrix might change. See documentation in SoGetBoundingBoxAction for more details.
Returns the inverse of the current transformation matrix.
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.
float SbXfBox3f::getVolume | ( | void | ) | const |
Return box volume. Overridden from parent class to take into account the possibility of scaling in the transformation matrix.
Check if the given box lies entirely or partially within the boundaries of this box.
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.
Dump the state of this object to the fp file stream. Only works in debug version of library, method does nothing in an optimized build.
Project the SbXfBox3f into a SbBox3f.
This gives the same resulting SbBox3f as doing a SbBox3f::transform() with this transformation matrix as parameter.