#include <G4QuadrangularFacet.hh>
|
| G4QuadrangularFacet (const G4ThreeVector &Pt0, const G4ThreeVector &vt1, const G4ThreeVector &vt2, const G4ThreeVector &vt3, G4FacetVertexType) |
|
| G4QuadrangularFacet (const G4QuadrangularFacet &right) |
|
| ~G4QuadrangularFacet () |
|
G4QuadrangularFacet & | operator= (const G4QuadrangularFacet &right) |
|
G4VFacet * | GetClone () |
|
G4ThreeVector | Distance (const G4ThreeVector &p) |
|
G4double | Distance (const G4ThreeVector &p, G4double minDist) |
|
G4double | Distance (const G4ThreeVector &p, G4double minDist, const G4bool outgoing) |
|
G4double | Extent (const G4ThreeVector axis) |
|
G4bool | Intersect (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool outgoing, G4double &distance, G4double &distFromSurface, G4ThreeVector &normal) |
|
G4ThreeVector | GetSurfaceNormal () const |
|
G4double | GetArea () |
|
G4ThreeVector | GetPointOnFace () const |
|
G4GeometryType | GetEntityType () const |
|
G4bool | IsDefined () const |
|
G4int | GetNumberOfVertices () const |
|
G4ThreeVector | GetVertex (G4int i) const |
|
void | SetVertex (G4int i, const G4ThreeVector &val) |
|
void | SetVertices (std::vector< G4ThreeVector > *v) |
|
G4double | GetRadius () const |
|
G4ThreeVector | GetCircumcentre () const |
|
virtual | ~G4VFacet () |
|
G4bool | operator== (const G4VFacet &right) const |
|
virtual G4int | GetNumberOfVertices () const =0 |
|
virtual G4ThreeVector | GetVertex (G4int i) const =0 |
|
virtual void | SetVertex (G4int i, const G4ThreeVector &val)=0 |
|
virtual G4GeometryType | GetEntityType () const =0 |
|
virtual G4ThreeVector | GetSurfaceNormal () const =0 |
|
virtual G4bool | IsDefined () const =0 |
|
virtual G4ThreeVector | GetCircumcentre () const =0 |
|
virtual G4double | GetRadius () const =0 |
|
virtual G4VFacet * | GetClone ()=0 |
|
virtual G4double | Distance (const G4ThreeVector &, G4double)=0 |
|
virtual G4double | Distance (const G4ThreeVector &, G4double, const G4bool)=0 |
|
virtual G4double | Extent (const G4ThreeVector)=0 |
|
virtual G4bool | Intersect (const G4ThreeVector &, const G4ThreeVector &, const G4bool, G4double &, G4double &, G4ThreeVector &)=0 |
|
virtual G4double | GetArea ()=0 |
|
virtual G4ThreeVector | GetPointOnFace () const =0 |
|
void | ApplyTranslation (const G4ThreeVector v) |
|
std::ostream & | StreamInfo (std::ostream &os) const |
|
G4bool | IsInside (const G4ThreeVector &p) const |
|
virtual G4int | AllocatedMemory ()=0 |
|
virtual void | SetVertexIndex (G4int i, G4int j)=0 |
|
virtual G4int | GetVertexIndex (G4int i) const =0 |
|
virtual void | SetVertices (std::vector< G4ThreeVector > *vertices)=0 |
|
Definition at line 69 of file G4QuadrangularFacet.hh.
◆ G4QuadrangularFacet() [1/2]
Definition at line 54 of file G4QuadrangularFacet.cc.
59{
61
64 {
68
69 e1 = vt1 - vt0;
70 e2 = vt2 - vt0;
71 e3 = vt3 - vt0;
72 }
73 else
74 {
78
79 e1 = vt1;
80 e2 = vt2;
81 e3 = vt3;
82 }
87
90
93 normal1.
dot(normal2) >= 0.9999999999);
94
95 if (isDefined)
96 {
101
104
108 + facet4.GetSurfaceNormal();
110
113
117 fRadius = std::sqrt(radiusSqr);
118 }
119 else
120 {
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;
134 fRadius = 0.0;
135 }
136}
G4DLLIMPORT std::ostream G4cerr
Hep3Vector cross(const Hep3Vector &) const
double dot(const Hep3Vector &) const
void SetVertex(G4int i, const G4ThreeVector &val)
G4ThreeVector GetVertex(G4int i) const
void SetSurfaceNormal(G4ThreeVector normal)
G4ThreeVector GetSurfaceNormal() const
static const G4double kCarTolerance
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
◆ G4QuadrangularFacet() [2/2]
Definition at line 146 of file G4QuadrangularFacet.cc.
148{
149 fFacet1 = rhs.fFacet1;
150 fFacet2 = rhs.fFacet2;
151 fRadius = 0.0;
152}
◆ ~G4QuadrangularFacet()
G4QuadrangularFacet::~G4QuadrangularFacet |
( |
| ) |
|
◆ Distance() [1/3]
◆ Distance() [2/3]
◆ Distance() [3/3]
Implements G4VFacet.
Definition at line 201 of file G4QuadrangularFacet.cc.
203{
205
210 dist = kInfinity;
211 else
213 return dist;
214}
G4ThreeVector GetSurfaceNormal() const
static const G4double dirTolerance
◆ Extent()
◆ GetArea()
G4double G4QuadrangularFacet::GetArea |
( |
| ) |
|
|
virtual |
◆ GetCircumcentre()
◆ GetClone()
G4VFacet * G4QuadrangularFacet::GetClone |
( |
| ) |
|
|
virtual |
◆ GetEntityType()
G4String G4QuadrangularFacet::GetEntityType |
( |
| ) |
const |
|
virtual |
◆ GetNumberOfVertices()
G4int G4QuadrangularFacet::GetNumberOfVertices |
( |
| ) |
const |
|
inlinevirtual |
◆ GetPointOnFace()
◆ GetRadius()
G4double G4QuadrangularFacet::GetRadius |
( |
| ) |
const |
|
inlinevirtual |
◆ GetSurfaceNormal()
◆ GetVertex()
◆ Intersect()
Implements G4VFacet.
Definition at line 232 of file G4QuadrangularFacet.cc.
238{
240 fFacet1.
Intersect(p,v,outgoing,distance,distFromSurface,normal);
241 if (!intersect) intersect =
242 fFacet2.
Intersect(p,v,outgoing,distance,distFromSurface,normal);
243 if (!intersect)
244 {
245 distance = distFromSurface = kInfinity;
247 }
248 return intersect;
249}
void set(double x, double y, double z)
G4bool Intersect(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool outgoing, G4double &distance, G4double &distFromSurface, G4ThreeVector &normal)
◆ IsDefined()
G4bool G4QuadrangularFacet::IsDefined |
( |
| ) |
const |
|
inlinevirtual |
◆ operator=()
Definition at line 157 of file G4QuadrangularFacet.cc.
158{
159 if (this == &rhs)
160 return *this;
161
162 fFacet1 = rhs.fFacet1;
163 fFacet2 = rhs.fFacet2;
164 fRadius = 0.0;
165
166 return *this;
167}
◆ SetVertex()
Implements G4VFacet.
Definition at line 147 of file G4QuadrangularFacet.hh.
148{
149 switch (i)
150 {
151 case 0:
154 break;
155 case 1:
157 break;
158 case 2:
161 break;
162 case 3:
164 break;
165 }
166}
void SetVertex(G4int i, const G4ThreeVector &val)
Referenced by G4QuadrangularFacet().
◆ SetVertices()
void G4QuadrangularFacet::SetVertices |
( |
std::vector< G4ThreeVector > * |
v | ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following files: