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

#include <G4TextModel.hh>

+ Inheritance diagram for G4TextModel:

Public Member Functions

 G4TextModel (const G4Text &, const G4Transform3D &=G4Transform3D())
 
virtual ~G4TextModel ()
 
void DescribeYourselfTo (G4VGraphicsScene &) override
 
- Public Member Functions inherited from G4VModel
 G4VModel (const G4ModelingParameters *=0)
 
virtual ~G4VModel ()
 
virtual void DescribeYourselfTo (G4VGraphicsScene &)=0
 
const G4ModelingParametersGetModelingParameters () const
 
const G4StringGetType () const
 
virtual G4String GetCurrentDescription () const
 
virtual G4String GetCurrentTag () const
 
const G4VisExtentGetExtent () const
 
const G4StringGetGlobalDescription () const
 
const G4StringGetGlobalTag () const
 
void SetModelingParameters (const G4ModelingParameters *)
 
void SetExtent (const G4VisExtent &)
 
void SetType (const G4String &)
 
void SetGlobalDescription (const G4String &)
 
void SetGlobalTag (const G4String &)
 
virtual G4bool Validate (G4bool warn=true)
 

Additional Inherited Members

- Protected Attributes inherited from G4VModel
G4String fType
 
G4String fGlobalTag
 
G4String fGlobalDescription
 
G4VisExtent fExtent
 
const G4ModelingParametersfpMP
 

Detailed Description

Definition at line 45 of file G4TextModel.hh.

Constructor & Destructor Documentation

◆ G4TextModel()

G4TextModel::G4TextModel ( const G4Text g4Text,
const G4Transform3D transform = G4Transform3D() 
)

Definition at line 42 of file G4TextModel.cc.

43: fG4Text(g4Text)
44{
45 fType = "G4TextModel";
46 std::ostringstream oss;
47 oss << "G4TextModel: \"" << fG4Text.GetText()
48 << "\" at " << G4BestUnit(g4Text.GetPosition(),"Length")
49 << "with size " << g4Text.GetScreenSize()
50 << " with offsets " << g4Text.GetXOffset() << ',' << g4Text.GetYOffset();
51 fGlobalTag = oss.str();
53
54 fG4Text.SetPosition(fG4Text.GetPosition().transform(transform));
55}
#define G4BestUnit(a, b)
G4double GetYOffset() const
G4double GetXOffset() const
G4String GetText() const
G4double GetScreenSize() const
G4Point3D GetPosition() const
void SetPosition(const G4Point3D &)
G4String fGlobalDescription
Definition: G4VModel.hh:100
G4String fType
Definition: G4VModel.hh:98
G4String fGlobalTag
Definition: G4VModel.hh:99

◆ ~G4TextModel()

G4TextModel::~G4TextModel ( )
virtual

Definition at line 40 of file G4TextModel.cc.

40{}

Member Function Documentation

◆ DescribeYourselfTo()

void G4TextModel::DescribeYourselfTo ( G4VGraphicsScene sceneHandler)
overridevirtual

Implements G4VModel.

Definition at line 57 of file G4TextModel.cc.

57 {
58 sceneHandler.BeginPrimitives ();
59 sceneHandler.AddPrimitive (fG4Text);
60 sceneHandler.EndPrimitives ();
61}
virtual void BeginPrimitives(const G4Transform3D &objectTransformation=G4Transform3D())=0
virtual void AddPrimitive(const G4Polyline &)=0
virtual void EndPrimitives()=0

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