vcg::Box3< BoxScalarType > Class Template Reference
[Space]

#include <box3.h>

List of all members.

Public Types

typedef BoxScalarType ScalarType
 The scalar type.

Public Member Functions

void Add (const Matrix44< BoxScalarType > &m, const Box3< BoxScalarType > &b)
void Add (const Point3< BoxScalarType > &p)
void Add (Box3< BoxScalarType > const &b)
 Box3 (const Point3< BoxScalarType > &center, const BoxScalarType &radius)
 Point Radius Constructor.
 Box3 (const Point3< BoxScalarType > &mi, const Point3< BoxScalarType > &ma)
 Min Max constructor.
 Box3 (const Box3 &b)
 Copy constructor.
 Box3 ()
 The bounding box constructor.
Point3< BoxScalarType > Center () const
 Calcola il centro del bounding box.
bool Collide (Box3< BoxScalarType > const &b) const
BoxScalarType Diag () const
 Restituisce la lunghezza della diagonale del bounding box.
Point3< BoxScalarType > Dim () const
 Compute bounding box size.
BoxScalarType DimX () const
 Calcola la dimensione del bounding box sulla x.
BoxScalarType DimY () const
 Calcola la dimensione del bounding box sulla y.
BoxScalarType DimZ () const
 Calcola la dimensione del bounding box sulla z.
Point3< BoxScalarType > GlobalToLocal (Point3< BoxScalarType > const &p) const
 Returns local coords expressed in [0..1]^3 of a point in 3D.
template<class Q >
void Import (const Box3< Q > &b)
void Intersect (const Box3< BoxScalarType > &b)
bool IsEmpty () const
bool IsIn (Point3< BoxScalarType > const &p) const
bool IsInEx (Point3< BoxScalarType > const &p) const
bool IsNull () const
Point3< BoxScalarType > LocalToGlobal (Point3< BoxScalarType > const &p) const
 Returns global coords of a local point expressed in [0..1]^3.
unsigned char MaxDim () const
 Calcola il lato di lunghezza maggiore.
unsigned char MinDim () const
 Calcola il lato di lunghezza minore.
void Offset (const Point3< BoxScalarType > &delta)
void Offset (const BoxScalarType s)
bool operator!= (Box3< BoxScalarType > const &p) const
 Operator to dispare two bounding box.
bool operator== (Box3< BoxScalarType > const &p) const
 Operator to compare two bounding box.
Point3< BoxScalarType > P (const int &i) const
 gives the ith box vertex in order: (x,y,z),(X,y,z),(x,Y,z),(X,Y,z),(x,y,Z),(X,y,Z),(x,Y,Z),(X,Y,Z)
void Set (const Point3< BoxScalarType > &p)
 Initializing the bounding box.
void SetNull ()
 Set the bounding box to a null value.
BoxScalarType SquaredDiag () const
 Calcola il quadrato della diagonale del bounding box.
void Translate (const Point3< BoxScalarType > &p)
BoxScalarType Volume () const
 Calcola il volume del bounding box.
 ~Box3 ()
 The bounding box distructor.

Static Public Member Functions

template<class Q >
static Box3 Construct (const Box3< Q > &b)

Public Attributes

Point3< BoxScalarType > max
 max coordinate point
Point3< BoxScalarType > min
 min coordinate point

Detailed Description

template<class BoxScalarType>
class vcg::Box3< BoxScalarType >

Templated class for 3D boxes. This is the class for definition of a axis aligned bounding box in 3D space. It is stored just as two Point3

Parameters:
BoxScalarType (template parameter) Specifies the type of scalar used to represent coords.

Definition at line 106 of file box3.h.


Member Typedef Documentation

template<class BoxScalarType>
typedef BoxScalarType vcg::Box3< BoxScalarType >::ScalarType

The scalar type.

Definition at line 111 of file box3.h.


Constructor & Destructor Documentation

template<class BoxScalarType>
vcg::Box3< BoxScalarType >::Box3 (  )  [inline]

The bounding box constructor.

Definition at line 118 of file box3.h.

template<class BoxScalarType>
vcg::Box3< BoxScalarType >::Box3 ( const Box3< BoxScalarType > &  b  )  [inline]

Copy constructor.

Definition at line 120 of file box3.h.

template<class BoxScalarType>
vcg::Box3< BoxScalarType >::Box3 ( const Point3< BoxScalarType > &  mi,
const Point3< BoxScalarType > &  ma 
) [inline]

Min Max constructor.

Definition at line 122 of file box3.h.

