BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
solventAccessibleSurface.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_STRUCTURE_SOLVENTACCESSIBLESURFACE_H
6 #define BALL_STRUCTURE_SOLVENTACCESSIBLESURFACE_H
7 
8 #ifndef BALL_STRUCTURE_SASEDGE_H
9 # include <BALL/STRUCTURE/SASEdge.h>
10 #endif
11 
12 #ifndef BALL_STRUCTURE_SASFACE_H
13 # include <BALL/STRUCTURE/SASFace.h>
14 #endif
15 
16 #ifndef BALL_STRUCTURE_SASVERTEX_H
18 #endif
19 
20 #ifndef BALL_STRUCTURE_REDUCEDSURFACE_H
22 #endif
23 
24 #ifndef BALL_MATHS_SPHERE3_H
25 # include <BALL/MATHS/sphere3.h>
26 #endif
27 
28 #include <vector>
29 
30 namespace BALL
31 {
32  class TriangulatedSAS;
33  class SASTriangulator;
34 
39  {
40  public:
41 
48  friend class TriangulatedSAS;
49  friend class SASTriangulator;
50 
52 
53 
56 
57 
61 
67  SolventAccessibleSurface(const SolventAccessibleSurface& sas, bool = false);
68 
71  SolventAccessibleSurface(ReducedSurface* reduced_surface);
72 
76  virtual ~SolventAccessibleSurface();
77 
79 
82 
85  void setVertex(SASVertex* vertex, Position i)
86  throw(Exception::IndexOverflow);
87 
90  SASVertex* getVertex(Position i) const
91  throw(Exception::IndexOverflow);
92 
95  Size numberOfVertices() const;
96 
99  void setEdge(SASEdge* edge, Position i)
100  throw(Exception::IndexOverflow);
101 
104  SASEdge* getEdge(Position i) const
105  throw(Exception::IndexOverflow);
106 
109  Size numberOfEdges() const;
110 
113  void setFace(SASFace* face, Position i)
114  throw(Exception::IndexOverflow);
115 
118  SASFace* getFace(Position i) const
119  throw(Exception::IndexOverflow);
120 
123  Size numberOfFaces() const;
124 
127  void setRS(ReducedSurface* rs);
128 
131  ReducedSurface* getRS() const;
132 
135  void clear();
136 
139  void compute();
140 
142 
143  private:
144 
145  /*_ @name SAS computation (private)
146  */
148 
149  void preProcessing();
150 
151  void get();
152 
153  void createFace(Position j);
154  void createVertex(Position j);
155  void createEdge(Position j);
156 
158 
159 
160  protected:
161 
162  Position number_of_vertices_;
163 
164  ::std::vector<SASVertex*> vertices_;
165 
166  Position number_of_edges_;
167 
168  ::std::vector<SASEdge*> edges_;
169 
170  Position number_of_faces_;
171 
172  ::std::vector<SASFace*> faces_;
173 
174  ReducedSurface* reduced_surface_;
175  };
176 
180 
183  BALL_EXPORT std::ostream& operator << (std::ostream& s, const SolventAccessibleSurface& sas);
184 
186 
187 } // namespace BALL
188 
189 #endif // BALL_STRUCTURE_SOLVENTACCESSIBLESURFACE_H
190