26 double *
theta,
double tt[])
28 double t1,
t2, a, b,
c = l1->
nx.Dot(l2->
nx);
29 TVector3 xy, q1, q2, _dd_;
30 int config = 0, exact_crossing_flag = 0;
45 t2 = config ? 0. : (b - a*
c)/(1 -
SQR(c));
55 q1 = t1 * l1->
nx + l1->
x;
56 q2 = t2 * l2->
nx + l2->
x;
68 crs->
x = 0.5 * (q1 + q2);
81 exact_crossing_flag = 1;
91 if (rx) *rx = exact_crossing_flag ? 0. : _dd_.Mag();
95 if (theta) *theta =
rad2deg(acos(c));
107 double a,
c = pl->
nx.Dot(ll->
nx);
126 crs = ll->
x + (a/
c) * ll->
nx;
174 vv = ll->
x + t0 * ll->
nx;
186 pl->
nx = ll->
nx.Cross(vv);
197 TVector3 diff, pro, orth;
201 pro = diff.Dot(ll->
nx) * ll->
nx;
220 return fabs(vv.Dot(pl->
nx));
229 cross_l_l(l1, l2, NULL, &dist, NULL, NULL);
236 t_3d_line parametrize_straight_line(
double S[4],
double z)
238 double norm = sqrt(1. +
SQR(S[2]) +
SQR(S[3]));
240 return t_3d_line(TVector3(S[0], S[1], z), TVector3(S[2]/norm, S[3]/norm, 1./norm));
245 double norm = sqrt(1. +
SQR(S[2]) +
SQR(S[3]));
247 x = TVector3(S[0], S[1], z);
248 nx = TVector3(S[2]/norm, S[3]/norm, 1./norm);
257 t_3d_plane parametrization_plane(TVector3(0., 0., z), TVector3(0., 0., 1.));
259 if (
cross_p_l(¶metrization_plane, line, crs))
return -1;
264 if (!line->
nx[
_Z_])
return -1;