OpenStructure
surface_prop.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2011 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_SURFACE_PROP_HH
20 #define OST_SURFACE_PROP_HH
21 
22 #include <vector>
23 #include <boost/shared_ptr.hpp>
24 
25 #include <ost/geom/geom.hh>
26 
27 #include "atom_handle.hh"
28 
29 namespace ost { namespace mol {
30 
31 // molecular surface vertex, POD
32 struct SurfaceVertex {
35  const geom::Vec3& norm,
36  int t,
37  const AtomHandle& a=AtomHandle()):
38  position(pos),
39  normal(norm),
40  type(t),
41  atom(a)
42  {}
43 
44  bool operator==(const SurfaceVertex& rhs) const {
45  return position==rhs.position && normal==rhs.normal && atom==rhs.atom;
46  }
47  bool operator!=(const SurfaceVertex& rhs) const {
48  return !this->operator==(rhs);
49  }
52  int type;
53  AtomHandle atom; // attached atom
54 };
55 
56 typedef unsigned int SurfaceVertexID;
57 
58 // molecular surface face, POD
59 struct SurfaceTri {
61 };
62 
63 typedef unsigned int SurfaceTriID;
64 
65 typedef std::vector<SurfaceVertex> SurfaceVertexList;
66 
67 }}
68 
69 #endif