BALL 1.5.0
triangulatedSES.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_TRIANGULATEDSES_H
6#define BALL_STRUCTURE_TRIANGULATEDSES_H
7
8#ifndef BALL_TRUCTURE_SOLVENTEXCLUDEDSURFACE_H
10#endif
11
12#ifndef BALL_STRUCTURE_TRIANGLE_H
14#endif
15
16#ifndef BALL_STRUCTURE_TRIANGLEEDGE_H
18#endif
19
20#ifndef BALL_STRUCTURE_TRIANGLEPOINT_H
22#endif
23
24#ifndef BALL_STRUCTURE_TRIANGULATEDSURFACE_H
26#endif
27
28#ifndef BALL_MATHS_ANGLE_H
29# include <BALL/MATHS/angle.h>
30#endif
31
32#ifndef BALL_MATHS_CIRCLE3_H
33# include <BALL/MATHS/circle3.h>
34#endif
35
36#ifndef BALL_MATHS_SPHERE3_H
37# include <BALL/MATHS/sphere3.h>
38#endif
39
40#ifndef BALL_MATHS_VECTOR3_H
41# include <BALL/MATHS/vector3.h>
42#endif
43
44#include <list>
45#include <vector>
46
47namespace BALL
48{
49 class SESTriangulator;
50
55 {
56
57 public:
58
64 friend class SESTriangulator;
65
67
68
71
72
76 ;
77
83 TriangulatedSES(const TriangulatedSES& surface, bool = true)
84 ;
85
91 TriangulatedSES(SolventExcludedSurface* ses, const double& density)
92 ;
93
97 virtual ~TriangulatedSES()
98 ;
100
104
109 void set(const TriangulatedSES& surface, bool = true)
110 ;
111
115 TriangulatedSES& operator = (const TriangulatedSES& surface)
116 ;
117
120 void setDensity(const double& density)
121 ;
122
125 double getDensity() const
126 ;
127
129
133
137 void compute();
138
140
141 protected:
142
143 /*_ @name Attributes
144 */
146
148
149 double density_;
150
152
153 };
154
155
156
164 {
165
166 public:
167
169
170
173
174
178 ;
179
184 ;
185
190 ;
192
196
200 void run();
201
202 private:
203
204 void preProcessing()
205 ;
206
207 void triangulateToricFaces()
208 ;
209
210 void partitionSingularEdges()
211 ;
212
213 void triangulateContactFaces()
214 ;
215
216 void triangulateSphericFaces()
217 ;
218
219 void triangulateToricFace
220 (SESFace* face,
221 const double& probe_radius)
222 ;
223
224 void triangulateFreeToricFace
225 (SESFace* face,
226 const double& probe_radius)
227 ;
228
229 void triangulateSingularToricFace
230 (SESFace* face,
231 const double& probe_radius)
232 ;
233
234 void triangulateNonSingularToricFace
235 (SESFace* face,
236 const double& probe_radius)
237 ;
238
239 void partitionSingularEdge(SESEdge* singular_edge)
240 ;
241
242 void partitionFreeSingularEdge(SESEdge* singular_edge)
243 ;
244
245 void partitionNonFreeSingularEdge(SESEdge* singular_edge)
246 ;
247
248 void triangulateContactFace
249 (SESFace* face,
250 const TSphere3<double>& sphere)
251 ;
252
253 bool triangulateSphericFace
254 (SESFace* face,
255 const TSphere3<double>& sphere)
256 ;
257
258 bool buildSphericTriangles
259 (SESFace* face,
260 TriangulatedSES& part,
261 const TSphere3<double>& sphere,
262 bool convex = true)
263 ;
264
265 bool buildFirstTriangle
266 (SESFace* face,
267 TriangulatedSES& part,
268 std::list<TriangleEdge*>& border,
269 const TSphere3<double>& sphere,
270 const HashSet<TrianglePoint*>& points,
271 bool convex)
272 ;
273
274 SESEdge* firstSESEdge(const std::list<SESEdge*>& sesedge)
275 ;
276
277 void buildUnambiguousTriangle
278 (TriangleEdge* edge,
279 TrianglePoint* point,
280 std::list<TriangleEdge*>& border,
281 const TSphere3<double>& sphere,
282 TriangulatedSES& part,
283 bool convex
284 )
285 ;
286
287 void buildAmbiguousTriangles
288 (TriangleEdge* edge,
289 std::list<TrianglePoint*> points,
290 std::list<TriangleEdge*>& border,
291 const TSphere3<double>& sphere,
292 TriangulatedSES& part,
293 bool convex
294 )
295 ;
296
297 void createTriangleAndEdges
298 (TriangleEdge* edge,
299 TrianglePoint* point,
300 const TSphere3<double>& sphere,
301 TriangleEdge*& edge1,
302 bool& old1,
303 TriangleEdge*& edge2,
304 bool& old2,
305 Triangle*& triangle,
306 bool convex
307 )
308 ;
309
310 void partitionOfCircle
311 (const TCircle3<double>& circle,
312 const TVector3<double>& p0,
313 const TAngle<double>& phi,
314 Size number_of_segments,
315 vector< TVector3<double> >& partition,
316 bool on_surface = true)
317 ;
318
319 Size numberOfRefinements(const double& density, const double& radius)
320 ;
321
322 void buildTemplateSpheres()
323 ;
324
325 void buildTriangles
326 (SESEdge* edge0,
327 SESEdge* edge1,
328 SESEdge* edge2,
329 SESEdge* edge3,
330 const std::vector< TVector3<double> >& centers,
331 const std::vector< TVector3<double> >& edge1_points,
332 const std::vector< TVector3<double> >& edge3_points,
333 const double& probe_radius)
334 ;
335
337
338 protected:
339
340 /*_ @name Attributes
341 */
343
345 std::vector<TrianglePoint*> point_;
346 std::vector<std::list<TriangleEdge*> > edge_;
347 HashMap<Size, std::list<TrianglePoint*> > template_spheres_;
348 double sqrt_density_;
349
351
352 };
353
354
355} // namespace BALL
356
357
358#endif // BALL_STRUCTURE_TRIANGULATEDSES_H
#define BALL_CREATE(name)
Definition: create.h:62
STL namespace.
Definition: constants.h:13
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:74
#define BALL_EXPORT
Definition: COMMON/global.h:50