Go to Overview over all GrAL packages.
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

box Class Template Reference

An axisparallel box for arbitrary coordinate types. More...

#include <box.h>

Collaboration diagram for box:

Collaboration graph
[legend]
List of all members.

Public Types

typedef coord argument_type
typedef coord result_type

Public Methods

 box (const coord &cmin)
 box (const coord &cmin, const coord &cmax)
const coord & the_min () const
const coord & the_max () const
coord center () const
coord & the_min ()
coord & the_max ()
coord global_coords (const coord &local) const
coord operator() (const coord &local) const
bool contains (coord const &p) const
self & operator|= (self const &rs)

Friends

self operator| (const self &ls, const self &rs)

Detailed Description

template<class coord>
class box< coord >

An axisparallel box for arbitrary coordinate types.

This class is especially useful for representing bounding boxes. Union (operator|) and intersection(operator &) of boxes give again boxes (namely bounding boxes of the set-theoretic union and intersection, resp.)

A box can be used as a function, mapping [0,1]^d to the convex hull of its min and max corner, in the obvious way.

Todo:
add default constructor with proper initialization

Definition at line 26 of file box.h.


Member Typedef Documentation

template<class coord>
typedef coord box::argument_type
 

Definition at line 55 of file box.h.

template<class coord>
typedef coord box::result_type
 

Definition at line 56 of file box.h.


Constructor & Destructor Documentation

template<class coord>
box< coord >::box const coord &    cmin [inline]
 

Definition at line 34 of file box.h.

template<class coord>
box< coord >::box const coord &    cmin,
const coord &    cmax
[inline]
 

Definition at line 35 of file box.h.


Member Function Documentation

template<class coord>
const coord& box< coord >::the_min   const [inline]
 

Definition at line 38 of file box.h.

template<class coord>
const coord& box< coord >::the_max   const [inline]
 

Definition at line 39 of file box.h.

template<class coord>
coord box< coord >::center   const [inline]
 

Definition at line 40 of file box.h.

template<class coord>
coord& box< coord >::the_min   [inline]
 

Definition at line 43 of file box.h.

template<class coord>
coord& box< coord >::the_max   [inline]
 

Definition at line 44 of file box.h.

template<class coord>
coord box< coord >::global_coords const coord &    local const [inline]
 

Definition at line 47 of file box.h.

Referenced by operator().

template<class coord>
coord box< coord >::operator() const coord &    local const [inline]
 

Definition at line 57 of file box.h.

References global_coords.

template<class coord>
bool box< coord >::contains coord const &    p const [inline]
 

Definition at line 60 of file box.h.

template<class coord>
self& box< coord >::operator|= self const &    rs [inline]
 

Definition at line 75 of file box.h.

References maxc, and minc.


Friends And Related Function Documentation

template<class coord>
self operator| const self &    ls,
const self &    rs
[friend]
 

Definition at line 83 of file box.h.


The documentation for this class was generated from the following file:
Copyright (c) Guntram Berti 1997-2002. See the GrAL Homepage for up-to-date information.

Generated at Tue Feb 26 15:57:31 2002 for Geometry by doxygen 1.2.11-20011104 written by Dimitri van Heesch, © 1997-2000