Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VMarker Class Reference

#include <G4VMarker.hh>

+ Inheritance diagram for G4VMarker:

Public Types

enum  FillStyle { noFill , hashed , filled }
 
enum  SizeType { none , world , screen }
 

Public Member Functions

 G4VMarker ()
 
 G4VMarker (const G4VMarker &)
 
 G4VMarker (const G4Point3D &position)
 
virtual ~G4VMarker ()
 
G4VMarkeroperator= (const G4VMarker &)
 
G4bool operator!= (const G4VMarker &) const
 
G4Point3D GetPosition () const
 
SizeType GetSizeType () const
 
G4double GetWorldSize () const
 
G4double GetWorldDiameter () const
 
G4double GetWorldRadius () const
 
G4double GetScreenSize () const
 
G4double GetScreenDiameter () const
 
G4double GetScreenRadius () const
 
FillStyle GetFillStyle () const
 
void SetPosition (const G4Point3D &)
 
void SetSize (SizeType, G4double)
 
void SetDiameter (SizeType, G4double)
 
void SetRadius (SizeType, G4double)
 
void SetWorldSize (G4double)
 
void SetWorldDiameter (G4double)
 
void SetWorldRadius (G4double)
 
void SetScreenSize (G4double)
 
void SetScreenDiameter (G4double)
 
void SetScreenRadius (G4double)
 
void SetFillStyle (FillStyle)
 
virtual const G4StringGetInfo () const
 
virtual void SetInfo (const G4String &info)
 
- Public Member Functions inherited from G4Visible
 G4Visible ()
 
 G4Visible (const G4Visible &)
 
 G4Visible (const G4VisAttributes *)
 
virtual ~G4Visible ()
 
G4Visibleoperator= (const G4Visible &)
 
G4bool operator!= (const G4Visible &right) const
 
const G4VisAttributesGetVisAttributes () const
 
void SetVisAttributes (const G4VisAttributes *)
 
void SetVisAttributes (const G4VisAttributes &)
 

Friends

std::ostream & operator<< (std::ostream &os, const G4VMarker &)
 

Additional Inherited Members

- Protected Attributes inherited from G4Visible
const G4VisAttributesfpVisAttributes
 
G4bool fAllocatedVisAttributes
 

Detailed Description

Definition at line 90 of file G4VMarker.hh.

Member Enumeration Documentation

◆ FillStyle

Enumerator
noFill 
hashed 
filled 

Definition at line 96 of file G4VMarker.hh.

◆ SizeType

Enumerator
none 
world 
screen 

Definition at line 97 of file G4VMarker.hh.

Constructor & Destructor Documentation

◆ G4VMarker() [1/3]

G4VMarker::G4VMarker ( )

Definition at line 34 of file G4VMarker.cc.

34 :
35 fPosition (G4Point3D ()),
36 fWorldSize (0.),
37 fScreenSize (0.),
38 fFillStyle (noFill)
39{
40 // fInfo: default initialisation.
41}

◆ G4VMarker() [2/3]

G4VMarker::G4VMarker ( const G4VMarker mk)

Definition at line 43 of file G4VMarker.cc.

43 :
44 G4Visible (mk),
45 fPosition (mk.fPosition),
46 fWorldSize (mk.fWorldSize),
47 fScreenSize (mk.fScreenSize),
48 fFillStyle (mk.fFillStyle),
49 fInfo (mk.fInfo)
50{}

◆ G4VMarker() [3/3]

G4VMarker::G4VMarker ( const G4Point3D position)

Definition at line 52 of file G4VMarker.cc.

52 :
53 fPosition (pos),
54 fWorldSize (0.),
55 fScreenSize (0.),
56 fFillStyle (noFill),
57 fInfo (G4String())
58{
59 // fInfo: default initialisation.
60}

◆ ~G4VMarker()

G4VMarker::~G4VMarker ( )
virtual

Definition at line 62 of file G4VMarker.cc.

62{}

Member Function Documentation

◆ GetFillStyle()

FillStyle G4VMarker::GetFillStyle ( ) const

◆ GetInfo()

virtual const G4String & G4VMarker::GetInfo ( ) const
virtual

