#include <box.h>
Public Types | |
enum | { Dimension = N } |
typedef Point< N, S > | ParamType |
typedef Point< N, S > | PointType |
type used as point Type | |
typedef S | ScalarType |
the type used as scalar. Typically, float or double, but char or int are possible too. | |
Public Member Functions | |
void | Add (Box const &b) |
void | Add (const PointType &p) |
S | Area () const |
Area() and Volume() are sinonims (a. | |
Box () | |
The box constructor. | |
Box (const PointType &mi, const PointType &ma) | |
Min Max constructor. | |
PointType | Center () const |
Calcola il centro del box. | |
bool | Collide (Box const &b) |
S | Diag () const |
Restituisce la lunghezza della diagonale del box. | |
PointType | GlobalToLocal (PointType const &p) const |
Returns local coords expressed in [0..1]^3 of a point in 3D. | |
void | Inflate (const S s) |
void | Inflate (const PointType &delta) |
void | InflateFix (const S s) |
void | Intersect (const Box &b) |
bool | IsEmpty () const |
bool | IsIn (PointType const &p) const |
bool | IsInEx (PointType const &p) const |
bool | IsNull () const |
PointType | LocalToGlobal (PointType const &p) const |
Returns global coords of a local point expressed in [0..1]^3. | |
const PointType & | Max () const |
PointType & | Max () |
const PointType & | Min () const |
PointType & | Min () |
bool | operator!= (Box const &p) const |
Operator to dispare two boxes. | |
bool | operator== (Box const &p) const |
Operator to compare two boxes. | |
void | Set (const PointType &p) |
Initializing the box. | |
void | SetNull () |
Set the box to a null value. | |
PointType | Size () const |
Compute box size. | |
S | SizeX () const |
Compute box size X. | |
S | SizeY () const |
Compute box size Y. | |
S | SizeZ () const |
Compute box size Z. | |
S | SquaredDiag () const |
Calcola il quadrato della diagonale del box. | |
void | Translate (const PointType &p) |
S | Volume () const |
Computes the Volume for the box. | |
~Box () | |
The box distructor. | |
Linearity for boxes | |
void | Zero () |
sets a point to Zero | |
Box | operator+ (Box const &p) const |
Box | operator- (Box const &p) const |
Box | operator* (const S s) const |
Box | operator/ (const S s) const |
Box & | operator+= (Box const &p) |
Box & | operator-= (Box const &p) |
Box & | operator*= (const S s) |
Box & | operator/= (const S s) |
Box | operator- () const |
Protected Attributes | |
Point3< S > | _max |
_max coordinate point | |
Point3< S > | _min |
The scalar type. | |
Iporters (for boxes in different spaces and with different scalar types) | |
template<int N0, class S0 > | |
void | Import (const Box< N0, S0 > &b) |
imports the box | |
template<int N0, class S0 > | |
static Box | Construct (const Box< N0, S0 > &b) |
constructs a new ray importing it from an existing one |
Templated class for 3D boxes. This is the class for definition of a axis aligned box in 2D or 3D space. Typically used as bounding boxes. It is stored just as two Points (at the opposite vertices).
S | (template parameter) Specifies the type of scalar used to represent coords. |
typedef S vcg::Box< N, S >::ScalarType |
the type used as scalar. Typically, float or double, but char or int are possible too.
Reimplemented from vcg::Space< N, S >.
PointType vcg::Box< N, S >::GlobalToLocal | ( | PointType const & | p | ) | const [inline] |
void vcg::Box< N, S >::InflateFix | ( | const S | s | ) | [inline] |
PointType vcg::Box< N, S >::LocalToGlobal | ( | PointType const & | p | ) | const [inline] |
Reimplemented from vcg::Linear< Box >.
Reimplemented from vcg::Linear< Box >.
Reimplemented from vcg::Linear< Box >.
Reimplemented from vcg::Linear< Box >.
Reimplemented from vcg::Linear< Box >.
S vcg::Box< N, S >::SquaredDiag | ( | ) | const [inline] |