27 #include <Inventor/SbVec2f.h> 
   36   SbBox2f(
float xmin, 
float ymin, 
float xmax, 
float ymax)
 
   37     : minpt(xmin, ymin), maxpt(xmax, ymax) { }
 
   39     : minpt(minpoint), maxpt(maxpoint) { }
 
   42   explicit SbBox2f(
const SbBox2i32 & box) { setBounds(box); }
 
   45     { minpt.setValue(xmin, ymin); maxpt.setValue(xmax, ymax); 
return *
this; }
 
   47     { minpt = minpoint; maxpt = maxpoint; 
return *
this; }
 
   50   SbBox2f & setBounds(
const SbBox2i32 & box);
 
   52   void getBounds(
float & xmin, 
float & ymin, 
float & xmax, 
float & ymax)
 const 
   53     { minpt.getValue(xmin, ymin); maxpt.getValue(xmax, ymax); }
 
   55     { minpoint = minpt; maxpoint = maxpt; }
 
   61   SbVec2f & getMax(
void) { 
return maxpt; }
 
   63   void extendBy(
const SbVec2f & point);
 
   64   void extendBy(
const SbBox2f & box);
 
   66   SbBool 
isEmpty(
void)
 const { 
return (maxpt[0] < minpt[0]); }
 
   67   SbBool 
hasArea(
void)
 const { 
return ((maxpt[0] > minpt[0]) && (maxpt[1] > minpt[1])); }
 
   69   SbBool intersect(
const SbVec2f & point) 
const;
 
   70   SbBool intersect(
const SbBox2f & box) 
const;
 
   74   void getOrigin(
float & originX, 
float & originY)
 const 
   75     { minpt.getValue(originX, originY); }
 
   76   void getSize(
float & sizeX, 
float & sizeY)
 const 
   77     { 
if (isEmpty()) { sizeX = sizeY = 0.0f; }
 
   78       else { sizeX = maxpt[0] - minpt[0]; sizeY = maxpt[1] - minpt[1]; } }
 
   80     { SbDividerChk(
"SbBox2f::getAspectRatio()", maxpt[1] - minpt[1]);
 
   81       return (maxpt[0] - minpt[0]) / (maxpt[1] - minpt[1]); }
 
   96 #endif // !COIN_SBBOX2F_H 
The SbVec2f class is a 2 dimensional vector with floating point coordinates.This vector class is used...
Definition: SbVec2f.h:39
SbBox2f(float xmin, float ymin, float xmax, float ymax)
Definition: SbBox2f.h:36
SbBox2f(void)
Definition: SbBox2f.h:35
SbBool isEmpty(void) const 
Definition: SbBox2f.h:66
The SbBox2d class is a 2 dimensional box with double precision corner coordinates.This box class is used by many other classes in Coin for data exchange and storage. It provides two box corners with double precision coordinates, which is among other things useful for representing screen or canvas dimensions in normalized coordinates. 
Definition: SbBox2d.h:33
void getBounds(SbVec2f &minpoint, SbVec2f &maxpoint) const 
Definition: SbBox2f.h:54
int operator!=(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:92
SbBool hasArea(void) const 
Definition: SbBox2f.h:67
int operator==(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:88
SbBox2f & setBounds(float xmin, float ymin, float xmax, float ymax)
Definition: SbBox2f.h:44
float getAspectRatio(void) const 
Definition: SbBox2f.h:79
void getSize(float &sizeX, float &sizeY) const 
Definition: SbBox2f.h:76
The SbBox2s class is a 2 dimensional box with short integer coordinates.This box class is used by oth...
Definition: SbBox2s.h:34
const SbVec2f & getMax(void) const 
Definition: SbBox2f.h:60
The SbBox2f class is a 2 dimensional box with floating point corner coordinates.This box class is use...
Definition: SbBox2f.h:33
const SbVec2f & getMin(void) const 
Definition: SbBox2f.h:57
void getOrigin(float &originX, float &originY) const 
Definition: SbBox2f.h:74
SbBox2f(const SbVec2f &minpoint, const SbVec2f &maxpoint)
Definition: SbBox2f.h:38
SbVec2f getCenter(void) const 
Definition: SbBox2f.h:73
SbBox2f & setBounds(const SbVec2f &minpoint, const SbVec2f &maxpoint)
Definition: SbBox2f.h:46
void getBounds(float &xmin, float &ymin, float &xmax, float &ymax) const 
Definition: SbBox2f.h:52
SbVec2f & getMin(void)
Definition: SbBox2f.h:58