ESyS-Particle  4.0.1
BoundingBox.h
00001 
00002 //                                                         //
00003 // Copyright (c) 2003-2011 by The University of Queensland //
00004 // Earth Systems Science Computational Centre (ESSCC)      //
00005 // http://www.uq.edu.au/esscc                              //
00006 //                                                         //
00007 // Primary Business: Brisbane, Queensland, Australia       //
00008 // Licensed under the Open Software License version 3.0    //
00009 // http://www.opensource.org/licenses/osl-3.0.php          //
00010 //                                                         //
00012 
00013 
00014 #ifndef ESYS_LSMBOUNDINGBOX_H
00015 #define ESYS_LSMBOUNDINGBOX_H
00016 
00017 #include "Foundation/vec3.h"
00018 
00019 namespace esys
00020 {
00021   namespace lsm
00022   {
00027     class BoundingBox
00028     {
00029     public:
00030       inline BoundingBox();
00031       
00032       inline BoundingBox(const Vec3 &minBBoxPt, const Vec3 &maxBBoxPt);
00033 
00034       inline virtual ~BoundingBox();
00035 
00036       inline double getVolume() const;
00037 
00038       inline const Vec3 &getMinPt() const;
00039 
00040       inline const Vec3 &getMaxPt() const;
00041       
00042       inline bool operator==(const BoundingBox &bbox) const;
00043       
00044       inline Vec3 getSizes() const;
00045       
00046       inline bool contains(const Vec3 &pt, double tolerance = 0.0) const;
00047 
00048     private:
00049       Vec3 m_minPt;
00050       Vec3 m_maxPt;
00051     };
00052     inline std::ostream &operator<<(std::ostream &oStream, const BoundingBox &bbox);
00053   }
00054 }
00055 
00056 #include "Foundation/BoundingBox.hpp"
00057 
00058 #endif