36#include <Inventor/SbVec2d.h>
46 : minpt(
xmin, ymin), maxpt(
xmax, ymax) { }
54 { minpt.setValue(
xmin, ymin); maxpt.setValue(
xmax, ymax);
return *
this; }
62 { minpt.getValue(
xmin, ymin); maxpt.getValue(
xmax, ymax); }
71 void extendBy(
const SbVec2d & point);
74 SbBool
isEmpty(
void)
const {
return (maxpt[0] < minpt[0]); }
75 SbBool
hasArea(
void)
const {
return ((maxpt[0] > minpt[0]) && (maxpt[1] > minpt[1])); }
77 SbBool intersect(
const SbVec2d & point)
const;
87 else {
sizeX = maxpt[0] - minpt[0];
sizeY = maxpt[1] - minpt[1]; } }
90 this->getSize(v[0], v[1]);
94 { SbDividerChk(
"SbBox2d::getAspectRatio()", maxpt[1] - minpt[1]);
95 return (maxpt[0] - minpt[0]) / (maxpt[1] - minpt[1]); }
103 return ((
b1.getMin() ==
b2.getMin()) && (
b1.getMax() ==
b2.getMax()));
The SbBox2d class is a 2 dimensional box with double precision corner coordinates.
Definition SbBox2d.h:42
SbBool isEmpty(void) const
Definition SbBox2d.h:74
SbVec2d & getMax(void)
Definition SbBox2d.h:69
SbBox2d(const SbBox2s &box)
Definition SbBox2d.h:50
SbBox2d & setBounds(const SbVec2d &minpoint, const SbVec2d &maxpoint)
Definition SbBox2d.h:55
void getBounds(SbVec2d &minpoint, SbVec2d &maxpoint) const
Definition SbBox2d.h:63
SbBox2d(const SbVec2d &minpoint, const SbVec2d &maxpoint)
Definition SbBox2d.h:47
void getSize(double &sizeX, double &sizeY) const
Definition SbBox2d.h:85
double getAspectRatio(void) const
Definition SbBox2d.h:93
SbVec2d & getMin(void)
Definition SbBox2d.h:67
void getBounds(double &xmin, double &ymin, double &xmax, double &ymax) const
Definition SbBox2d.h:61
void getOrigin(double &originX, double &originY) const
Definition SbBox2d.h:83
const SbVec2d & getMax(void) const
Definition SbBox2d.h:68
const SbVec2d & getMin(void) const
Definition SbBox2d.h:66
SbVec2d getCenter(void) const
Definition SbBox2d.h:82
SbBox2d(double xmin, double ymin, double xmax, double ymax)
Definition SbBox2d.h:45
SbBox2d(void)
Definition SbBox2d.h:44
SbBox2d & setBounds(double xmin, double ymin, double xmax, double ymax)
Definition SbBox2d.h:53
SbVec2d getSize(void) const
Definition SbBox2d.h:88
SbBool hasArea(void) const
Definition SbBox2d.h:75
SbBox2d(const SbBox2i32 &box)
Definition SbBox2d.h:51
SbBox2d(const SbBox2f &box)
Definition SbBox2d.h:49
The SbBox2f class is a 2 dimensional box with floating point corner coordinates.
Definition SbBox2f.h:42
The SbBox2i32 class is a 2 dimensional box with 32-bit integer coordinates.
Definition SbBox2i32.h:43
The SbBox2s class is a 2 dimensional box with short integer coordinates.
Definition SbBox2s.h:43
The SbList class is a template container class for lists.
Definition SbList.h:70
SbList(const int sizehint=DEFAULTSIZE)
Definition SbList.h:78
The SbVec2d class is a 2 dimensional vector with double precision floating point coordinates.
Definition SbVec2d.h:48