Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Scale.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27//
28//
29// John Allison 21st July 2001
30
31#include "G4Scale.hh"
32
33G4Scale::G4Scale (G4double length, const G4String& annotation,
34 G4Scale::Direction direction,
35 G4bool autoPlacing,
36 G4double xmid, G4double ymid, G4double zmid,
37 G4double annotationSize):
38 fLength(length),
39 fAnnotation(annotation),
40 fAnnotationSize(annotationSize),
41 fDirection(direction),
42 fAutoPlacing(autoPlacing),
43 fXmid(xmid), fYmid(ymid), fZmid(zmid) {}
44
46
47const G4String G4Scale::GuidanceString
48(
49 "An annotated line in the specified direction with tick marks at the"
50 "\nend. If autoPlacing is true it is required to be centred at the"
51 "\nfront, right, bottom corner of the world space, comfortably outside"
52 "\nthe existing bounding box/sphere so that existing objects do not"
53 "\nobscure it. Otherwise it is required to be drawn with mid-point at"
54 "\n(xmid, ymid, zmid)."
55 "\n"
56 "\nThe auto placing algorithm might be:"
57 "\n x = xmin + (1 + comfort) * (xmax - xmin);"
58 "\n y = ymin - comfort * (ymax - ymin);"
59 "\n z = zmin + (1 + comfort) * (zmax - zmin);"
60 "\n if direction == x then (x - length,y,z) to (x,y,z);"
61 "\n if direction == y then (x,y,z) to (x,y + length,z);"
62 "\n if direction == z then (x,y,z - length) to (x,y,z);"
63);
64
66{
67 return GuidanceString;
68}
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
~G4Scale()
Definition: G4Scale.cc:45
G4Scale(G4double length, const G4String &annotation="", Direction direction=x, G4bool autoPlacing=true, G4double xmid=0., G4double ymid=0., G4double zmid=0., G4double annotationSize=12.)
Definition: G4Scale.cc:33
Direction
Definition: G4Scale.hh:41
static const G4String & GetGuidanceString()
Definition: G4Scale.cc:65