1
/////////////////////////////////////////////////////////////
3
// Copyright (c) 2007-2011 by The University of Queensland //
4
// Earth Systems Science Computational Centre (ESSCC) //
5
// http://www.uq.edu.au/esscc //
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 //
11
/////////////////////////////////////////////////////////////
13
#ifndef __BOXWITHLINES2D_H
14
#define __BOXWITHLINES2D_H
16
// --- Project includes ---
17
#include "AVolume2D.h"
19
// --- STL includes ---
23
// --- IO includes ---
34
A class for the generation of random particles inside a box. An arbitrary number
35
of lines can be added to which the particles are fitted.
37
class BoxWithLines2D : public AVolume2D
42
vector<Line2D> m_lines;
43
double m_random(double,double)const;
47
BoxWithLines2D(const Vector3&,const Vector3&);
48
virtual ~BoxWithLines2D(){};
50
void addLine(const Line2D&);
51
virtual pair<Vector3,Vector3> getBoundingBox();
52
virtual Vector3 getAPoint(int)const;
53
virtual bool hasPlane() const{return (m_lines.size()>0);};
54
virtual Line2D getClosestPlane(const Vector3&);
55
virtual const map<double,const Line2D*> getClosestPlanes(const Vector3&,int) const;
56
virtual bool isIn(const Vector3&) const;
57
virtual bool isIn(const Sphere&);
59
friend ostream& operator<< (ostream&, const BoxWithLines2D&);
61
#endif // __BOXWITHLINES2D_H