Debian Codegraph @

src/ConvexPolyhedron.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 __CONVEX_POLYHEDRON_H
14 #define __CONVEX_POLYHEDRON_H
15
16 // --- Project includes ---
17 #include "BoxWithPlanes3D.h"
18 #include "geometry/Plane.h"
19
20 // --- STL includes ---
21 #include <vector>
22 #include <map>
23
24 using std::vector;
25 using std::map;
26
27 /*!
28 \class ConvexPolyhedron
29
30 A class for the generation of random particles inside a convex polyhedron.
31 The polyhedron defined by a bounding box and an arbitrary number of planes to which the particles are fitted. The bounding box is largely there to prevent the generation of infinite polyhedra.
32 */
33 class ConvexPolyhedron : public BoxWithPlanes3D
34 {
35 protected:
36
37 public:
38 ConvexPolyhedron();
39 ConvexPolyhedron(const Vector3&,const Vector3&);
40 virtual ~ConvexPolyhedron();
41
42 virtual Vector3 getAPoint(int)const;
43 virtual bool isIn(const Vector3&) const;
44 virtual bool isIn(const Sphere&);
45 };
46 #endif //__CONVEX_POLYHEDRON_H