1#ifndef COIN_SBBOX2I32_H
2#define COIN_SBBOX2I32_H
36#include <Inventor/SbVec2i32.h>
37#include <Inventor/SbVec2f.h>
47 : minpt(
xmin, ymin), maxpt(
xmax, ymax) { }
55 { minpt.setValue(
xmin, ymin); maxpt.setValue(
xmax, ymax);
return *
this; }
63 { minpt.getValue(
xmin, ymin); maxpt.getValue(
xmax, ymax); }
75 SbBool
isEmpty(
void)
const {
return (maxpt[0] < minpt[0]); }
76 SbBool
hasArea(
void)
const {
return ((maxpt[0] > minpt[0]) && (maxpt[1] > minpt[1])); }
78 SbBool intersect(
const SbVec2i32 & point)
const;
86 else {
sizeX = maxpt[0] - minpt[0];
sizeY = maxpt[1] - minpt[1]; } }
89 this->getSize(v[0], v[1]);
93 { SbDividerChk(
"SbBox2i32::getAspectRatio()", maxpt[1] - minpt[1]);
94 return float(maxpt[0] - minpt[0]) / float(maxpt[1] - minpt[1]); }
102 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
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
SbBox2i32(void)
Definition SbBox2i32.h:45
SbBox2i32 & setBounds(int32_t xmin, int32_t ymin, int32_t xmax, int32_t ymax)
Definition SbBox2i32.h:54
float getAspectRatio(void) const
Definition SbBox2i32.h:92
void getSize(int32_t &sizeX, int32_t &sizeY) const
Definition SbBox2i32.h:84
const SbVec2i32 & getMax(void) const
Definition SbBox2i32.h:69
SbBox2i32(const SbVec2i32 &minpoint, const SbVec2i32 &maxpoint)
Definition SbBox2i32.h:48
SbBox2i32(int32_t xmin, int32_t ymin, int32_t xmax, int32_t ymax)
Definition SbBox2i32.h:46
SbBool hasArea(void) const
Definition SbBox2i32.h:76
SbBox2i32(const SbBox2s &box)
Definition SbBox2i32.h:50
SbBool isEmpty(void) const
Definition SbBox2i32.h:75
void getOrigin(int32_t &originX, int32_t &originY) const
Definition SbBox2i32.h:82
SbVec2i32 getSize(void) const
Definition SbBox2i32.h:87
void getBounds(int32_t &xmin, int32_t &ymin, int32_t &xmax, int32_t &ymax) const
Definition SbBox2i32.h:62
SbVec2f getCenter(void) const
Definition SbBox2i32.h:81
SbBox2i32(const SbBox2f &box)
Definition SbBox2i32.h:51
SbVec2i32 & getMax(void)
Definition SbBox2i32.h:70
void getBounds(SbVec2i32 &minpoint, SbVec2i32 &maxpoint) const
Definition SbBox2i32.h:64
SbBox2i32(const SbBox2d &box)
Definition SbBox2i32.h:52
const SbVec2i32 & getMin(void) const
Definition SbBox2i32.h:67
SbVec2i32 & getMin(void)
Definition SbBox2i32.h:68
SbBox2i32 & setBounds(const SbVec2i32 &minpoint, const SbVec2i32 &maxpoint)
Definition SbBox2i32.h:56
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 SbVec2f class is a 2 dimensional vector with floating point coordinates.
Definition SbVec2f.h:49
The SbVec2i32 class is a 2 dimensional vector with 32-bit signed integer coordinates.
Definition SbVec2i32.h:50