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.");
186 if (v1.mag2() < v2.mag2())
return v1;
222 for (
G4int i = 0; i <= 3; ++i)
225 if (sp > ss) ss =
sp;
241 if (!intersect) intersect =
276 return "G4QuadrangularFacet";
ThreeVector shoot(const G4int Ap, const G4int Af)
G4TriangularFacet fFacet1
G4bool Intersect(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool outgoing, G4double &distance, G4double &distFromSurface, G4ThreeVector &normal)
static const G4double kInfinity
CLHEP::Hep3Vector G4ThreeVector
G4double Extent(const G4ThreeVector axis)
G4ThreeVector GetSurfaceNormal() const
G4bool Intersect(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool outgoing, G4double &distance, G4double &distFromSurface, G4ThreeVector &normal)
G4QuadrangularFacet(const G4ThreeVector &Pt0, const G4ThreeVector &vt1, const G4ThreeVector &vt2, const G4ThreeVector &vt3, G4FacetVertexType)
static double normal(HepRandomEngine *eptr)
G4GLOB_DLL std::ostream G4cout
G4ThreeVector GetVertex(G4int i) const
static const G4double dirTolerance
G4ThreeVector GetPointOnFace() const
G4QuadrangularFacet & operator=(const G4QuadrangularFacet &right)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4TriangularFacet fFacet2
G4ThreeVector GetPointOnFace() const
G4ThreeVector GetSurfaceNormal() const
G4ThreeVector Distance(const G4ThreeVector &p)
G4GeometryType GetEntityType() const
G4ThreeVector Distance(const G4ThreeVector &p)