man SbBox3f () - 3D box class

NAME

SbBox3f - 3D box class

INHERITS FROM

SbBox3f

SYNOPSIS

#include <Inventor/SbBox.h> Methods from class SbBox3f: c } c } SbBox3f()

c } c } SbBox3f(float xmin, float ymin, float zmin float xmax, float ymax, float zmax)

c } c } SbBox3f(const SbVec3f &min, const SbVec3f &max)

c } c } ~SbBox3f()

c } c } getMin()

c } c } getMax()

c } c } getCenter()

c } c } extendBy(const SbVec3f &point)

c } c } extendBy(const SbBox3f &box)

c } c } intersect(const SbVec3f &point)

c } c } intersect(const SbBox3f &box)

c } c } setBounds(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)

c } c } setBounds(const SbVec3f &min, const SbVec3f &max)

c } c } getBounds(float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax)

c } c } getBounds(SbVec3f &min, SbVec3f &max)

c } c } getOrigin(float &x0, float &y0, float &z0)

c } c } getSize(float &x, float &y, float &z)

c } c } makeEmpty()

c } c } isEmpty()

c } c } hasVolume()

c } c } getSpan(SbVec3f &dir, float &dMin, float &dMax)

c } c } transform(const SbMatrix &mx)

c } c } getVolume()

DESCRIPTION

3D box which has planes parallel to the major axes and is specified by two points on a diagonal. This class is part of the standard Inventor datatype classes and is used as input and output to geometry operations (see SoGetBoundingBoxAction).

METHODS

c } c } SbBox3f()

c } c } SbBox3f(float xmin, float ymin, float zmin float xmax, float ymax, float zmax)

c } c } SbBox3f(const SbVec3f &min, const SbVec3f &max)

c } c } ~SbBox3f()

Constructors and destructor for a 3D float box. xmin, ymin, zmin, xmax, ymax and zmax are the bounds of the box. min and max are the corners of the diagonal that define the box. c } c } getMin()

c } c } getMax()

Returns the minimum and maximum points of the box. The minimum point is the corner of the box with the lowest X, Y, and Z values. The maximum point is the corner of the box with the highest X, Y, and Z values. c } c } getCenter()

Returns the center of the box. c } c } extendBy(const SbVec3f &point)

c } c } extendBy(const SbBox3f &box)

Extends this box (if necessary) to contain the specified point or other box. c } c } intersect(const SbVec3f &point)

c } c } intersect(const SbBox3f &box)

Returns TRUE if the specified point or box intersects this box. c } c } setBounds(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)

c } c } setBounds(const SbVec3f &min, const SbVec3f &max)

Sets the corners of the box. c } c } getBounds(float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax)

c } c } getBounds(SbVec3f &min, SbVec3f &max)

Gets the corners of the box. c } c } getOrigin(float &x0, float &y0, float &z0)

Gets box origin which is the same as the minimum corner of the box. c } c } getSize(float &x, float &y, float &z)

Gets box size. c } c } makeEmpty()

Makes an empty box. c } c } isEmpty()

Returns TRUE if the box is empty, and FALSE otherwise. c } c } hasVolume()

Returns TRUE if all three dimensions of the box have positive size, and FALSE otherwise. c } c } getSpan(SbVec3f &dir, float &dMin, float &dMax)

Finds the span of a box along a specified direction. The span is the total distance the box occupies along a given direction. The total distance is returned in the form of a minimum and maximum distance from the origin of each of the corners of the box along the given direction. The difference between these two values is the span. c } c } transform(const SbMatrix &mx)

Transforms box by matrix, enlarging box to contain result. c } c } getVolume()

Returns the volume of the box.

SEE ALSO

SbXfBox3f, SbBox2f, SbBox2s, SbVec3f, SbVec2f, SbVec2s, SbMatrix, SoGetBoundingBoxAction