Geant4-11
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VMarker.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
30#include "G4VMarker.hh"
31
32#include "G4VisAttributes.hh"
33
35 fPosition (G4Point3D ()),
36 fWorldSize (0.),
37 fScreenSize (0.),
38 fFillStyle (noFill)
39{
40 // fInfo: default initialisation.
41}
42
44 fPosition (pos),
45 fWorldSize (0.),
46 fScreenSize (0.),
47 fFillStyle (noFill),
48 fInfo (G4String())
49{
50 // fInfo: default initialisation.
51}
52
54
56 return ( (G4Visible::operator != (mk)) ||
57 (fWorldSize != mk.fWorldSize) ||
58 (fScreenSize != mk.fScreenSize) ||
59 (fFillStyle != mk.fFillStyle) ||
60 !(fPosition == mk.fPosition) ||
61 (fInfo != mk.fInfo) );
62}
63
64std::ostream& operator << (std::ostream& os, const G4VMarker& marker) {
65 os << "G4VMarker: position: " << marker.fPosition
66 << ", world size: " << marker.fWorldSize
67 << ", screen size: " << marker.fScreenSize << '\n'
68 << " fill style: ";
69 switch (marker.fFillStyle) {
71 os << "no fill";
72 break;
74 os << "hashed";
75 break;
77 os << "filled";
78 break;
79 default:
80 os << "unrecognised"; break;
81 }
82 if (!marker.fInfo.empty()) os << "\n User information: " << marker.fInfo;
83 os << "\n " << (const G4Visible&) marker;
84 return os;
85}
86
88 SizeType type = none;
89 if (fWorldSize) type = world;
90 else if (fScreenSize) type = screen;
91 return type;
92}
93
94void G4VMarker::SetSize (SizeType sizeType, G4double size) {
96 if (sizeType == world) fWorldSize = size;
97 else if (sizeType == screen) fScreenSize = size;
98}
static const G4double pos
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
G4String fInfo
Definition: G4VMarker.hh:157
SizeType GetSizeType() const
Definition: G4VMarker.cc:87
G4double fScreenSize
Definition: G4VMarker.hh:153
void SetSize(SizeType, G4double)
Definition: G4VMarker.cc:94
G4bool operator!=(const G4VMarker &) const
Definition: G4VMarker.cc:55
virtual ~G4VMarker()
Definition: G4VMarker.cc:53
G4Point3D fPosition
Definition: G4VMarker.hh:151
FillStyle fFillStyle
Definition: G4VMarker.hh:154
G4double fWorldSize
Definition: G4VMarker.hh:152
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)