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

#include <box2.h>

List of all members.

Public Types

typedef BoxScalarType ScalarType
 The scalar type.

Public Member Functions

void Add (const Point2< BoxScalarType > &p)
void Add (Box2 const &b)
BoxScalarType Area () const
 Calcola l'area del Bounding box.
 Box2 (const Box2 &b)
 Copy constructor.
 Box2 ()
 Standard constructor.
Point2< BoxScalarType > Center () const
 Calcola il centro del bounding box.
bool Collide (Box2 const &b)
BoxScalarType Diag () const
 Restituisce la lunghezza della diagonale del bounding box.
Point2< BoxScalarType > Dim () const
 Calcola la dimensione del bounding box.
BoxScalarType DimX () const
 Calcola la dimensione del bounding box sulla x.
BoxScalarType DimY () const
 Calcola la dimensione del bounding box sulla y.
void Intersect (const Box2 &b)
bool IsEmpty () const
bool IsIn (Point2< BoxScalarType > const &p) const
bool IsInEx (Point2< BoxScalarType > const &p) const
bool IsNull () const
bool IsValid () const
void Normalize (Point2< BoxScalarType > &p)
void Offset (const Point2< BoxScalarType > &delta)
void Offset (const BoxScalarType s)
bool operator== (Box2 const &p) const
 Operator to compare two bounding box.
void Set (BoxScalarType minx, BoxScalarType miny, BoxScalarType maxx, BoxScalarType maxy)
void Set (const Point2< BoxScalarType > &p)
 Initializing the bounding box with a point.
void SetNull ()
 Set the bounding box to a null value.
void Translate (const Point2< BoxScalarType > &p)
 ~Box2 ()
 Distructor.

Public Attributes

Point2< BoxScalarType > max
 max coordinate point
Point2< BoxScalarType > min
 min coordinate point

Detailed Description

template<class BoxScalarType>
class vcg::Box2< BoxScalarType >

Templated class for a 2D bounding box. It is stored just as two Point2

Parameters:
BoxScalarType (Template Parameter) Specifies the scalar field.

Definition at line 72 of file box2.h.


Member Typedef Documentation

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

The scalar type.

Definition at line 76 of file box2.h.


Constructor & Destructor Documentation

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

Standard constructor.

Definition at line 83 of file box2.h.

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

Copy constructor.

Definition at line 85 of file box2.h.

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

Distructor.

Definition at line 87 of file box2.h.


Member Function Documentation

template<class BoxScalarType>
void vcg::Box2< BoxScalarType >::Add ( const Point2< 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 2D

Definition at line 134 of file box2.h.

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

Function to add two bounding box

Parameters:
b Il bounding box che si vuole aggiungere

Definition at line 114 of file box2.h.

template<class BoxScalarType>
BoxScalarType vcg::Box2< BoxScalarType >::Area (  )  const [inline]

Calcola l'area del Bounding box.

Definition at line 242 of file box2.h.

template<class BoxScalarType>
Point2<BoxScalarType> vcg::Box2< BoxScalarType >::Center (  )  const [inline]

Calcola il centro del bounding box.

Definition at line 237 of file box2.h.

template<class BoxScalarType>
bool vcg::Box2< BoxScalarType >::Collide ( Box2< BoxScalarType > const &  b  )  [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 213 of file box2.h.

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

Restituisce la lunghezza della diagonale del bounding box.

Definition at line 232 of file box2.h.

template<class BoxScalarType>
Point2<BoxScalarType> vcg::Box2< BoxScalarType >::Dim (  )  const [inline]

Calcola la dimensione del bounding box.

Definition at line 252 of file box2.h.

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

Calcola la dimensione del bounding box sulla x.

Definition at line 247 of file box2.h.

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

Calcola la dimensione del bounding box sulla y.

Definition at line 249 of file box2.h.

template<class BoxScalarType>
void vcg::Box2< BoxScalarType >::Intersect ( const Box2< 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 167 of file box2.h.

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

Controlla se il bounding box e' vuoto.

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

Definition at line 230 of file box2.h.

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

Verifica se un punto appartiene ad un bounding box.

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

Definition at line 190 of file box2.h.

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

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

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

Definition at line 201 of file box2.h.

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

Controlla se il bounding box e' nullo.

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

Definition at line 222 of file box2.h.

template<class BoxScalarType>
bool vcg::Box2< BoxScalarType >::IsValid (  )  const [inline]

Controlla se il bounding box e' consistente.

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

Definition at line 226 of file box2.h.

template<class BoxScalarType>
void vcg::Box2< BoxScalarType >::Normalize ( Point2< BoxScalarType > &  p  )  [inline]

Definition at line 254 of file box2.h.

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

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

Parameters:
delta Point in 3D space

Definition at line 158 of file box2.h.

template<class BoxScalarType>
void vcg::Box2< 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 150 of file box2.h.

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

Operator to compare two bounding box.

Definition at line 89 of file box2.h.

template<class BoxScalarType>
void vcg::Box2< BoxScalarType >::Set ( BoxScalarType  minx,
BoxScalarType  miny,
BoxScalarType  maxx,
BoxScalarType  maxy 
) [inline]

Definition at line 99 of file box2.h.

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

Initializing the bounding box with a point.

Definition at line 94 of file box2.h.

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

Set the bounding box to a null value.

Definition at line 107 of file box2.h.

template<class BoxScalarType>
void vcg::Box2< BoxScalarType >::Translate ( const Point2< 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 181 of file box2.h.


Member Data Documentation

template<class BoxScalarType>
Point2<BoxScalarType> vcg::Box2< BoxScalarType >::max

max coordinate point

Definition at line 81 of file box2.h.

template<class BoxScalarType>
Point2<BoxScalarType> vcg::Box2< BoxScalarType >::min

min coordinate point

Definition at line 79 of file box2.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