BALL
1.5.0
Loading...
Searching...
No Matches
include
BALL
STRUCTURE
triangulatedSAS.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_TRIANGULATEDSAS_H
6
#define BALL_STRUCTURE_TRIANGULATEDSAS_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_TRUCTURE_SOLVENTEXCLUDEDSURFACE_H
17
# include <
BALL/STRUCTURE/solventAccessibleSurface.h
>
18
#endif
19
20
#ifndef BALL_STRUCTURE_TRIANGULATEDSURFACE_H
21
# include <
BALL/STRUCTURE/triangulatedSurface.h
>
22
#endif
23
24
#ifndef BALL_STRUCTURE_TRIANGLE_H
25
# include <
BALL/STRUCTURE/triangle.h
>
26
#endif
27
28
#ifndef BALL_STRUCTURE_TRIANGLEEDGE_H
29
# include <
BALL/STRUCTURE/triangleEdge.h
>
30
#endif
31
32
#ifndef BALL_STRUCTURE_TRIANGLEPOINT_H
33
# include <
BALL/STRUCTURE/trianglePoint.h
>
34
#endif
35
36
#ifndef BALL_MATHS_ANGLE_H
37
# include <
BALL/MATHS/angle.h
>
38
#endif
39
40
#ifndef BALL_MATHS_CIRCLE3_H
41
# include <
BALL/MATHS/circle3.h
>
42
#endif
43
44
#ifndef BALL_MATHS_VECTOR3_H
45
# include <
BALL/MATHS/vector3.h
>
46
#endif
47
48
#ifndef BALL_DATATYPE_HASHGRID_H
49
# include <
BALL/DATATYPE/hashGrid.h
>
50
#endif
51
52
#include <list>
53
#include <vector>
54
55
namespace
BALL
56
{
57
class
SASTriangulator;
58
62
class
BALL_EXPORT
TriangulatedSAS
:
public
TriangulatedSurface
63
{
64
65
public
:
66
72
friend
class
SASTriangulator
;
73
74
BALL_CREATE
(
TriangulatedSAS
)
75
76
79
80
83
TriangulatedSAS
();
84
90
TriangulatedSAS
(const
TriangulatedSAS
& surface,
bool
= true);
91
97
TriangulatedSAS
(
SolventAccessibleSurface
* sas, const
double
& density);
98
102
virtual ~
TriangulatedSAS
();
104
108
113
void
set(const
TriangulatedSAS
& surface,
bool
= true);
114
118
TriangulatedSAS
& operator = (const
TriangulatedSAS
& surface);
119
121
125
128
void
setDensity(const
double
& density);
129
132
double
getDensity() const;
133
136
void
compute();
137
139
140
protected:
141
142
/*_ @name Attributes
143
*/
145
146
SolventAccessibleSurface
* sas_;
147
148
double
density_;
149
151
152
};
153
160
class
BALL_EXPORT
SASTriangulator
161
{
162
163
public
:
164
165
#ifdef debug_triangulation
166
void
printToHINFile(
string
filename);
167
void
Contour2HIN(
const
std::list<TriangleEdge*>& contour,
const
string
& file);
168
void
SASEdge2HIN(
SASEdge
* edge,
const
string
& file);
169
#endif
170
171
BALL_CREATE
(
SASTriangulator
)
172
173
176
177
180
SASTriangulator
();
181
186
SASTriangulator
(
TriangulatedSAS
* tsas);
187
191
virtual ~
SASTriangulator
();
193
197
198
void
run();
199
200
private:
201
202
void
triangulateFace(
SASFace
* face);
203
204
void
createPlanes(
SASFace
* face,
205
std
::list<
std
::pair<
TPlane3
<
double
>,
double
> >& planes);
206
207
void
tagPoints(
TriangulatedSurface
& part,
208
const
std
::list<
std
::pair<
TPlane3
<
double
>,
double
> >& planes);
209
210
void
removeInsideTriangles(
TriangulatedSurface
& part);
211
212
HashGrid3
<
TrianglePoint
*> createHashGrid(const
TriangulatedSurface
& part);
213
214
void
createPoints(
TriangulatedSurface
& part,
215
const
std
::list<
std
::pair<
TPlane3
<
double
>,
double
> >& planes,
216
HashGrid3
<
TrianglePoint
*>& grid);
217
218
void
createNewTriangles(
TriangulatedSurface
& part,
HashGrid3
<
TrianglePoint
*>& grid);
219
220
void
onePointOutside(
Index
outside,
Triangle
* t,
221
TriangulatedSurface
& part,
HashGrid3
<
TrianglePoint
*>& grid);
222
223
void
twoPointsOutside(
Position
outside1,
Position
outside2,
224
Triangle
* t,
TriangulatedSurface
& part,
HashGrid3
<
TrianglePoint
*>& grid);
225
226
TrianglePoint
* vertexExists(const
TVector3
<
double
>& point,
HashGrid3
<
TrianglePoint
*>& grid);
227
228
Size
numberOfRefinements(const
double
& density, const
double
& radius);
229
230
void
buildTemplateSpheres();
231
233
234
protected:
235
239
240
TriangulatedSAS
* tsas_;
241
242
double
sqrt_density_;
243
244
std
::vector<
std
::list<
TVector3
<
double
> > > edge_;
245
246
HashMap
<
Size
,
TriangulatedSurface
> template_spheres_;
247
249
250
};
251
252
}
// namespace BALL
253
254
255
#endif
// BALL_STRUCTURE_TRIANGULATEDSAS_H
BALL_CREATE
#define BALL_CREATE(name)
Definition
create.h:62
SASEdge.h
trianglePoint.h
triangulatedSurface.h
SASFace.h
triangleEdge.h
solventAccessibleSurface.h
triangle.h
hashGrid.h
vector3.h
angle.h
circle3.h
std
STL namespace.
BALL
Definition
constants.h:13
BALL::HashGrid3
Three-dimensional Hash Grid Class.
Definition
hashGrid.h:755
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions)
Definition
hashMap.h:74
BALL::TPlane3
Definition
plane3.h:53
BALL::TVector3
Definition
vector3.h:71
BALL::SASEdge
Definition
SASEdge.h:34
BALL::SASFace
Definition
SASFace.h:31
BALL::SolventAccessibleSurface
Definition
solventAccessibleSurface.h:39
BALL::Triangle
Definition
triangle.h:39
BALL::TrianglePoint
Definition
trianglePoint.h:43
BALL::TriangulatedSAS
Definition
triangulatedSAS.h:63
BALL::SASTriangulator
Definition
triangulatedSAS.h:161
BALL::TriangulatedSurface
Definition
triangulatedSurface.h:41
BALL_INDEX_TYPE
BALL_SIZE_TYPE
BALL_EXPORT
#define BALL_EXPORT
Definition
COMMON/global.h:50
Generated by
1.9.8