94 if (leng1 <= delta || leng2 <= delta || leng3 <= delta || leng4 <= delta ||
95 diag1 <= delta || diag2 <= delta)
97 ostringstream message;
98 message <<
"Sides/diagonals of facet are too small." <<
G4endl
103 <<
"Side1 length (P0->P1) = " << leng1 <<
G4endl
104 <<
"Side2 length (P1->P2) = " << leng2 <<
G4endl
105 <<
"Side3 length (P2->P3) = " << leng3 <<
G4endl
106 <<
"Side4 length (P3->P0) = " << leng4 <<
G4endl
107 <<
"Diagonal1 length (P0->P2) = " << diag1 <<
G4endl
108 <<
"Diagonal2 length (P1->P3) = " << diag2;
109 G4Exception(
"G4QuadrangularFacet::G4QuadrangularFacet()",
126 if (h1 <= delta || h2 <= delta || h3 <= delta || h4 <= delta )
128 ostringstream message;
129 message <<
"Facet has three or more collinear vertices." <<
G4endl
134 <<
"Height in P0-P1-P2 = " << h1 <<
G4endl
135 <<
"Height in P1-P2-P3 = " << h2 <<
G4endl
136 <<
"Height in P2-P3-P4 = " << h3 <<
G4endl
137 <<
"Height in P4-P0-P1 = " << h4;
138 G4Exception(
"G4QuadrangularFacet::G4QuadrangularFacet()",
150 ostringstream message;
151 message <<
"Facet is not planar." <<
G4endl
152 <<
"Disrepancy = " << hmin <<
G4endl
157 G4Exception(
"G4QuadrangularFacet::G4QuadrangularFacet()",
167 if (magnitude2 > delta*delta)
172 if (s <= 0. || s >= 1. || t <= 0. || t >= 1.)
174 ostringstream message;
175 message <<
"Facet is not convex." <<
G4endl
176 <<
"Parameters of crosspoint of diagonals: "
178 <<
"should both be within (0,1) range" <<
G4endl
183 G4Exception(
"G4QuadrangularFacet::G4QuadrangularFacet()",
200 fRadius = std::sqrt(radiusSqr);
228 if (
this == &rhs)
return *
this;
254 if (v1.
mag2() < v2.
mag2())
return v1;
290 for (
G4int i = 0; i <= 3; ++i)
293 if (
sp > ss) ss =
sp;
309 if (!intersect) intersect =
345 return "G4QuadrangularFacet";
static const G4double e1[44]
static const G4double e2[44]
static const G4double e3[45]
G4double epsilon(G4double density, G4double temperature)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
static constexpr double s
double dot(const Hep3Vector &) const
G4ThreeVector Distance(const G4ThreeVector &p)
G4TriangularFacet fFacet1
G4ThreeVector fCircumcentre
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)
void SetVertex(G4int i, const G4ThreeVector &val)
G4ThreeVector GetSurfaceNormal() const
G4QuadrangularFacet & operator=(const G4QuadrangularFacet &right)
G4ThreeVector GetVertex(G4int i) const
G4TriangularFacet fFacet2
G4GeometryType GetEntityType() const
G4double Extent(const G4ThreeVector axis)
G4ThreeVector GetPointOnFace() const
void SetSurfaceNormal(G4ThreeVector normal)
G4ThreeVector GetPointOnFace() const
G4bool Intersect(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool outgoing, G4double &distance, G4double &distFromSurface, G4ThreeVector &normal)
G4ThreeVector Distance(const G4ThreeVector &p)
G4ThreeVector GetSurfaceNormal() const
static const G4double dirTolerance
static const G4double kInfinity
static double normal(HepRandomEngine *eptr)
T max(const T t1, const T t2)
brief Return the largest of the two arguments