man SbBox2f () - 2D box class

NAME

SbBox2f - 2D box class

INHERITS FROM

SbBox2f

SYNOPSIS

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

c } c } SbBox2f(float xmin, float ymin, float xmax float ymax)

c } c } SbBox2f(const SbVec2f &min, const SbVec2f &max)

c } c } ~SbBox2f()

c } c } getMin()

c } c } getMax()

c } c } getCenter()

c } c } extendBy(const SbVec2f &point)

c } c } extendBy(const SbBox2f &box)

c } c } intersect(const SbVec2f &point)

c } c } intersect(const SbBox2f &box)

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

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

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

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

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

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

c } c } getAspectRatio()

c } c } makeEmpty()

c } c } isEmpty()

c } c } hasArea()

DESCRIPTION

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

METHODS

c } c } SbBox2f()

c } c } SbBox2f(float xmin, float ymin, float xmax float ymax)

c } c } SbBox2f(const SbVec2f &min, const SbVec2f &max)

c } c } ~SbBox2f()

Constructors and destructor for a 2D float box. xmin, ymin, xmax, and ymax 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. c } c } getCenter()

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

c } c } extendBy(const SbBox2f &box)

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

c } c } intersect(const SbBox2f &box)

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

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

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

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

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

Gets box origin. c } c } getSize(float &x, float &y)

Gets box size. c } c } getAspectRatio()

Gets box aspect ratio. c } c } makeEmpty()

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

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

Returns TRUE if both dimensions of the box have positive size, and FALSE otherwise.

SEE ALSO

SbBox3f, SbXfBox3f, SbBox2s, SbVec3f, SbVec2f, SbVec2s, SbMatrix