◆ GetPosition()

◆ GetScreenDiameter()

G4double G4VMarker::GetScreenDiameter ( ) const

◆ GetScreenRadius()

G4double G4VMarker::GetScreenRadius ( ) const

◆ GetScreenSize()

G4double G4VMarker::GetScreenSize ( ) const

◆ GetSizeType()

G4VMarker::SizeType G4VMarker::GetSizeType ( ) const

Definition at line 111 of file G4VMarker.cc.

111 {
112 SizeType type = none;
113 if (fWorldSize) type = world;
114 else if (fScreenSize) type = screen;
115 return type;
116}

◆ GetWorldDiameter()

G4double G4VMarker::GetWorldDiameter ( ) const

◆ GetWorldRadius()

G4double G4VMarker::GetWorldRadius ( ) const

◆ GetWorldSize()

G4double G4VMarker::GetWorldSize ( ) const

◆ operator!=()

G4bool G4VMarker::operator!= ( const G4VMarker mk) const

Definition at line 75 of file G4VMarker.cc.

75 {
76 if (
77 (G4Visible::operator != (mk)) ||
78 (fWorldSize != mk.fWorldSize) ||
79 (fScreenSize != mk.fScreenSize) ||
80 (fFillStyle != mk.fFillStyle) ||
81 !(fPosition == mk.fPosition) ||
82 (fInfo != mk.fInfo)
83 )
84 return true;
85 return false;
86}

◆ operator=()

G4VMarker & G4VMarker::operator= ( const G4VMarker mk)

Definition at line 64 of file G4VMarker.cc.

64 {
65 if (&mk == this) return *this;
67 fPosition = mk.fPosition;
68 fWorldSize = mk.fWorldSize;
69 fScreenSize = mk.fScreenSize;
70 fFillStyle = mk.fFillStyle;
71 fInfo = mk.fInfo;
72 return *this;
73}
G4Visible & operator=(const G4Visible &)
Definition: G4Visible.cc:57

Referenced by G4Text::operator=().

◆ SetDiameter()

void G4VMarker::SetDiameter ( SizeType  ,
G4double   
)

◆ SetFillStyle()

void G4VMarker::SetFillStyle ( FillStyle  )

◆ SetInfo()

virtual void G4VMarker::SetInfo ( const G4String info)
virtual

◆ SetPosition()

void G4VMarker::SetPosition ( const G4Point3D )

◆ SetRadius()

void G4VMarker::SetRadius ( SizeType  ,
G4double   
)

◆ SetScreenDiameter()

void G4VMarker::SetScreenDiameter ( G4double  )

◆ SetScreenRadius()

void G4VMarker::SetScreenRadius ( G4double  )

◆ SetScreenSize()

◆ SetSize()

void G4VMarker::SetSize ( SizeType  sizeType,
G4double  size 
)

Definition at line 118 of file G4VMarker.cc.

118 {
119 fWorldSize = fScreenSize = 0.;
120 if (sizeType == world) fWorldSize = size;
121 else if (sizeType == screen) fScreenSize = size;
122}

Referenced by G4VSceneHandler::RequestPrimitives().

◆ SetWorldDiameter()

void G4VMarker::SetWorldDiameter ( G4double  )

◆ SetWorldRadius()

void G4VMarker::SetWorldRadius ( G4double  )

◆ SetWorldSize()

void G4VMarker::SetWorldSize ( G4double  )

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const G4VMarker marker 
)
friend

Definition at line 88 of file G4VMarker.cc.

88 {
89 os << "G4VMarker: position: " << marker.fPosition
90 << ", world size: " << marker.fWorldSize
91 << ", screen size: " << marker.fScreenSize << '\n'
92 << " fill style: ";
93 switch (marker.fFillStyle) {
95 os << "no fill";
96 break;
98 os << "hashed";
99 break;
101 os << "filled";
102 break;
103 default:
104 os << "unrecognised"; break;
105 }
106 if (!marker.fInfo.empty()) os << "\n User information: " << marker.fInfo;
107 os << "\n " << (const G4Visible&) marker;
108 return os;
109}

The documentation for this class was generated from the following files: