57: fpShaftPolyhedron(nullptr)
58, fpHeadPolyhedron(nullptr)
59{
60 fType =
"G4ArrowModel";
64 (std::min(x1,x2),
65 std::max(x1,x2),
66 std::min(y1,y2),
67 std::max(y1,y2),
68 std::min(z1,z2),
69 std::max(z1,z2));
70
71
74
75
76
79 (std::pow(x2-x1,2)+std::pow(y2-y1,2)+std::pow(z2-z1,2));
80 if (shaftLength < tolerance) shaftLength = tolerance;
82 if (shaftRadius > shaftLength/100.) shaftRadius = shaftLength/100.;
83 if (shaftRadius < tolerance) shaftRadius = tolerance;
84 const G4double halfShaftLength = shaftLength/2.;
85 const G4double halfReduction = 4.*shaftRadius;
86 G4double halfLength = halfShaftLength - halfReduction;
87 if (halfLength < tolerance) halfLength = tolerance;
88 const G4Tubs shaft(
"shaft",0.,shaftRadius,halfLength,0.,twopi);
89 fpShaftPolyhedron = shaft.CreatePolyhedron();
90
91 if (fpShaftPolyhedron)
93
94
95 const G4double zHi = halfShaftLength;
96 const G4double zLow = halfShaftLength - 12.*shaftRadius;
97 const G4double rExt = 8. * shaftRadius;
98 const G4double xExt = std::sqrt(3.)*rExt/2.;
99 const G4Tet head(
"head",
104 fpHeadPolyhedron = head.CreatePolyhedron();
105
106
110 const G4Point3D arrowCentre(0.5*(x1+x2),0.5*(y1+y2),0.5*(z1+z2));
113 if (fpShaftPolyhedron) fpShaftPolyhedron->
Transform(tr);
114 if (fpHeadPolyhedron) fpHeadPolyhedron->
Transform(tr);
115
121
122
124}
CLHEP::Hep3Vector G4ThreeVector
HepGeom::Vector3D< G4double > G4Vector3D
G4double GetRadialTolerance() const
static G4GeometryTolerance * GetInstance()
G4String fGlobalDescription
void SetColour(const G4Colour &)
void SetForceSolid(G4bool=true)
void SetVisAttributes(const G4VisAttributes *)
BasicVector3D< T > unit() const
static void SetNumberOfRotationSteps(G4int n)
static G4int GetNumberOfRotationSteps()
HepPolyhedron & Transform(const G4Transform3D &t)