-
Notifications
You must be signed in to change notification settings - Fork 1
/
tri.h
66 lines (56 loc) · 3.2 KB
/
tri.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
real tri_angle(const real[3], const real b[3], const real[3]);
real tri_area(const real[3], const real[3], const real[3]);
real tri_cot(const real[3], const real b[3], const real[3]);
int tri_edg(const real[3], const real[3], const real[3], /**/ real[3],
real[3], real[3]);
real tri_volume(const real[3], const real[3], const real[3]);
int tri_normal(const real[3], const real[3], const real[3], /**/ real[3]);
int tri_center(const real[3], const real[3], const real[3], /**/ real[3]);
/* geomveiw objects */
int tri_off(const real[3], const real[3], const real[3], FILE *);
int tri_vect(const real[3], const real[3], const real[3], const real[3],
const real[3], const real[3], FILE *);
int tri_list(const real[3], const real[3], const real[3], const real[3],
const real[3], const real[3], FILE *);
/* project triangle to 2D: a->[0, 0], b->[ux, 0], c->[wx, uy] */
int tri_3to2(const real a[3], const real b[3], const real c[3],
/**/ real * ux, real * wx, real * wy);
/* ex[3], ey[3]: basis local to a triangle
ex = norm(b - a)
ey is normal to ex in a plane of a triangle */
int tri_2to3(const real a[3], const real b[3], const real c[3],
/**/ real ex[3], real ey[3]);
int tri_3d_invariants(const real[3], const real[3], const real[3],
const real[3], const real[3], const real[3],
/**/ real * al, real * be);
int tri_2d_invariants(real bx, real cx, real cy, real ux, real wx, real wy,
/**/ real * al, real * be);
/* |a - b|^2/area */
real tri_edg_area(const real a[3], const real b[3], const real[3]);
real tri_alpha(const real a[3], const real b[3], const real c[3],
const real u[3], const real v[3], const real w[3]);
real tri_beta(const real a[3], const real b[3], const real c[3],
const real u[3], const real v[3], const real w[3]);
real tri_lim_area(real Ka, real a3, real a4, const real[3], const real[3],
const real[3], const real[3], const real[3],
const real[3]);
real tri_lim_shear(real mu, real b1, real b2, const real[3], const real[3],
const real[3], const real[3], const real[3],
const real[3]);
real tri_lim(real Ka, real a3, real a4, real mu, real b1, real b2,
const real[3], const real[3], const real[3], const real[3],
const real[3], const real[3]);
int tri_abc(const real[3], const real[3], const real[3], const real[3],
const real[3], const real[3], /**/ real *, real *, real *);
real tri_point_distance2(const real[3], const real[3], const real[3],
const real[3]);
real tri_point_distance(const real[3], const real[3], const real[3],
const real[3]);
int tri_point_closest(const real[3], const real[3], const real[3],
const real[3], /**/ real[3]);
int tri_moment(const real[3], const real[3], const real[3], /**/ real *,
real *, real *, real *, real *, real *);
int tri_inertia(const real[3], const real[3], const real[3], /**/ real[6]);
/* center of opposing edge */
int tri_edg_center(const real[3], const real[3], const real[3],
/**/ real[3], real[3], real[3]);