SbBox2s(3IV)

NAME
SbBox2s — 2D box class

INHERITS FROM
SbBox2s

SYNOPSIS
#include <Inventor/SbBox.h>

Methods from class SbBox2s:

SbBox2s()

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

SbBox2s(const SbVec2s &_min, const SbVec2s &_max)
void
~SbBox2s()
const SbVec2s &
getMin() const
const SbVec2s &
getMax() const
void
extendBy(const SbVec2s &point)
void
extendBy(const SbBox2s &box)
SbBool
intersect(const SbVec2s &point) const
SbBool
intersect(const SbBox2s &box) const
void
setBounds(short xmin, short ymin, short xmax, short ymax)
void
setBounds(const SbVec2s &_min, const SbVec2s &_max)
void
getBounds(short &xmin, short &ymin, short &xmax, short &ymax) const
void
getBounds(SbVec2s &_min, SbVec2s &_max) const
void
getOrigin(short &originX, short &originY) const
void
getSize(short &sizeX, short &sizeY) const
float
getAspectRatio() const
void
makeEmpty()
int
operator ==(const SbBox2s &b1, const SbBox2s &b2)
int
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

SbBox2s()

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

SbBox2s(const SbVec2s &_min, const SbVec2s &_max)
void
~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.

const SbVec2s &
getMin() const
const SbVec2s &
getMax() const
Returns the minimum and maximum points of the box.

void
extendBy(const SbVec2s &point)
void
extendBy(const SbBox2s &box)
Extends this box (if necessary) to contain the specified point or other box.

SbBool
intersect(const SbVec2s &point) const
SbBool
intersect(const SbBox2s &box) const
Returns TRUE if the specified point or box intersects this box.

void
setBounds(short xmin, short ymin, short xmax, short ymax)
void
setBounds(const SbVec2s &_min, const SbVec2s &_max)
Sets the corners of the box.

void
getBounds(short &xmin, short &ymin, short &xmax, short &ymax) const
void
getBounds(SbVec2s &_min, SbVec2s &_max) const
Gets the corners of the box.

void
getOrigin(short &originX, short &originY) const
Returns origin (minimum point) of box.

void
getSize(short &sizeX, short &sizeY) const
Returns box size.

float
getAspectRatio() const
Returns aspect ratio (ratio of width to height) of box.

void
makeEmpty()
Makes an empty box.

int
operator ==(const SbBox2s &b1, const SbBox2s &b2)
int
operator !=(const SbBox2s &b1, const SbBox2s &b2)
Equality comparisons.

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