man SbBox2s () - 2D box class

NAME

SbBox2s - 2D box class

INHERITS FROM

SbBox2s

SYNOPSIS

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

c } c } SbBox2s(short xmin, short ymin, short xmax, short ymax)

c } c } SbBox2s(const SbVec2s &_min, const SbVec2s &_max)

c } c } ~SbBox2s()

c } c } getMin() const

c } c } getMax() const

c } c } extendBy(const SbVec2s &point)

c } c } extendBy(const SbBox2s &box)

c } c } intersect(const SbVec2s &point) const

c } c } intersect(const SbBox2s &box) const

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

c } c } setBounds(const SbVec2s &_min, const SbVec2s &_max)

c } c } getBounds(short &xmin, short &ymin, short &xmax, short &ymax) const

c } c } getBounds(SbVec2s &_min, SbVec2s &_max) const

c } c } getOrigin(short &originX, short &originY) const

c } c } getSize(short &sizeX, short &sizeY) const

c } c } getAspectRatio() const

c } c } makeEmpty()

c } c } operator ==(const SbBox2s &b1, const SbBox2s &b2)

c } c } operator !=(const SbBox2s &b1, const SbBox2s &b2)

DESCRIPTION

2D box which has planes parallel to the major axes and is specified by two points (specified with short integers) 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 } SbBox2s()

c } c } SbBox2s(short xmin, short ymin, short xmax, short ymax)

c } c } SbBox2s(const SbVec2s &_min, const SbVec2s &_max)

c } c } ~SbBox2s()

Constructors and destructor for a 2D integer 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() const

c } c } getMax() const

Returns the minimum and maximum points of the box. c } c } extendBy(const SbVec2s &point)

c } c } extendBy(const SbBox2s &box)

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

c } c } intersect(const SbBox2s &box) const

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

c } c } setBounds(const SbVec2s &_min, const SbVec2s &_max)

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

c } c } getBounds(SbVec2s &_min, SbVec2s &_max) const

Gets the corners of the box. c } c } getOrigin(short &originX, short &originY) const

Returns origin (minimum point) of box. c } c } getSize(short &sizeX, short &sizeY) const

Returns box size. c } c } getAspectRatio() const

Returns aspect ratio (ratio of width to height) of box. c } c } makeEmpty()

Makes an empty box. c } c } operator ==(const SbBox2s &b1, const SbBox2s &b2)

c } c } operator !=(const SbBox2s &b1, const SbBox2s &b2)

Equality comparisons.

SEE ALSO

SbBox3f, SbXfBox3f, SbBox2f, SbVec3f, SbVec2f, SbVec2s, SbMatrix