OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
surface_impl.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_IMPL_HH
20 #define OST_SURFACE_IMPL_HH
21 
22 #include <vector>
23 
24 #include <ost/mol/surface_prop.hh>
26 
27 #include "surface_impl_fw.hh"
28 
29 namespace ost { namespace mol { namespace impl {
30 
33 
36 
37  typedef std::vector<SurfaceVertex> VertexList;
38  typedef std::vector<SurfaceTri> FaceList;
39 
40 public:
41  SurfaceImpl();
42 
43  SurfaceVertexID AddVertex(const SurfaceVertex& v);
45 
46  void Attach(const EntityHandle& eh, Real cutoff);
47  void Attach(const EntityView& ev, Real cutoff);
48 
49  SurfaceVertex& Vertex(SurfaceVertexID id);
50  const SurfaceVertex& Vertex(SurfaceVertexID id) const;
51 
52  SurfaceTri& Tri(SurfaceTriID id);
53  const SurfaceTri& Tri(SurfaceTriID id) const;
54 
55  std::vector<SurfaceVertexID> GetVertexIDList() const;
56  std::vector<SurfaceVertexID> GetTriIDList() const;
57 
58  SurfaceVertexList FindWithin(const geom::Vec3& pos, Real distance);
59 
60  void Invert();
61 
62 private:
63  VertexList vertex_list_;
64  FaceList face_list_;
65 
66  SpatialSurfaceVertexOrganizer vertex_organizer_;
67 
68  std::vector<SurfaceVertexID> vertex_id_list_;
69  std::vector<SurfaceTriID> tri_id_list_;
70 };
71 
72 }}} // ns
73 
74 #endif
std::vector< SurfaceVertex > SurfaceVertexList
Definition: surface_prop.hh:65
Mat2 DLLEXPORT_OST_GEOM Invert(const Mat2 &m)
Matrix inversion.
float Real
Definition: base.hh:44
Protein or molecule.
unsigned int SurfaceVertexID
Definition: surface_prop.hh:56
SpatialOrganizer< SurfaceVertexID > SpatialSurfaceVertexOrganizer
Definition: surface_impl.hh:32
Three dimensional vector class, using Real precision.
Definition: vec3.hh:43
#define DLLEXPORT_OST_MOL
definition of EntityView
Definition: entity_view.hh:86
unsigned int SurfaceTriID
Definition: surface_prop.hh:63