MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / plane_plane_intersect

Function plane_plane_intersect

code/geometry/primitives3d.cpp:79–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77 O = A + ((B - A) / (V1 + V2)) * V1;
78 return 1; }
79bool plane_plane_intersect(P(A), P(nA), P(B), P(nB),
80 point3d &P, point3d &Q) {
81 point3d n = nA * nB;
82 if (n.isZero()) return false;
83 point3d v = n * nA;
84 P = A + (n * nA) * ((B - A) % nB / (v % nB));
85 Q = P + n;
86 return true; }
87double line_line_distance(L(A, B), L(C, D), point3d &E,
88 point3d &F) {
89 point3d w = (C-A), v = (B-A), u = (D-C),

Callers

nothing calls this directly

Calls 1

isZeroMethod · 0.80

Tested by

no test coverage detected