GenGeo  1.1
CylinderVol.h
Go to the documentation of this file.
1 
2 // //
3 // Copyright (c) 2007-2014 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.opensource.org/licenses/osl-3.0.php //
10 // //
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:
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