ESyS-Particle
4.0.1
|
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 #ifndef __RECT_PATCH_H 00014 #define __RECT_PATCH_H 00015 00016 // --- project includes --- 00017 #include "Foundation/vec3.h" 00018 #include "Geometry/Plane.h" 00019 00022 class RectPatch 00023 { 00024 private: 00025 double m_xmin,m_xmax,m_zmin,m_zmax,m_y0,m_dy; 00026 00027 public: 00028 RectPatch(double,double,double,double,double,double); 00029 00030 double sep(const Vec3&); 00031 double dist(const Vec3&); 00032 bool intersect(const Vec3&,const Vec3&); 00033 Plane getPlane(const Vec3&); 00034 Vec3 getBasePoint() const {return Vec3(m_xmin,m_y0,m_zmin);}; 00035 }; 00036 00037 00038 00039 #endif // __RECT_PATCH_H