7 double &
t0,
double &
t1,
double &t2,
double &t3,
double &t4,
8 double &t5,
double &t6,
double &t7,
double &t8,
20 double Cx, Cy, Cz, den,
23 Cx = (xyz[n2][0] - xyz[n1][0]) / L;
24 Cy = (xyz[n2][1] - xyz[n1][1]) / L;
25 Cz = (xyz[n2][2] - xyz[n1][2]) / L;
27 t0 = t1 = t2 = t3 = t4 = t5 = t6 = t7 = t8 = 0.0;
43 den = sqrt(1.0 - Cz*Cz);
49 t3 = (-Cx*Cz*Sp - Cy*Cp) / den;
50 t4 = (-Cy*Cz*Sp + Cx*Cp) / den;
53 t6 = (-Cx*Cz*Cp + Cy*Sp) / den;
54 t7 = (-Cy*Cz*Cp - Cx*Sp) / den;
62 double &
t0,
double &
t1,
double &t2,
double &t3,
double &t4,
63 double &t5,
double &t6,
double &t7,
double &t8,
66 double L = sqrt((u.
x() - v.
x())*(u.
x() - v.
x()) + (u.
y() - v.
y())*(u.
y() - v.
y())
67 + (u.
z() - v.
z())*(u.
z() - v.
z()));
69 double Cx, Cy, Cz, den,
72 Cx = (v.
x() - u.
x()) / L;
73 Cy = (v.
y() - u.
y()) / L;
74 Cz = (v.
z() - u.
z()) / L;
76 t0 = t1 = t2 = t3 = t4 = t5 = t6 = t7 = t8 = 0.0;
91 den = sqrt(1.0 - Cz*Cz);
97 t3 = (-Cx*Cz*Sp - Cy*Cp) / den;
98 t4 = (-Cy*Cz*Sp + Cx*Cp) / den;
101 t6 = (-Cx*Cz*Cp + Cy*Sp) / den;
102 t7 = (-Cy*Cz*Cp - Cx*Sp) / den;
109 double t0,
double t1,
double t2,
double t3,
double t4,
110 double t5,
double t6,
double t7,
double t8,
111 MX &
m,
float r1,
float r2)
121 for (i = 0; i < 4; i++)
123 t(3 * i, 3 * i) = t0;
124 t(3 * i, 3 * i + 1) = t1;
125 t(3 * i, 3 * i + 2) = t2;
126 t(3 * i + 1, 3 * i) = t3;
127 t(3 * i + 1, 3 * i + 1) = t4;
128 t(3 * i + 1, 3 * i + 2) = t5;
129 t(3 * i + 2, 3 * i) = t6;
130 t(3 * i + 2, 3 * i + 1) = t7;
131 t(3 * i + 2, 3 * i + 2) = t8;
136 mt = t.transpose() * m * t;
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
void TransLocToGlob(double t0, double t1, double t2, double t3, double t4, double t5, double t6, double t7, double t8, MX &m, float r1, float r2)
void CreateTransMatrix(std::vector< V3 > xyz, double L, int n1, int n2, double &t0, double &t1, double &t2, double &t3, double &t4, double &t5, double &t6, double &t7, double &t8, float p)