2D box class. More...
#include <Inventor/SbBox.h>
Public Member Functions | |
SbBox2i32 () | |
SbBox2i32 (int xmin, int ymin, int xmax, int ymax) | |
SbBox2i32 (const SbVec2i32 &_min, const SbVec2i32 &_max) | |
~SbBox2i32 () | |
const SbVec2i32 & | getMin () const |
const SbVec2i32 & | getMax () const |
void | extendBy (const SbVec2i32 &pt) |
void | extendBy (const SbBox2i32 &r) |
SbBool | intersect (const SbVec2i32 &pt) const |
SbBool | intersect (const SbBox2i32 &bb) const |
SbBox2i32 | intersection (const SbBox2i32 &box) const |
void | setBounds (int xmin, int ymin, int xmax, int ymax) |
void | setBounds (const SbVec2i32 &_min, const SbVec2i32 &_max) |
void | getBounds (int &xmin, int &ymin, int &xmax, int &ymax) const |
void | getBounds (SbVec2i32 &_min, SbVec2i32 &_max) const |
void | getOrigin (int &originX, int &originY) const |
void | getSize (int &sizeX, int &sizeY) const |
SbVec2i32 | getSize () const |
float | getAspectRatio () const |
void | makeEmpty () |
Friends | |
int | operator== (const SbBox2i32 &b1, const SbBox2i32 &b2) |
int | operator!= (const SbBox2i32 &b1, const SbBox2i32 &b2) |
2D box class.
2D box which has planes parallel to the major axes and is specified by two points (specified with 32 bits integers) on a diagonal. This class is part of the standard Open Inventor datatype classes and is used as input and output to geometry operations.
SbBox3f, SbXfBox3f, SbBox2f, SbBox2s, SbVec3f, SbVec2f, SbVec2i32, SbMatrix
SbBox2i32::SbBox2i32 | ( | ) | [inline] |
Constructor for a 2D integer box.
The box is initially empty.
SbBox2i32::SbBox2i32 | ( | int | xmin, | |
int | ymin, | |||
int | xmax, | |||
int | ymax | |||
) | [inline] |
Constructor for a 2D integer box.
xmin , ymin , xmax , and ymax are the bounds of the box.
Constructor for a 2D integer box.
m_min and m_max are the corners of the diagonal that defines the box.
SbBox2i32::~SbBox2i32 | ( | ) | [inline] |
Destructor.
void SbBox2i32::extendBy | ( | const SbBox2i32 & | r | ) |
Extends this box (if necessary) to contain the specified box.
void SbBox2i32::extendBy | ( | const SbVec2i32 & | pt | ) |
Extends this box (if necessary) to contain the specified point.
float SbBox2i32::getAspectRatio | ( | ) | const [inline] |
Returns aspect ratio (ratio of width to height) of box.
Gets the corners of the box.
void SbBox2i32::getBounds | ( | int & | xmin, | |
int & | ymin, | |||
int & | xmax, | |||
int & | ymax | |||
) | const [inline] |
Gets the corners of the box.
const SbVec2i32& SbBox2i32::getMax | ( | ) | const [inline] |
Returns the maximum point of the box.
const SbVec2i32& SbBox2i32::getMin | ( | ) | const [inline] |
Returns the minimum point of the box.
void SbBox2i32::getOrigin | ( | int & | originX, | |
int & | originY | |||
) | const [inline] |
Returns origin (minimum point) of box.
SbVec2i32 SbBox2i32::getSize | ( | ) | const [inline] |
Return box size.
void SbBox2i32::getSize | ( | int & | sizeX, | |
int & | sizeY | |||
) | const [inline] |
Returns box size.
Returns TRUE if the specified box intersects this box.
Returns TRUE if the specified point intersects this box.
Returns the intersection of the specified box with this box.
Returned box is empty if there is no intersection.
void SbBox2i32::makeEmpty | ( | ) |
Makes an empty box.
Sets the corners of the box.
void SbBox2i32::setBounds | ( | int | xmin, | |
int | ymin, | |||
int | xmax, | |||
int | ymax | |||
) | [inline] |
Sets the corners of the box.