Public Member Functions |
| SbBox2s () |
| Constructs an empty box.
|
| SbBox2s (short xmin, short ymin, short xmax, short ymax) |
| Constructor for a 2D integer box.
|
| SbBox2s (const SbVec2s &min, const SbVec2s &max) |
| Constructor for a 2D integer box.
|
| ~SbBox2s () |
| Destructor.
|
const SbVec2s & | getMin () const |
| Returns the minimum and maximum points of the box.
|
const SbVec2s & | getMax () const |
| Returns the minimum and maximum points of the box.
|
void | extendBy (const SbVec2s &pt) |
| Extends Box2s (if necessary) to contain given 2D point.
|
void | extendBy (const SbBox2s &r) |
| Extends Box2s (if necessary) to contain given Box2s.
|
SbBool | intersect (const SbVec2s &pt) const |
| Returns TRUE if intersection of given point and Box2s is not empty.
|
SbBool | intersect (const SbBox2s &bb) const |
| Returns TRUE if intersection of given Box2s and Box2s is not empty.
|
void | setBounds (short xmin, short ymin, short xmax, short ymax) |
| Sets the corners of the box.
|
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 |
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.
|
Friends |
INVENTOR_API int | operator== (const SbBox2s &b1, const SbBox2s &b2) |
| Equality comparisons.
|
INVENTOR_API int | operator!= (const SbBox2s &b1, const SbBox2s &b2) |
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.
- See Also
- SbBox3f, SbXfBox3f, SbBox2f, SbVec3f, SbVec2f, SbVec2s, SbMatrix
Definition at line 470 of file SbBox.h.