template<class BoxScalarType>
vcg::Box3< BoxScalarType >::Box3 ( const Point3< BoxScalarType > &  center,
const BoxScalarType &  radius 
) [inline]

Point Radius Constructor.

Definition at line 124 of file box3.h.

template<class BoxScalarType>
vcg::Box3< BoxScalarType >::~Box3 (  )  [inline]

The bounding box distructor.

Definition at line 129 of file box3.h.


Member Function Documentation

template<class BoxScalarType>
void vcg::Box3< BoxScalarType >::Add ( const Matrix44< BoxScalarType > &  m,
const Box3< BoxScalarType > &  b 
) [inline]

Definition at line 205 of file box3.h.

template<class BoxScalarType>
void vcg::Box3< BoxScalarType >::Add ( const Point3< BoxScalarType > &  p  )  [inline]

Funzione per aggiungere un punto al bounding box. Il bounding box viene modificato se il punto cade fuori da esso.

Parameters:
p The point 3D

Definition at line 189 of file box3.h.

template<class BoxScalarType>
void vcg::Box3< BoxScalarType >::Add ( Box3< BoxScalarType > const &  b  )  [inline]

Function to add two bounding box

Parameters:
b Il bounding box che si vuole aggiungere

Definition at line 170 of file box3.h.

template<class BoxScalarType>
Point3<BoxScalarType> vcg::Box3< BoxScalarType >::Center (  )  const [inline]

Calcola il centro del bounding box.

Definition at line 303 of file box3.h.

template<class BoxScalarType>
bool vcg::Box3< BoxScalarType >::Collide ( Box3< BoxScalarType > const &  b  )  const [inline]

Verifica se due bounding box collidono cioe' se hanno una intersezione non vuota. Per esempio due bounding box adiacenti non collidono.

Parameters:
b A bounding box
Returns:
True se collidoo, false altrimenti

Definition at line 278 of file box3.h.

template<class BoxScalarType>
template<class Q >
static Box3 vcg::Box3< BoxScalarType >::Construct ( const Box3< Q > &  b  )  [inline, static]

Definition at line 361 of file box3.h.

template<class BoxScalarType>
BoxScalarType vcg::Box3< BoxScalarType >::Diag (  )  const [inline]

Restituisce la lunghezza della diagonale del bounding box.

Definition at line 293 of file box3.h.

template<class BoxScalarType>
Point3<BoxScalarType> vcg::Box3< BoxScalarType >::Dim (  )  const [inline]

Compute bounding box size.

Definition at line 308 of file box3.h.

template<class BoxScalarType>
BoxScalarType vcg::Box3< BoxScalarType >::DimX (  )  const [inline]

Calcola la dimensione del bounding box sulla x.

Definition at line 333 of file box3.h.

template<class BoxScalarType>
BoxScalarType vcg::Box3< BoxScalarType >::DimY (  )  const [inline]

Calcola la dimensione del bounding box sulla y.

Definition at line 335 of file box3.h.

template<class BoxScalarType>
BoxScalarType vcg::Box3< BoxScalarType >::DimZ (  )  const [inline]

Calcola la dimensione del bounding box sulla z.

Definition at line 337 of file box3.h.

template<class BoxScalarType>
Point3<BoxScalarType> vcg::Box3< BoxScalarType >::GlobalToLocal ( Point3< BoxScalarType > const &  p  )  const [inline]

Returns local coords expressed in [0..1]^3 of a point in 3D.

Definition at line 320 of file box3.h.

template<class BoxScalarType>
template<class Q >
void vcg::Box3< BoxScalarType >::Import ( const Box3< Q > &  b  )  [inline]

Definition at line 354 of file box3.h.

template<class BoxScalarType>
void vcg::Box3< BoxScalarType >::Intersect ( const Box3< BoxScalarType > &  b  )  [inline]

Calcola l'intersezione tra due bounding box. Al bounding box viene assegnato il valore risultante.

Parameters:
b Il bounding box con il quale si vuole effettuare l'intersezione

Definition at line 221 of file box3.h.

template<class BoxScalarType>
bool vcg::Box3< BoxScalarType >::IsEmpty (  )  const [inline]

Controlla se il bounding box e' vuoto.

Returns:
True se il bounding box e' vuoto, false altrimenti

Definition at line 291 of file box3.h.

template<class BoxScalarType>
bool vcg::Box3< BoxScalarType >::IsIn ( Point3< BoxScalarType > const &  p  )  const [inline]

Verifica se un punto appartiene ad un bounding box.

