93 normal1.
dot(normal2) >= 0.9999999999);
117 fRadius = std::sqrt(radiusSqr);
121 G4Exception(
"G4QuadrangularFacet::G4QuadrangularFacet()",
123 "Length of sides of facet are too small or sides not planar.");
129 G4cerr <<
"Side lengths = P0->P1" << length1 << endl;
130 G4cerr <<
"Side lengths = P1->P2" << length2 << endl;
131 G4cerr <<
"Side lengths = P2->P3" << length3 << endl;
132 G4cerr <<
"Side lengths = P3->P0" << length4 << endl;
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";
G4DLLIMPORT std::ostream G4cerr
Hep3Vector cross(const Hep3Vector &) const
double dot(const Hep3Vector &) const
void set(double x, double y, double z)
G4ThreeVector Distance(const G4ThreeVector &p)
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
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 kCarTolerance
static const G4double dirTolerance
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)