![]() |
http://www.sim.no http://www.coin3d.org |
The SbXfBox3d class is a 3 dimensional box with double precision coordinates and an attached transformation. More...
#include <Inventor/SbBox.h>
Additional Inherited Members | |
![]() | |
SbVec3d | minpt |
SbVec3d | maxpt |
![]() | |
int | operator== (const SbBox3d &b1, const SbBox3d &b2) |
int | operator!= (const SbBox3d &b1, const SbBox3d &b2) |
The SbXfBox3d 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.
SbXfBox3d::SbXfBox3d | ( | void | ) |
The default constructor makes an empty box and identity matrix.
References SbDPMatrix::makeIdentity().
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.
References SbDPMatrix::makeIdentity().
Constructs a box from the given SbBox3d.
The transformation is set to the identity matrix.
References SbDPMatrix::makeIdentity().
void SbXfBox3d::setTransform | ( | const SbDPMatrix & | m | ) |
Sets the transformation to the given SbMatrix.
Referenced by transform().
|
inline |
Returns the current transformation matrix.
Referenced by extendBy().
const SbDPMatrix & SbXfBox3d::getInverse | ( | void | ) | const |
Returns the inverse of the current transformation matrix.
Referenced by extendBy(), and extendBy().
Return the transformed center point of the box.
References SbBox3d::getCenter(), and SbDPMatrix::multVecMatrix().
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.
References SbBox3d::extendBy(), getInverse(), SbBox3d::isEmpty(), and SbDPMatrix::makeIdentity().
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.
References getInverse(), SbBox3d::getMin(), SbBox3d::isEmpty(), SbDPMatrix::makeIdentity(), SoDebugError::postInfo(), SoDebugError::postWarning(), project(), and SbBox3d::setBounds().
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 bbox calculation since the transformation matrix might change. See documentation in SoGetBoundingBoxAction for more details.
References getTransform(), SbBox3d::isEmpty(), SbDPMatrix::multRight(), SoDebugError::postInfo(), and SoDebugError::postWarning().
Check if the given point lies within the boundaries of this box.
The point is assumed to be in transformed space.
References SbBox3d::intersect(), and SbDPMatrix::multVecMatrix().
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.
References SbDPMatrix::identity(), SbBox3d::intersect(), SbBox3d::isEmpty(), and SoDebugError::postWarning().
Project the SbXfBox3d into a SbBox3d.
This gives the same resulting SbBox3d as doing a SbBox3d::transform() with this transformation matrix as parameter.
Referenced by extendBy(), and getSpan().
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.
References SbBox3d::getSpan(), and project().
void SbXfBox3d::transform | ( | const SbDPMatrix & | m | ) |
Overridden from SbBox3d, as the transformations are to be kept separate from the box in the SbXfBox3d class.
References SbDPMatrix::multRight(), and setTransform().
double SbXfBox3d::getVolume | ( | void | ) | const |
Return box volume. Overridden from parent class to take into account the possibility of scaling in the transformation matrix.
References SbDPMatrix::det3(), SbBox3d::getVolume(), and SbBox3d::hasVolume().
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Wed Jul 19 2023 for Coin by Doxygen. 1.9.8