~esys-p-dev/esys-particle/gengeo

« back to all changes in this revision

Viewing changes to src/MeshVolWithJointSet.h

  • Committer: Dion Weatherley
  • Date: 2014-12-15 04:05:00 UTC
  • Revision ID: d.weatherley@uq.edu.au-20141215040500-wzwl42djikubfk9b
Added MeshVolWithJointSet

Sub-classes MeshVolume to permit inclusion of joint sets within triangle mesh volumes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
//                                                         //
 
11
/////////////////////////////////////////////////////////////
 
12
 
 
13
#ifndef __MESH_VOL_JOINT_SET_H
 
14
#define __MESH_VOL_JOINT_SET_H
 
15
 
 
16
// --- Project includes ---
 
17
#include "MeshVolume.h"
 
18
#include "TriPatchSet.h"
 
19
#include "util/vector3.h"
 
20
 
 
21
// --- STL includes ---
 
22
 
 
23
/*!
 
24
  \class MeshVolWithJointSet
 
25
 
 
26
  A class for the generation of random particles inside a volume bounded by a triangle mesh, with the option of including joint sets.
 
27
  The correctness of the supplied mesh, i.e. that it actually defines a closed surface,
 
28
  is not checked in the class. Instead the caller is responsible to supply a correct mesh.
 
29
  No convexity or other topological requirements apply to the volume. 
 
30
  Facet orientations is not relevant.
 
31
  Works also if the mesh encloses multiple volumes. 
 
32
*/
 
33
class MeshVolWithJointSet : public MeshVolume
 
34
{
 
35
 protected:
 
36
  vector<Triangle3D> m_joints;
 
37
 
 
38
 public:
 
39
  MeshVolWithJointSet();
 
40
  MeshVolWithJointSet(const TriPatchSet&);
 
41
  virtual ~MeshVolWithJointSet(){};
 
42
 
 
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
  void addJoints(const TriPatchSet&);
 
47
};
 
48
 
 
49
#endif // __MESH_VOL_JOINT_SET_H