Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxBoundingBox.h

00001 /*
00002  *  Copyright (c) 2000, University of Amsterdam, The Netherlands.
00003  *  All rights reserved.
00004  *
00005  *
00006  *  Author(s):
00007  *  Edo Poll (poll@wins.uva.nl)
00008  */
00009 
00010 #ifndef HxBoundingBox_h
00011 #define HxBoundingBox_h
00012 
00013 #include "HxPointZ.h"
00014 #include "HxSizes.h"
00015 #include "HxIoFwd.h"
00016 
00017 
00021 class L_HXBASIS HxBoundingBox
00022 {
00023 public:
00025                         HxBoundingBox(HxPointZ b, HxPointZ e);
00026 
00028                         HxBoundingBox(HxSizes s);
00029 
00031     HxPointZ            begin() const;
00032 
00034     HxPointZ            end() const;
00035 
00037     HxSizes             size() const;
00038 
00040     bool                isEmpty() const;
00041 
00043     HxBoundingBox       unite(const HxBoundingBox& arg) const;
00044 
00046     HxBoundingBox       intersect(const HxBoundingBox& arg) const;
00047 
00049     HxBoundingBox       extend(HxPointZ p) const;
00050 
00052     HxBoundingBox       translate(HxPointZ p) const;
00053 
00055     bool                includes(HxPointZ p) const;
00056 
00058     STD_OSTREAM&        put(STD_OSTREAM&) const;
00059 
00060 private:
00061     HxPointZ            _begin;
00062     HxPointZ            _end;
00063     bool                _isEmpty;
00064 };
00065 
00066 inline HxPointZ
00067 HxBoundingBox::begin() const
00068 {
00069     return _begin;
00070 }
00071 
00072 inline HxPointZ
00073 HxBoundingBox::end() const
00074 {
00075     return _end;
00076 }
00077 
00078 inline bool
00079 HxBoundingBox::isEmpty() const
00080 {
00081     return _isEmpty;
00082 }
00083 
00084 inline STD_OSTREAM&
00085 operator<<(STD_OSTREAM& os, const HxBoundingBox& bb)
00086 {
00087     return bb.put(os);
00088 }
00089 
00090 #endif

Generated on Tue Feb 3 14:18:31 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001