00001
00002
00003
00004
00005
00006
00007
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 class L_HXBASIS HxBoundingBox
00018 {
00019 public:
00020
00021 HxBoundingBox(HxPointZ b, HxPointZ e);
00022 HxBoundingBox(HxSizes s);
00023
00024 HxPointZ begin() const;
00025 HxPointZ end() const;
00026 HxSizes size() const;
00027
00028 bool isEmpty() const;
00029
00030 HxBoundingBox unite(const HxBoundingBox& arg) const;
00031 HxBoundingBox intersect(const HxBoundingBox& arg) const;
00032
00033 HxBoundingBox extend(HxPointZ p) const;
00034 HxBoundingBox translate(HxPointZ p) const;
00035
00036 bool includes(HxPointZ p) const;
00037
00038 STD_OSTREAM& put(STD_OSTREAM&) const;
00039
00040 private:
00041 HxPointZ _begin;
00042 HxPointZ _end;
00043 bool _isEmpty;
00044 };
00045
00046 inline HxPointZ
00047 HxBoundingBox::begin() const
00048 {
00049 return _begin;
00050 }
00051
00052 inline HxPointZ
00053 HxBoundingBox::end() const
00054 {
00055 return _end;
00056 }
00057
00058 inline bool
00059 HxBoundingBox::isEmpty() const
00060 {
00061 return _isEmpty;
00062 }
00063
00064 inline STD_OSTREAM&
00065 operator<<(STD_OSTREAM& os, const HxBoundingBox& bb)
00066 {
00067 return bb.put(os);
00068 }
00069
00070 #endif