#include <MathClasses.h>
Public Member Functions | |
Box () | |
Box (JString xml) | |
Box (XMLNode *node) | |
Box (PointFloat upperleft, Size boxsize, double linewidth=0) | |
Box (PointFloat upperleft, PointFloat lowerright, double linewidth=0) | |
Box (double x, double y, double w, double h, double linewidth=0) | |
virtual | ~Box () |
Object * | clone () const |
double | getUpperY () const |
double | getLowerY () const |
double | getLeftX () const |
double | getRightX () const |
double | getArea () const |
double | getCMX () const |
double | getCMY () const |
PointFloat | getCM () const |
PointFloat | getUpperLeft () const |
PointFloat | getUpperRight () const |
PointFloat | getLowerLeft () const |
PointFloat | getLowerRight () const |
double | getLineWidth () const |
Size | getSize () const |
double | getWidth () const |
double | getHeight () const |
bool | move (double dx, double dy) |
bool | moveTo (double x, double y) |
bool | set (double x, double y, double w, double h, double linewidth=0) |
bool | setUpperLeft (const PointFloat &point) |
bool | setSize (const Size &boxsize) |
bool | setLineWidth (double width) |
bool | grow (double dw, double dh) |
bool | isPointWithin (const PointFloat &point) const |
bool | isPointWithin (int x, int y) const |
PointFloat | getCentreMass () const |
bool | hasZeroSize () const |
bool | equals (const Box &otherbox) const |
bool | equals (const Box &otherbox, double maxerror) const |
Box | getBoundingBox (const Box &otherbox) const |
bool | growToBoundingBox (const Box &otherbox) |
bool | growToIncludePoint (const Point &point, int padX=0, int padY=0) |
Box | getOverlapBox (const Box &otherbox) const |
double | percentOverlap (const Box &otherbox) const |
Box | getDoubleSizeSameCenter () |
bool | constrainTo (const Box &box) |
bool | constrainTo (double x, double y, double w, double h) |
Box | getConstrainedCopy (const Box &box) |
Box | getConstrainedCopy (double x, double y, double w, double h) |
JString | print () |
JString | toXML () |
bool | fromXML (XMLNode *node) |
bool | fromXML (XMLNode *node, const Box &parentBox) |
Public Attributes | |
PointFloat | upperLeft |
Size | size |
double | lineWidth |
JString | name |
JString | comment |
double | orientation |
Definition at line 348 of file MathClasses.h.
cmlabs::Box::Box | ( | ) |
Definition at line 907 of file MathClasses.cpp.
cmlabs::Box::Box | ( | JString | xml | ) |
Definition at line 912 of file MathClasses.cpp.
cmlabs::Box::Box | ( | XMLNode * | node | ) |
Definition at line 919 of file MathClasses.cpp.
cmlabs::Box::Box | ( | PointFloat | upperleft, | |
Size | boxsize, | |||
double | linewidth = 0 | |||
) |
Definition at line 944 of file MathClasses.cpp.
cmlabs::Box::Box | ( | PointFloat | upperleft, | |
PointFloat | lowerright, | |||
double | linewidth = 0 | |||
) |
Definition at line 962 of file MathClasses.cpp.
cmlabs::Box::Box | ( | double | x, | |
double | y, | |||
double | w, | |||
double | h, | |||
double | linewidth = 0 | |||
) |
Definition at line 926 of file MathClasses.cpp.
cmlabs::Box::~Box | ( | ) | [virtual] |
Definition at line 980 of file MathClasses.cpp.
Object * cmlabs::Box::clone | ( | ) | const [virtual] |
double cmlabs::Box::getUpperY | ( | ) | const |
Definition at line 1019 of file MathClasses.cpp.
double cmlabs::Box::getLowerY | ( | ) | const |
Definition at line 1023 of file MathClasses.cpp.
double cmlabs::Box::getLeftX | ( | ) | const |
Definition at line 1027 of file MathClasses.cpp.
double cmlabs::Box::getRightX | ( | ) | const |
Definition at line 1031 of file MathClasses.cpp.
double cmlabs::Box::getArea | ( | ) | const |
Definition at line 1044 of file MathClasses.cpp.
double cmlabs::Box::getCMX | ( | ) | const |
Definition at line 991 of file MathClasses.cpp.
double cmlabs::Box::getCMY | ( | ) | const |
Definition at line 995 of file MathClasses.cpp.
PointFloat cmlabs::Box::getCM | ( | ) | const |
Definition at line 999 of file MathClasses.cpp.
PointFloat cmlabs::Box::getUpperLeft | ( | ) | const |
Definition at line 1003 of file MathClasses.cpp.
PointFloat cmlabs::Box::getUpperRight | ( | ) | const |
Definition at line 1007 of file MathClasses.cpp.
PointFloat cmlabs::Box::getLowerLeft | ( | ) | const |
Definition at line 1011 of file MathClasses.cpp.
PointFloat cmlabs::Box::getLowerRight | ( | ) | const |
Definition at line 1015 of file MathClasses.cpp.
double cmlabs::Box::getLineWidth | ( | ) | const |
Definition at line 1036 of file MathClasses.cpp.
Size cmlabs::Box::getSize | ( | ) | const |
Definition at line 1040 of file MathClasses.cpp.
double cmlabs::Box::getWidth | ( | ) | const |
Definition at line 1048 of file MathClasses.cpp.
double cmlabs::Box::getHeight | ( | ) | const |
Definition at line 1052 of file MathClasses.cpp.
bool cmlabs::Box::move | ( | double | dx, | |
double | dy | |||
) |
Definition at line 1057 of file MathClasses.cpp.
bool cmlabs::Box::moveTo | ( | double | x, | |
double | y | |||
) |
Definition at line 1061 of file MathClasses.cpp.
bool cmlabs::Box::set | ( | double | x, | |
double | y, | |||
double | w, | |||
double | h, | |||
double | linewidth = 0 | |||
) |
Definition at line 1110 of file MathClasses.cpp.
bool cmlabs::Box::setUpperLeft | ( | const PointFloat & | point | ) |
Definition at line 1129 of file MathClasses.cpp.
bool cmlabs::Box::setSize | ( | const Size & | boxsize | ) |
Definition at line 1134 of file MathClasses.cpp.
bool cmlabs::Box::setLineWidth | ( | double | width | ) |
Definition at line 1139 of file MathClasses.cpp.
bool cmlabs::Box::grow | ( | double | dw, | |
double | dh | |||
) |
Definition at line 1065 of file MathClasses.cpp.
bool cmlabs::Box::isPointWithin | ( | const PointFloat & | point | ) | const |
Definition at line 1157 of file MathClasses.cpp.
bool cmlabs::Box::isPointWithin | ( | int | x, | |
int | y | |||
) | const |
Definition at line 1145 of file MathClasses.cpp.
PointFloat cmlabs::Box::getCentreMass | ( | ) | const |
Definition at line 1169 of file MathClasses.cpp.
bool cmlabs::Box::hasZeroSize | ( | ) | const |
Definition at line 1173 of file MathClasses.cpp.
bool cmlabs::Box::equals | ( | const Box & | otherbox | ) | const |
Definition at line 1177 of file MathClasses.cpp.
bool cmlabs::Box::equals | ( | const Box & | otherbox, | |
double | maxerror | |||
) | const |
Definition at line 1184 of file MathClasses.cpp.
Definition at line 1219 of file MathClasses.cpp.
bool cmlabs::Box::growToBoundingBox | ( | const Box & | otherbox | ) |
Definition at line 1190 of file MathClasses.cpp.
bool cmlabs::Box::growToIncludePoint | ( | const Point & | point, | |
int | padX = 0 , |
|||
int | padY = 0 | |||
) |
Definition at line 1199 of file MathClasses.cpp.
Definition at line 1246 of file MathClasses.cpp.
double cmlabs::Box::percentOverlap | ( | const Box & | otherbox | ) | const |
Definition at line 1287 of file MathClasses.cpp.
Box cmlabs::Box::getDoubleSizeSameCenter | ( | ) |
Definition at line 1101 of file MathClasses.cpp.
bool cmlabs::Box::constrainTo | ( | const Box & | box | ) |
Definition at line 1085 of file MathClasses.cpp.
bool cmlabs::Box::constrainTo | ( | double | x, | |
double | y, | |||
double | w, | |||
double | h | |||
) |
Definition at line 1089 of file MathClasses.cpp.
Definition at line 1073 of file MathClasses.cpp.
Box cmlabs::Box::getConstrainedCopy | ( | double | x, | |
double | y, | |||
double | w, | |||
double | h | |||
) |
Definition at line 1079 of file MathClasses.cpp.
JString cmlabs::Box::print | ( | ) | [virtual] |
JString cmlabs::Box::toXML | ( | ) | [virtual] |
bool cmlabs::Box::fromXML | ( | XMLNode * | node | ) | [virtual] |
Definition at line 1378 of file MathClasses.cpp.
Definition at line 361 of file MathClasses.h.
Definition at line 362 of file MathClasses.h.
double cmlabs::Box::lineWidth |
Definition at line 363 of file MathClasses.h.
Definition at line 364 of file MathClasses.h.
Definition at line 365 of file MathClasses.h.
double cmlabs::Box::orientation |
Definition at line 366 of file MathClasses.h.