Debian Codegraph @

src/CylinderVol.h

raw
1 /////////////////////////////////////////////////////////////
2 // //
3 // Copyright (c) 2007-2017 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.apache.org/licenses/LICENSE-2.0 //
10 // //
11 /////////////////////////////////////////////////////////////
12
13 #ifndef __CYLINDERVOL_H
14 #define __CYLINDERVOL_H
15
16 // --- Project includes ---
17 #include "AVolume3D.h"
18 #include "geometry/Cylinder.h"
19 #include "geometry/Plane.h"
20
21 // --- STL includes ---
22 #include <vector>
23 #include <map>
24
25 using std::vector;
26 using std::map;
27
28 class CylinderVol : public AVolume3D
29 {
30 protected:
31 Cylinder m_cyl;
32 Plane m_bottom,m_top;
33 double m_len;
34 Vector3 m_xd,m_yd; // "in plane" vectors;
35
36 public:
37 CylinderVol();
38 CylinderVol(const Vector3&,const Vector3&,double,double);
39 virtual ~CylinderVol(){};
40
41 virtual pair<Vector3,Vector3> getBoundingBox();
42 virtual Vector3 getAPoint(int) const;
43 virtual const map<double,const AGeometricObject*> getClosestObjects(const Vector3&,int) const;
44 virtual bool isIn(const Vector3&) const;
45 virtual bool isIn(const Sphere&);
46 virtual bool isFullyOutside(const Sphere&);
47
48 friend ostream& operator << (ostream&,const CylinderVol&);
49 };
50
51 #endif // __CYLINDERVOL_H