Geant4 11.1.1
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 &)=default
 
 G4VMarker (G4VMarker &&)=default
 
 G4VMarker (const G4Point3D &position)
 
 ~G4VMarker () override
 
G4VMarkeroperator= (const G4VMarker &)=default
 
G4VMarkeroperator= (G4VMarker &&)=default
 
G4bool operator!= (const G4VMarker &) const
 
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)
 
- Public Member Functions inherited from G4Visible
 G4Visible ()
 
 G4Visible (const G4Visible &)
 
 G4Visible (G4Visible &&)
 
 G4Visible (const G4VisAttributes *)
 
virtual ~G4Visible ()
 
G4Visibleoperator= (const G4Visible &)
 
G4Visibleoperator= (G4Visible &&)
 
G4bool operator!= (const G4Visible &right) const
 
const G4VisAttributesGetVisAttributes () const
 
void SetVisAttributes (const G4VisAttributes *)
 
void SetVisAttributes (const G4VisAttributes &)
 
virtual const G4StringGetInfo () const
 
virtual void SetInfo (const G4String &info)
 

Friends

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

Additional Inherited Members

- Protected Attributes inherited from G4Visible
G4String fInfo
 
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/4]

G4VMarker::G4VMarker ( )

Definition at line 34 of file G4VMarker.cc.

34 :
35 fWorldSize (0.),
36 fScreenSize (0.),
37 fFillStyle (noFill)
38{}

◆ G4VMarker() [2/4]

G4VMarker::G4VMarker ( const G4VMarker )
default

◆ G4VMarker() [3/4]

G4VMarker::G4VMarker ( G4VMarker &&  )
default

◆ G4VMarker() [4/4]

G4VMarker::G4VMarker ( const G4Point3D position)

Definition at line 40 of file G4VMarker.cc.

40 :
41 fPosition (pos),
42 fWorldSize (0.),
43 fScreenSize (0.),
44 fFillStyle (noFill)
45{}

◆ ~G4VMarker()

G4VMarker::~G4VMarker ( )
overridedefault

Member Function Documentation

◆ GetFillStyle()

FillStyle G4VMarker::GetFillStyle ( ) const

◆ GetPosition()

◆ GetScreenDiameter()

G4double G4VMarker::GetScreenDiameter ( ) const

◆ GetScreenRadius()

G4double G4VMarker::GetScreenRadius ( ) const

◆ GetScreenSize()

◆ GetSizeType()

G4VMarker::SizeType G4VMarker::GetSizeType ( ) const

Definition at line 79 of file G4VMarker.cc.

79 {
80 SizeType type = none;
81 if (fWorldSize != 0.0) type = world;
82 else if (fScreenSize != 0.0) type = screen;
83 return type;
84}

Referenced by G4Qt3DSceneHandler::AddPrimitive().

◆ 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 49 of file G4VMarker.cc.

49 {
50 return ( (G4Visible::operator != (mk)) ||
51 (fWorldSize != mk.fWorldSize) ||
52 (fScreenSize != mk.fScreenSize) ||
53 (fFillStyle != mk.fFillStyle) ||
54 !(fPosition == mk.fPosition) );
55}

◆ operator=() [1/2]

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

◆ operator=() [2/2]

G4VMarker & G4VMarker::operator= ( G4VMarker &&  )
default

◆ operator==()

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

◆ SetDiameter()

void G4VMarker::SetDiameter ( SizeType  ,
G4double   
)

◆ SetFillStyle()

void G4VMarker::SetFillStyle ( FillStyle  )

◆ 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 86 of file G4VMarker.cc.

86 {
87 fWorldSize = fScreenSize = 0.;
88 if (sizeType == world) fWorldSize = size;
89 else if (sizeType == screen) fScreenSize = size;
90}

Referenced by G4VSceneHandler::Draw3DRectMeshAsDots(), G4VSceneHandler::DrawTetMeshAsDots(), and 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 57 of file G4VMarker.cc.

57 {
58 os << "G4VMarker: position: " << marker.fPosition
59 << ", world size: " << marker.fWorldSize
60 << ", screen size: " << marker.fScreenSize << '\n'
61 << " fill style: ";
62 switch (marker.fFillStyle) {
64 os << "no fill";
65 break;
67 os << "hashed";
68 break;
70 os << "filled";
71 break;
72 default:
73 os << "unrecognised"; break;
74 }
75 os << "\n " << (const G4Visible&) marker;
76 return os;
77}

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