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

#include <G4PlotterModel.hh>

+ Inheritance diagram for G4PlotterModel:

Public Member Functions

 G4PlotterModel (G4Plotter &plotter, const G4String &global_description="", const G4Transform3D &transform=G4Transform3D())
 
virtual ~G4PlotterModel ()=default
 
void DescribeYourselfTo (G4VGraphicsScene &) override
 
G4Plotterplotter ()
 
- Public Member Functions inherited from G4VModel
 G4VModel (const G4ModelingParameters *=0)
 
virtual ~G4VModel ()
 
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 36 of file G4PlotterModel.hh.

Constructor & Destructor Documentation

◆ G4PlotterModel()

G4PlotterModel::G4PlotterModel ( G4Plotter & plotter,
const G4String & global_description = "",
const G4Transform3D & transform = G4Transform3D() )

Definition at line 32 of file G4PlotterModel.cc.

33:fPlotter(a_plotter),fTransform(a_transform)
34{
35 fType = "G4PlotterModel";
37 fGlobalDescription = fType + ": " + description;
38 // Have the extent so that the viewer will have an ortho camera
39 // with a height of 1 in order to map the tools::sg::plots height of 1:
40 // radius = sqrt(half_x*half_x+half_y*half_y+half_z*half_z);
41 // radius = sqrt(3*half*half)
42 // half = sqrt(radius*radius/3)
43 double radius = 0.5;
44 double half = ::sqrt(radius*radius/3.0);
45 fExtent = G4VisExtent(-half,half,-half,half,-half,half); //x,y,z min/max.
46}
G4VisExtent fExtent
Definition G4VModel.hh:97
G4String fGlobalDescription
Definition G4VModel.hh:96
G4String fType
Definition G4VModel.hh:94
G4String fGlobalTag
Definition G4VModel.hh:95

◆ ~G4PlotterModel()

virtual G4PlotterModel::~G4PlotterModel ( )
virtualdefault

Member Function Documentation

◆ DescribeYourselfTo()

void G4PlotterModel::DescribeYourselfTo ( G4VGraphicsScene & sceneHandler)
overridevirtual

Implements G4VModel.

Definition at line 48 of file G4PlotterModel.cc.

49{
50 sceneHandler.BeginPrimitives(fTransform);
51 sceneHandler.AddPrimitive(fPlotter);
52 sceneHandler.EndPrimitives();
53}
virtual void BeginPrimitives(const G4Transform3D &objectTransformation=G4Transform3D())=0
virtual void AddPrimitive(const G4Polyline &)=0
virtual void EndPrimitives()=0

◆ plotter()

G4Plotter & G4PlotterModel::plotter ( )
inline

Definition at line 41 of file G4PlotterModel.hh.

41{return fPlotter;}

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