75 SetVertex(1, vt0 + vt1);
76 SetVertex(2, vt0 + vt2);
77 SetVertex(3, vt0 + vt3);
84 G4double length2 = (GetVertex(2)-GetVertex(1)).mag();
85 G4double length3 = (GetVertex(3)-GetVertex(2)).mag();
91 bool isDefined = (length1 > kCarTolerance && length2 > kCarTolerance &&
92 length3 > kCarTolerance && length4 > kCarTolerance &&
93 normal1.
dot(normal2) >= 0.9999999999);
106 + fFacet2.GetSurfaceNormal();
111 fFacet1.SetSurfaceNormal (normal);
112 fFacet2.SetSurfaceNormal (normal);
115 fCircumcentre = GetVertex(0) + vtmp;
117 fRadius = std::sqrt(radiusSqr);
121 G4Exception(
"G4QuadrangularFacet::G4QuadrangularFacet()",
123 "Length of sides of facet are too small or sides not planar.");
149 fFacet1 = rhs.fFacet1;
150 fFacet2 = rhs.fFacet2;
162 fFacet1 = rhs.fFacet1;
163 fFacet2 = rhs.fFacet2;
186 if (v1.
mag2() < v2.
mag2())
return v1;
222 for (
G4int i = 0; i <= 3; ++i)
225 if (sp > ss) ss =
sp;
240 fFacet1.
Intersect(p,v,outgoing,distance,distFromSurface,normal);
241 if (!intersect) intersect =
242 fFacet2.
Intersect(p,v,outgoing,distance,distFromSurface,normal);
245 distance = distFromSurface = kInfinity;
276 return "G4QuadrangularFacet";