ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4VMarker.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4VMarker.hh
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
// G4VMarker - base class for markers - circles, squares, etc.
30
// John Allison 17/11/96.
31
32
// Class Description:
33
// G4VMarkers are 2-dimensional G4VVisPrims with the special
34
// properties (a) of always facing the camera and (b) of having the
35
// possibility of a size defined in screen units (pixels) or paper
36
// units (points - there are 72 points per inch). The convention is
37
// that if a world size is not specified, then the marker will be
38
// drawn to the given screen size or paper size independent of the
39
// viewing transformation in effect.
40
//
41
// "Size" means "overall size", e.g., diameter of circle, side of
42
// square, height of text (but diameter and radius access functions
43
// are defined to avoid ambiguity).
44
//
45
// So the user who constructs the marker decides whether it should be
46
// drawn to a given size in world coordinates by setting the world
47
// size. Alternatively, the user can set the screen size (internally,
48
// the world size is set to zero) and the marker is drawn to its
49
// screen size. Finally, the user may decide not to set any size; in
50
// that case, it is drawn according to the sizes specified in the
51
// default marker specified in G4ViewParameters.
52
//
53
// Also in G4ViewParameters is a "global marker scale" which is a
54
// factor by which all marker sizes are multiplied before drawing.
55
//
56
// Thus the graphics system driver scene handler code might look like:
57
//
58
// void G4XXXGraphicsSceneHandler::AddPrimitive (const G4Circle& circle) {
59
// G4bool hidden = !(fpView -> GetViewParameters().IsMarkerNotHidden());
60
// const G4Colour& colour = GetColour (circle);
61
// // Base class GetColour.
62
// G4VMarker::FillStyle style = circle.GetFillStyle();
63
// const G4Point3D& centre = circle.GetPosition();
64
// MarkerSizeType sizeType;
65
// G4double size = GetMarkerSize (circle, sizeType);
66
// switch (sizeType) {
67
// default:
68
// case screen:
69
// // Draw in screen coordinates.
70
// // ...
71
// break;
72
// case world:
73
// // Draw in world coordinates.
74
// // ...
75
// break;
76
// }
77
// }
78
// Class Description - End:
79
80
81
#ifndef G4VMARKER_HH
82
#define G4VMARKER_HH
83
84
#include "
globals.hh
"
85
#include "
G4Visible.hh
"
86
#include "
G4Point3D.hh
"
87
#include "
G4Colour.hh
"
88
#include "
G4Color.hh
"
89
90
class
G4VMarker
:
public
G4Visible
{
91
92
friend
std::ostream&
operator <<
(std::ostream& os,
const
G4VMarker
&);
93
94
public
:
// With description
95
96
enum
FillStyle
{
noFill
,
hashed
,
filled
};
97
enum
SizeType
{
none
,
world
,
screen
};
98
100
// Constructors...
101
G4VMarker
();
102
G4VMarker
(
const
G4VMarker
&);
103
G4VMarker
(
const
G4Point3D
&
position
);
104
106
// Destructor...
107
virtual
~G4VMarker
();
108
110
// Assignment...
111
G4VMarker
&
operator =
(
const
G4VMarker
&);
112
114
// Logical...
115
G4bool
operator !=
(
const
G4VMarker
&)
const
;
116
118
// Get functions...
119
G4Point3D
GetPosition
()
const
;
120
SizeType
GetSizeType
()
const
;
121
G4double
GetWorldSize
()
const
;
122
G4double
GetWorldDiameter
()
const
;
123
G4double
GetWorldRadius
()
const
;
124
G4double
GetScreenSize
()
const
;
125
G4double
GetScreenDiameter
()
const
;
126
G4double
GetScreenRadius
()
const
;
127
FillStyle
GetFillStyle
()
const
;
128
130
// Set functions...
131
void
SetPosition
(
const
G4Point3D
&);
132
void
SetSize
(
SizeType
,
G4double
);
133
void
SetDiameter
(
SizeType
,
G4double
);
134
void
SetRadius
(
SizeType
,
G4double
);
135
void
SetWorldSize
(
G4double
);
136
void
SetWorldDiameter
(
G4double
);
137
void
SetWorldRadius
(
G4double
);
138
void
SetScreenSize
(
G4double
);
139
void
SetScreenDiameter
(
G4double
);
140
void
SetScreenRadius
(
G4double
);
141
void
SetFillStyle
(
FillStyle
);
142
143
// Access functions to the string for user customizable information
144
virtual
const
G4String
&
GetInfo
()
const
;
145
virtual
void
SetInfo
(
const
G4String
&
info
);
146
147
private
:
148
G4Point3D
fPosition
;
149
G4double
fWorldSize
;
// Default 0. means use screen size.
150
G4double
fScreenSize
;
// Default 0. means use global default.
151
FillStyle
fFillStyle
;
152
153
// String for user customizable information
154
G4String
fInfo
;
155
156
};
157
158
#include "G4VMarker.icc"
159
160
#endif
geant4
tree
geant4-10.6-release
source
graphics_reps
include
G4VMarker.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:21
using
1.8.2 with
ECCE GitHub integration