Geant4
10.03
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
G4Scale.hh
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
// $Id: G4Scale.hh 83392 2014-08-21 14:36:35Z gcosmo $
28
//
29
//
30
// John Allison 21st July 2001.
31
32
#ifndef G4SCALE_HH
33
#define G4SCALE_HH
34
35
#include "
G4VMarker.hh
"
36
#include "
globals.hh
"
37
38
class
G4Scale
:
public
G4VMarker
{
39
40
public
:
// With description
41
42
enum
Direction
{
x
,
y
,
z
};
43
44
G4Scale
(
G4double
length,
const
G4String
& annotation =
""
,
45
Direction
direction =
x
,
46
G4bool
autoPlacing =
true
,
47
G4double
xmid = 0.,
G4double
ymid = 0.,
G4double
zmid = 0.,
48
G4double
annotationSize = 12.);
49
// This creates a representation of annotated line in the specified
50
// direction with tick marks at the end. If autoPlacing is true it
51
// is required to be centred at the front, right, bottom corner of
52
// the world space, comfortably outside the existing bounding
53
// box/sphere so that existing objects do not obscure it. Otherwise
54
// it is required to be drawn with mid-point at (xmid, ymid, zmid).
55
// Annotation size is size of text labels in pixels.
56
//
57
// The auto placing algorithm might be:
58
// x = xmin + (1 + comfort) * (xmax - xmin)
59
// y = ymin - comfort * (ymax - ymin)
60
// z = zmin + (1 + comfort) * (zmax - zmin)
61
// if direction == x then (x - length,y,z) to (x,y,z)
62
// if direction == y then (x,y,z) to (x,y + length,z)
63
// if direction == z then (x,y,z - length) to (x,y,z)
64
65
// Uses compiler-generated copy constructor.
66
67
~G4Scale
();
68
69
G4double
GetLength
()
const
;
70
const
G4String
&
GetAnnotation
()
const
;
71
G4double
GetAnnotationSize
()
const
;
72
Direction
GetDirection
()
const
;
73
G4bool
GetAutoPlacing
()
const
;
74
G4double
GetXmid
()
const
;
75
G4double
GetYmid
()
const
;
76
G4double
GetZmid
()
const
;
77
78
static
const
G4String
&
GetGuidanceString
();
79
80
private
:
81
82
G4double
fLength
;
83
G4String
fAnnotation
;
84
G4double
fAnnotationSize
;
85
Direction
fDirection
;
86
G4bool
fAutoPlacing
;
87
G4double
fXmid
,
fYmid
,
fZmid
;
88
static
const
G4String
GuidanceString
;
89
};
90
91
#include "
G4Scale.icc
"
92
93
#endif
G4Scale::GetDirection
Direction GetDirection() const
G4Scale::GetZmid
G4double GetZmid() const
G4Scale::GetAutoPlacing
G4bool GetAutoPlacing() const
G4Scale::GetYmid
G4double GetYmid() const
G4Scale::fAnnotationSize
G4double fAnnotationSize
Definition:
G4Scale.hh:84
G4Scale::x
Definition:
G4Scale.hh:42
G4Scale::Direction
Direction
Definition:
G4Scale.hh:42
G4Scale.icc
G4VMarker
Definition:
G4VMarker.hh:91
G4Scale::fXmid
G4double fXmid
Definition:
G4Scale.hh:87
G4Scale::fZmid
G4double fZmid
Definition:
G4Scale.hh:87
G4VMarker.hh
G4Scale::fAutoPlacing
G4bool fAutoPlacing
Definition:
G4Scale.hh:86
G4Scale::GetXmid
G4double GetXmid() const
G4Scale::z
Definition:
G4Scale.hh:42
G4Scale::fAnnotation
G4String fAnnotation
Definition:
G4Scale.hh:83
G4bool
bool G4bool
Definition:
G4Types.hh:79
G4Scale::GetGuidanceString
static const G4String & GetGuidanceString()
Definition:
G4Scale.cc:66
G4Scale::G4Scale
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:34
globals.hh
G4Scale::y
Definition:
G4Scale.hh:42
G4Scale::GetAnnotationSize
G4double GetAnnotationSize() const
G4Scale::fLength
G4double fLength
Definition:
G4Scale.hh:82
G4Scale::GetLength
G4double GetLength() const
G4Scale::fYmid
G4double fYmid
Definition:
G4Scale.hh:87
G4Scale
Definition:
G4Scale.hh:38
G4double
double G4double
Definition:
G4Types.hh:76
G4Scale::GetAnnotation
const G4String & GetAnnotation() const
G4Scale::GuidanceString
static const G4String GuidanceString
Definition:
G4Scale.hh:88
G4Scale::fDirection
Direction fDirection
Definition:
G4Scale.hh:85
G4Scale::~G4Scale
~G4Scale()
Definition:
G4Scale.cc:46
G4String
Definition:
G4String.hh:45
geant4.10.03
source
graphics_reps
include
G4Scale.hh
Generated on Thu Feb 14 2002 02:28:20 for Geant4 by
1.8.8