SbXfBox3f(3IV)NAMESbXfBox3f (SbXfBox3f) - 3D box with an associated transformation matrix
INHERITS FROM
SbBox3f > SbXfBox3fSYNOPSIS
#include <Inventor_c/SbBox.h>
Functions from class SbXfBox3f:
SbXfBox3f * SbXfBox3fCreate()SbXfBox3f * SbXfBox3fCreateMinMax(const SbVec3f *_min, const
SbVec3f *_max)
SbXfBox3f * SbXfBox3fCreateBox3f(const SbBox3f *box)
void SbXfBox3fDelete(SbXfBox3f *this)
void SbXfBox3fSetXf(SbXfBox3f *this, const SbMatrix *m)
const SbMatrix * SbXfBox3fGetTransform(const SbXfBox3f *this)
const SbMatrix * SbXfBox3fGetInverse(const SbXfBox3f *this)
SbVec3f SbXfBox3fGetCenter(const SbXfBox3f *this)
void SbXfBox3fExtendByPt(SbXfBox3f *this, const SbVec3f
*pt)
void SbXfBox3fExtendByBox(SbXfBox3f *this, const SbBox3f
*bb)
void SbXfBox3fExtendByXfBox(SbXfBox3f *this, const
SbXfBox3f *bb)
SbBool SbXfBox3fIntersectPt(const SbXfBox3f *this, const
SbVec3f *pt)
SbBool SbXfBox3fIntersectBox(const SbXfBox3f *this, const
SbBox3f *bb)
void SbXfBox3fSetBounds(SbXfBox3f *this, float xmin, float
ymin, float zmin, float xmax, float ymax, float
zmax)
void SbXfBox3fSetBoundsMinMax(SbXfBox3f *this, const
SbVec3f *_min, const SbVec3f *_max)
void SbXfBox3fGetBounds(const SbXfBox3f *this, float
*xmin, float *ymin, float *zmin, float *xmax,
float *ymax, float *zmax)
void SbXfBox3fGetBoundsMinMax(const SbXfBox3f *this,
SbVec3f *_min, SbVec3f *_max)
void SbXfBox3fGetOrigin(SbXfBox3f *this, float *originX,
float *originY, float *originZ)
void SbXfBox3fGetSize(SbXfBox3f *this, float *sizeX, float
*sizeY, float *sizeZ)
float SbXfBox3fGetVol(const SbXfBox3f *this)
void SbXfBox3fMakeEmpty(SbXfBox3f *this)
SbBool SbXfBox3fIsEmpty(const SbXfBox3f *this)
SbBool SbXfBox3fHasVol(const SbXfBox3f *this)
void SbXfBox3fGetSpan(const SbXfBox3f *this, const SbVec3f
*direction, float *dMin, float *dMax)
void SbXfBox3fXf(SbXfBox3f *this, const SbMatrix *m)
Page 1SbXfBox3f(3IV)
SbBox3f SbXfBox3fProject(const SbXfBox3f *this)
int SbXfBox3fIsEq(SbXfBox3f *this, const SbXfBox3f *b1,
const SbXfBox3f *b2)
int SbXfBox3fIsNEq(SbXfBox3f *this, const SbXfBox3f *b1,
const SbXfBox3f *b2)
Functions from class SbBox3f:
const SbVec3f * SbXfBox3fGetMinConst(SbXfBox3f *this)
const SbVec3f * SbXfBox3fGetMaxConst(SbXfBox3f *this)
DESCRIPTION
A 3D box with an arbitrary transformation applied. This class is useful
when a box will be transformed frequently; if an SbBox3f is used for this
purpose it will expand each time it is transformed in order to keep
itself axis-aligned. Transformations can be accumulated on an SbXfBox3f
without expanding the box, and after all transformations have been done,
the box can be expanded to an axis-aligned box if necessary.
FUNCTIONSSbXfBox3f * SbXfBox3fCreate()SbXfBox3f * SbXfBox3fCreateMinMax(const SbVec3f *_min, const
SbVec3f *_max)
SbXfBox3f * SbXfBox3fCreateBox3f(const SbBox3f *box)
void SbXfBox3fDelete(SbXfBox3f *this)
Constructors and destructor.
void SbXfBox3fSetXf(SbXfBox3f *this, const SbMatrix *m)
Sets the transformation on the box.
const SbMatrix * SbXfBox3fGetTransform(const SbXfBox3f *this)
const SbMatrix * SbXfBox3fGetInverse(const SbXfBox3f *this)
Gets the transformation on the box, and its inverse.
SbVec3f SbXfBox3fGetCenter(const SbXfBox3f *this)
Returns the center of the box.
void SbXfBox3fExtendByPt(SbXfBox3f *this, const SbVec3f
*pt)
Extends the box (if necessary) to contain the given 3D point. If the
box has had a non-identity transformation applied using the
setTransform() method, the point is assumed to be in the transformed
space. For example, the following code sequence:
SbXfBox3f bbox; bbox.extendBy(SbVec3f(0,0,0));
SbMatrix trans; trans.setTranslate(SbVec3f(1,1,1));
bbox.setTransform(trans);
bbox.extendBy(SbVec3f(0,0,0));
will result in a bounding box extending from (-1,-1,-1) to (0,0,0)
in bbox'es local (untransformed) space.
Page 2SbXfBox3f(3IV)
void SbXfBox3fExtendByBox(SbXfBox3f *this, const SbBox3f
*bb)
Extends the box (if necessary) to contain the given SbBox3f. If the
box has had a non-identity transformation applied using the
setTransform() method, the given SbBox3f is assumed to be in the
transformed space.
void SbXfBox3fExtendByXfBox(SbXfBox3f *this, const
SbXfBox3f *bb)
Extends the box (if necessary) to contain the given SbXfBox3f.
SbBool SbXfBox3fIntersectPt(const SbXfBox3f *this, const
SbVec3f *pt)
Returns TRUE if intersection of given point and this box is not
empty.
SbBool SbXfBox3fIntersectBox(const SbXfBox3f *this, const
SbBox3f *bb)
Returns TRUE if intersection of given box and this box is not empty.
void SbXfBox3fSetBounds(SbXfBox3f *this, float xmin, float
ymin, float zmin, float xmax, float ymax, float
zmax)
void SbXfBox3fSetBoundsMinMax(SbXfBox3f *this, const
SbVec3f *_min, const SbVec3f *_max)
void SbXfBox3fGetBounds(const SbXfBox3f *this, float
*xmin, float *ymin, float *zmin, float *xmax,
float *ymax, float *zmax)
void SbXfBox3fGetBoundsMinMax(const SbXfBox3f *this,
SbVec3f *_min, SbVec3f *_max)
Set and get the bounds of the box.
void SbXfBox3fGetOrigin(SbXfBox3f *this, float *originX,
float *originY, float *originZ)
Returns origin (minimum point) of the box.
void SbXfBox3fGetSize(SbXfBox3f *this, float *sizeX, float
*sizeY, float *sizeZ)
Returns size of the box.
float SbXfBox3fGetVol(const SbXfBox3f *this)
Gives the volume of the box (0 for an empty box).
void SbXfBox3fMakeEmpty(SbXfBox3f *this)
Sets the box to contain nothing.
SbBool SbXfBox3fIsEmpty(const SbXfBox3f *this)
Checks if the box is empty (degenerate).
SbBool SbXfBox3fHasVol(const SbXfBox3f *this)
Checks if the box has volume; i.e., all three dimensions have
positive size.
Page 3SbXfBox3f(3IV)
void SbXfBox3fGetSpan(const SbXfBox3f *this, const SbVec3f
*direction, float *dMin, float *dMax)
Finds the extent of the box along a particular direction.
void SbXfBox3fXf(SbXfBox3f *this, const SbMatrix *m)
Transforms the box by the given matrix.
SbBox3f SbXfBox3fProject(const SbXfBox3f *this)
Projects an SbXfBox3f to an SbBox3f
int SbXfBox3fIsEq(SbXfBox3f *this, const SbXfBox3f *b1,
const SbXfBox3f *b2)
int SbXfBox3fIsNEq(SbXfBox3f *this, const SbXfBox3f *b1,
const SbXfBox3f *b2)
Equality comparisons.
FILE FORMAT/DEFAULTS
XfBox3f {
}
SEE ALSO
SbBox3f, SbBox2f, SbBox2s, SbVec3f, SbVec2f, SbVec2s, SbMatrix,
SoGetBoundingBoxAction
Page 4