~ubuntu-branches/ubuntu/saucy/python-demgengeo/saucy

« back to all changes in this revision

Viewing changes to src/TriPatchSet.h

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2011-11-18 21:47:18 UTC
  • Revision ID: package-import@ubuntu.com-20111118214718-4ysqm3dhpqwdd7gd
Tags: upstream-0.99~bzr106
ImportĀ upstreamĀ versionĀ 0.99~bzr106

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/////////////////////////////////////////////////////////////
 
2
//                                                         //
 
3
// Copyright (c) 2007-2011 by The University of Queensland //
 
4
// Earth Systems Science Computational Centre (ESSCC)      //
 
5
// http://www.uq.edu.au/esscc                              //
 
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 __TRIPATCHSET_H
 
14
#define __TRIPATCHSET_H
 
15
 
 
16
// project includes
 
17
#include "JointSet.h"
 
18
#include "Triangle3D.h"
 
19
#include "vector3.h"
 
20
 
 
21
// STL includes
 
22
#include <vector>
 
23
 
 
24
using std::vector;
 
25
 
 
26
/*!
 
27
  class to store joints as a collection of triangular patches and check if a bond crosses one of them
 
28
*/
 
29
class TriPatchSet : public JointSet
 
30
{
 
31
 private:
 
32
  vector<Triangle3D> m_triangles;
 
33
  Vector3 m_pmin;
 
34
  Vector3 m_pmax;
 
35
  bool m_bbx_set;
 
36
 
 
37
 public:
 
38
  TriPatchSet();
 
39
  virtual ~TriPatchSet(){};
 
40
 
 
41
 
 
42
  virtual int isCrossing(const Vector3&, const Vector3&) const;
 
43
  void addTriangle(const Vector3&, const Vector3&, const Vector3&,int);
 
44
  Vector3 getMinPoint() const {return m_pmin;};
 
45
  Vector3 getMaxPoint() const {return m_pmax;};
 
46
  vector<Triangle3D>::const_iterator triangles_begin() const {return m_triangles.begin();};
 
47
  vector<Triangle3D>::const_iterator triangles_end() const {return m_triangles.end();};
 
48
};
 
49
 
 
50
#endif // __TRIPATCHSET_H