Parameters:
p The point 3D
Returns:
True se p appartiene al bounding box, false altrimenti

Reimplemented in vcg::Obox3< T >.

Definition at line 245 of file box3.h.

template<class BoxScalarType>
bool vcg::Box3< BoxScalarType >::IsInEx ( Point3< BoxScalarType > const &  p  )  const [inline]

Verifica se un punto appartiene ad un bounding box aperto sul max.

Parameters:
p The point 3D
Returns:
True se p appartiene al bounding box, false altrimenti

Definition at line 257 of file box3.h.

template<class BoxScalarType>
bool vcg::Box3< BoxScalarType >::IsNull (  )  const [inline]

Controlla se il bounding box e' nullo.

Returns:
True se il bounding box e' nullo, false altrimenti

Definition at line 287 of file box3.h.

template<class BoxScalarType>
Point3<BoxScalarType> vcg::Box3< BoxScalarType >::LocalToGlobal ( Point3< BoxScalarType > const &  p  )  const [inline]

Returns global coords of a local point expressed in [0..1]^3.

Definition at line 313 of file box3.h.

template<class BoxScalarType>
unsigned char vcg::Box3< BoxScalarType >::MaxDim (  )  const [inline]

Calcola il lato di lunghezza maggiore.

Definition at line 339 of file box3.h.

template<class BoxScalarType>
unsigned char vcg::Box3< BoxScalarType >::MinDim (  )  const [inline]

Calcola il lato di lunghezza minore.

Definition at line 346 of file box3.h.

template<class BoxScalarType>
void vcg::Box3< BoxScalarType >::Offset ( const Point3< BoxScalarType > &  delta  )  [inline]

Varia le dimensioni del bounding box del valore fornito attraverso il parametro.

Parameters:
delta Point in 3D space

Definition at line 150 of file box3.h.

template<class BoxScalarType>
void vcg::Box3< BoxScalarType >::Offset ( const BoxScalarType  s  )  [inline]

Varia le dimensioni del bounding box scalandole rispetto al parametro scalare.

Parameters:
s Valore scalare che indica di quanto deve variare il bounding box

Definition at line 143 of file box3.h.

template<class BoxScalarType>
bool vcg::Box3< BoxScalarType >::operator!= ( Box3< BoxScalarType > const &  p  )  const [inline]

Operator to dispare two bounding box.

Definition at line 136 of file box3.h.

template<class BoxScalarType>
bool vcg::Box3< BoxScalarType >::operator== ( Box3< BoxScalarType > const &  p  )  const [inline]

Operator to compare two bounding box.

Definition at line 131 of file box3.h.

template<class BoxScalarType>
Point3<BoxScalarType> vcg::Box3< BoxScalarType >::P ( const int &  i  )  const [inline]

gives the ith box vertex in order: (x,y,z),(X,y,z),(x,Y,z),(X,Y,z),(x,y,Z),(X,y,Z),(x,Y,Z),(X,Y,Z)

Definition at line 367 of file box3.h.

template<class BoxScalarType>
void vcg::Box3< BoxScalarType >::Set ( const Point3< BoxScalarType > &  p  )  [inline]

Initializing the bounding box.

Definition at line 156 of file box3.h.

template<class BoxScalarType>
void vcg::Box3< BoxScalarType >::SetNull (  )  [inline]

Set the bounding box to a null value.

Definition at line 161 of file box3.h.

template<class BoxScalarType>
BoxScalarType vcg::Box3< BoxScalarType >::SquaredDiag (  )  const [inline]

Calcola il quadrato della diagonale del bounding box.

Definition at line 298 of file box3.h.

template<class BoxScalarType>
void vcg::Box3< BoxScalarType >::Translate ( const Point3< BoxScalarType > &  p  )  [inline]

Trasla il bounding box di un valore definito dal parametro.

Parameters:
p Il bounding box trasla sulla x e sulla y in base alle coordinate del parametro

Definition at line 236 of file box3.h.

template<class BoxScalarType>
BoxScalarType vcg::Box3< BoxScalarType >::Volume (  )  const [inline]

Calcola il volume del bounding box.

Definition at line 328 of file box3.h.


Member Data Documentation

template<class BoxScalarType>
Point3<BoxScalarType> vcg::Box3< BoxScalarType >::max

max coordinate point

Definition at line 116 of file box3.h.

template<class BoxScalarType>
Point3<BoxScalarType> vcg::Box3< BoxScalarType >::min

min coordinate point

Definition at line 114 of file box3.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:22:58 2013