Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

BBox2 Class Template Reference
[Math2]

A template class for 2D boundary box. More...

#include <gmlbbox2.h>

List of all members.

Public Member Functions

Constructors
 BBox2 ()
 no initialization

 BBox2 (const TVector2< T > &point)
 from point

 BBox2 (const TVector2< T > &point1, const TVector2< T > &point2)
 from two points

Comparison operators and methods
bool NotEmpty () const
 Test for validity.

bool IsDot () const
 If the box is actually a dot.

bool Includes (const TVector2< T > &point) const
 Test for point inclusion.

bool Includes (const BBox2< T > &box) const
 Test for box inclusion.

bool Intersects (const BBox2< T > &box) const
 Test for intersection.

Miscellanious methods
void Include (const TVector2< T > &point)
 Expand the box to include the given point.

void Include (const TVector2< T > *points, int npoints)
 Expand the box to include the given points.

void Include (const BBox2< T > &box)
 Expand the box to include the given box.

void Include (const BBox2< T > *bboxes, int nbboxes)
 Expand the box to include the given boxes.

void Intersect (const BBox2< T > &box)
 Intersect with given box.

void SetRect (const T &in_Left, const T &in_Top, const T &in_Right, const T &in_Bottom)
 Set box sizes.

void ExpandBy (const T &in_Value)
 Adjust size by given value (give < 0 to deflate).

void ExpandBy (const T &in_HValue, const T &in_VValue)
 Adjust sizes by given value (give < 0 to deflate).

void Translate (const TVector2< T > &vct)
 Translate the box to given vector.

BBox2< T > Translated (const TVector2< T > &vct) const
 Returns box translated by vct.

TVector2< T > Diag () const
 Return diagonal.

TVector2< T > Center () const
 Return Center of this box.

double Volume () const
 Return value of the volume.

double Width () const
 Return value of width.

double Height () const
 Return value of height.

 BBox2 (const tagRECT &p)
BBox2< T > & operator= (const tagRECT &p)
 operator tagRECT ()
 operator CvRect ()

Public Attributes

TVector2< T > vmin
 Minimal boundary.

TVector2< T > vmax
 Maximal boundary.


Detailed Description

template<class T>
class gml::BBox2< T >

A template class for 2D boundary box.


The documentation for this class was generated from the following file:
Generated on Tue Jan 13 21:12:06 2004 for Graphics and Media Lab CSL by doxygen 1.3.4