58 G4int lineSegmentsPerCircle,
60: fpShaftPolyhedron(nullptr)
61, fpHeadPolyhedron(nullptr)
62, fTransform(transform)
64 fType =
"G4ArrowModel";
83 G4double totalLength = std::hypot(x2-x1, y2-y1, z2-z1);
84 if (totalLength < tolerance)
85 {totalLength = tolerance;}
88 if (shaftRadius < tolerance)
89 {shaftRadius = tolerance;}
93 G4double arrowLength = std::min(1.5*width, 0.5*totalLength);
95 G4double shaftLength = totalLength - arrowLength;
96 if (shaftLength < 2*tolerance)
97 {shaftLength = 2*tolerance;}
99 const G4Tubs shaft(
"shaft",0.,shaftRadius,0.5*shaftLength,0.,twopi);
102 if (fpShaftPolyhedron)
106 const G4double zHi = 0.5*totalLength;
107 const G4double zLow = zHi - arrowLength;
109 const G4double xExt = std::sqrt(3.)*rExt/2.;
110 const G4Tet head(
"head",
121 const G4Point3D arrowCentre(0.5*(x1+x2),0.5*(y1+y2),0.5*(z1+z2));
124 if (fpShaftPolyhedron) fpShaftPolyhedron->
Transform(tr);
125 if (fpHeadPolyhedron) fpHeadPolyhedron->
Transform(tr);
G4ArrowModel(G4double x1, G4double y1, G4double z1, G4double x2, G4double y2, G4double z2, G4double width, const G4Colour &colour, const G4String &description="", G4int lineSegmentsPerCircle=6, const G4Transform3D &transform=G4Transform3D())