#include <box2.h>
Public Types | |
typedef Point2< BoxScalarType > | PointType |
typedef BoxScalarType | ScalarType |
The scalar type. | |
Public Member Functions | |
void | Add (Box2 const &b) |
void | Add (const PointType &p) |
ScalarType | Area () const |
Computes area. | |
Box2 () | |
Standard constructor. | |
Box2 (const Box2 &b) | |
Copy constructor. | |
Box2 (const Point2< BoxScalarType > &mi, const Point2< BoxScalarType > &ma) | |
Min Max constructor. | |
Box2 (const Point2< BoxScalarType > ¢er, const BoxScalarType &radius) | |
PointType | Center () const |
Computes box center. | |
bool | Collide (Box2 const &b) |
ScalarType | Diag () const |
Computes length of diagonal. | |
PointType | Dim () const |
Computes sizes (as a vector) | |
ScalarType | DimX () const |
computes dimension on X axis. | |
ScalarType | DimY () const |
computes dimension on Y axis. | |
PointType | GlobalToLocal (PointType const &p) const |
Returns local coords expressed in [0..1]^2 of a point in R^2. | |
void | Intersect (const Box2 &b) |
bool | IsEmpty () const |
bool | IsIn (PointType const &p) const |
bool | IsInEx (PointType const &p) const |
bool | IsNull () const |
bool | IsValid () const |
PointType | LocalToGlobal (PointType const &p) const |
Returns global coords of a local point expressed in [0..1]^2. | |
void | MakeSquare () |
Turns the bounding box into a square (conservatively) | |
void | Normalize (PointType &p) |
Deprecated: use GlobalToLocal. | |
void | Offset (const ScalarType s) |
void | Offset (const PointType &delta) |
bool | operator== (Box2 const &p) const |
Operator to compare two bounding box. | |
Point2< BoxScalarType > | P (const int &i) const |
void | Set (const PointType &p) |
Initializing the bounding box with a point. | |
void | Set (ScalarType minx, ScalarType miny, ScalarType maxx, ScalarType maxy) |
void | SetNull () |
Set the bounding box to a null value. | |
void | Translate (const PointType &p) |
~Box2 () | |
Distructor. | |
Public Attributes | |
PointType | max |
max coordinate point | |
PointType | min |
min coordinate point |
Templated class for a 2D bounding box. It is stored just as two Point2
BoxScalarType | (Template Parameter) Specifies the scalar field. |
typedef BoxScalarType vcg::Box2< BoxScalarType >::ScalarType |
ScalarType vcg::Box2< BoxScalarType >::Area | ( | ) | const [inline] |
ScalarType vcg::Box2< BoxScalarType >::Diag | ( | ) | const [inline] |
ScalarType vcg::Box2< BoxScalarType >::DimX | ( | ) | const [inline] |
ScalarType vcg::Box2< BoxScalarType >::DimY | ( | ) | const [inline] |
PointType vcg::Box2< BoxScalarType >::GlobalToLocal | ( | PointType const & | p | ) | const [inline] |
PointType vcg::Box2< BoxScalarType >::LocalToGlobal | ( | PointType const & | p | ) | const [inline] |
void vcg::Box2< BoxScalarType >::MakeSquare | ( | ) | [inline] |
void vcg::Box2< BoxScalarType >::Offset | ( | const ScalarType | s | ) | [inline] |
void vcg::Box2< BoxScalarType >::Set | ( | ScalarType | minx, |
ScalarType | miny, | ||
ScalarType | maxx, | ||
ScalarType | maxy | ||
) | [inline] |