OpenStructure
Loading...
Searching...
No Matches
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-2020 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
29namespace ost { namespace mol {
30
31// molecular surface vertex, POD
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
56typedef unsigned int SurfaceVertexID;
57
58// molecular surface face, POD
62
63typedef unsigned int SurfaceTriID;
64
65typedef std::vector<SurfaceVertex> SurfaceVertexList;
66
67}}
68
69#endif
Three dimensional vector class, using Real precision.
Definition vec3.hh:48
Handle to atom datatype.
unsigned int SurfaceVertexID
std::vector< SurfaceVertex > SurfaceVertexList
unsigned int SurfaceTriID
Definition base.dox:1
SurfaceVertexID v2
SurfaceVertexID v1
SurfaceVertexID v0
SurfaceVertex(const geom::Vec3 &pos, const geom::Vec3 &norm, int t, const AtomHandle &a=AtomHandle())
bool operator!=(const SurfaceVertex &rhs) const
bool operator==(const SurfaceVertex &rhs) const