56 G4int lineSegmentsPerCircle,
58: fpShaftPolyhedron(nullptr)
59, fpHeadPolyhedron(nullptr)
62 fType =
"G4ArrowModel";
81 (std::pow(x2-x1,2)+std::pow(y2-y1,2)+std::pow(z2-z1,2));
82 if (shaftLength < tolerance) shaftLength = tolerance;
84 if (shaftRadius > shaftLength/100.) shaftRadius = shaftLength/100.;
85 if (shaftRadius < tolerance) shaftRadius = tolerance;
86 const G4double halfShaftLength = shaftLength/2.;
87 const G4double halfReduction = 4.*shaftRadius;
88 G4double halfLength = halfShaftLength - halfReduction;
89 if (halfLength < tolerance) halfLength = tolerance;
90 const G4Tubs shaft(
"shaft",0.,shaftRadius,halfLength,0.,
twopi);
97 const G4double zHi = halfShaftLength;
98 const G4double zLow = halfShaftLength - 12.*shaftRadius;
99 const G4double rExt = 8. * shaftRadius;
100 const G4double xExt = std::sqrt(3.)*rExt/2.;
101 const G4Tet head(
"head",
112 const G4Point3D arrowCentre(0.5*(x1+x2),0.5*(y1+y2),0.5*(z1+z2));
static constexpr double twopi
CLHEP::Hep3Vector G4ThreeVector
HepGeom::Vector3D< G4double > G4Vector3D
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())
G4Polyhedron * fpShaftPolyhedron
G4Polyhedron * fpHeadPolyhedron
void DescribeYourselfTo(G4VGraphicsScene &) override
G4double GetRadialTolerance() const
static G4GeometryTolerance * GetInstance()
G4Polyhedron * CreatePolyhedron() const
G4Polyhedron * CreatePolyhedron() const
virtual void BeginPrimitives(const G4Transform3D &objectTransformation=G4Transform3D())=0
virtual void AddPrimitive(const G4Polyline &)=0
virtual void EndPrimitives()=0
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)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments