Geant4-11
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
G4PlotterModel Class Reference

#include <G4PlotterModel.hh>

Inheritance diagram for G4PlotterModel:
G4VModel

Public Member Functions

void DescribeYourselfTo (G4VGraphicsScene &) override
 
 G4PlotterModel (G4Plotter &plotter, const G4String &global_description="", const G4Transform3D &transform=G4Transform3D())
 
virtual G4String GetCurrentDescription () const
 
virtual G4String GetCurrentTag () const
 
const G4VisExtentGetExtent () const
 
const G4StringGetGlobalDescription () const
 
const G4StringGetGlobalTag () const
 
const G4ModelingParametersGetModelingParameters () const
 
const G4StringGetType () const
 
G4Plotterplotter ()
 
void SetExtent (const G4VisExtent &)
 
void SetGlobalDescription (const G4String &)
 
void SetGlobalTag (const G4String &)
 
void SetModelingParameters (const G4ModelingParameters *)
 
void SetType (const G4String &)
 
virtual G4bool Validate (G4bool warn=true)
 
virtual ~G4PlotterModel ()=default
 

Protected Attributes

G4VisExtent fExtent
 
G4String fGlobalDescription
 
G4String fGlobalTag
 
const G4ModelingParametersfpMP
 
G4String fType
 

Private Member Functions

 G4PlotterModel (const G4PlotterModel &)
 
G4PlotterModeloperator= (const G4PlotterModel &)
 

Private Attributes

G4PlotterfPlotter
 
G4Transform3D fTransform
 

Detailed Description

Definition at line 36 of file G4PlotterModel.hh.

Constructor & Destructor Documentation

◆ G4PlotterModel() [1/2]

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}
G4Plotter & fPlotter
G4Transform3D fTransform
G4VisExtent fExtent
Definition: G4VModel.hh:101
G4String fGlobalDescription
Definition: G4VModel.hh:100
G4String fType
Definition: G4VModel.hh:98
G4String fGlobalTag
Definition: G4VModel.hh:99

References G4VModel::fExtent, G4VModel::fGlobalDescription, G4VModel::fGlobalTag, and G4VModel::fType.

◆ ~G4PlotterModel()

virtual G4PlotterModel::~G4PlotterModel ( )
virtualdefault

◆ G4PlotterModel() [2/2]

G4PlotterModel::G4PlotterModel ( const G4PlotterModel )
private

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

References G4VGraphicsScene::AddPrimitive(), G4VGraphicsScene::BeginPrimitives(), G4VGraphicsScene::EndPrimitives(), fPlotter, and fTransform.

◆ GetCurrentDescription()

G4String G4VModel::GetCurrentDescription ( ) const
virtualinherited

Reimplemented in G4GPSModel, and G4PhysicalVolumeModel.

Definition at line 51 of file G4VModel.cc.

51 {
52 // Override in concrete class if concept of "current" is meaningful.
53 return fGlobalDescription;
54}

References G4VModel::fGlobalDescription.

Referenced by G4OpenGLStoredQtSceneHandler::ExtraPOProcessing().

◆ GetCurrentTag()

G4String G4VModel::GetCurrentTag ( ) const
virtualinherited

Reimplemented in G4GPSModel, and G4PhysicalVolumeModel.

Definition at line 46 of file G4VModel.cc.

46 {
47 // Override in concrete class if concept of "current" is meaningful.
48 return fGlobalTag;
49}

References G4VModel::fGlobalTag.

Referenced by G4Qt3DSceneHandler::AddPrimitive(), and G4ToolsSGSceneHandler::AddPrimitive().

◆ GetExtent()

const G4VisExtent & G4VModel::GetExtent ( ) const
inherited

◆ GetGlobalDescription()

const G4String & G4VModel::GetGlobalDescription ( ) const
inherited

◆ GetGlobalTag()

const G4String & G4VModel::GetGlobalTag ( ) const
inherited

◆ GetModelingParameters()

const G4ModelingParameters * G4VModel::GetModelingParameters ( ) const
inherited

◆ GetType()

const G4String & G4VModel::GetType ( ) const
inherited

◆ operator=()

G4PlotterModel & G4PlotterModel::operator= ( const G4PlotterModel )
private

◆ plotter()

G4Plotter & G4PlotterModel::plotter ( )
inline

Definition at line 41 of file G4PlotterModel.hh.

41{return fPlotter;}

References fPlotter.

◆ SetExtent()

void G4VModel::SetExtent ( const G4VisExtent )
inherited

◆ SetGlobalDescription()

void G4VModel::SetGlobalDescription ( const G4String )
inherited

◆ SetGlobalTag()

void G4VModel::SetGlobalTag ( const G4String )
inherited

◆ SetModelingParameters()

void G4VModel::SetModelingParameters ( const G4ModelingParameters )
inherited

◆ SetType()

void G4VModel::SetType ( const G4String )
inherited

◆ Validate()

G4bool G4VModel::Validate ( G4bool  warn = true)
virtualinherited

Reimplemented in G4PhysicalVolumeModel, and G4LogicalVolumeModel.

Definition at line 56 of file G4VModel.cc.

56 {
57 return true;
58}

Field Documentation

◆ fExtent

G4VisExtent G4VModel::fExtent
protectedinherited

◆ fGlobalDescription

G4String G4VModel::fGlobalDescription
protectedinherited

◆ fGlobalTag

G4String G4VModel::fGlobalTag
protectedinherited

◆ fPlotter

G4Plotter& G4PlotterModel::fPlotter
private

Definition at line 47 of file G4PlotterModel.hh.

Referenced by DescribeYourselfTo(), and plotter().

◆ fpMP

const G4ModelingParameters* G4VModel::fpMP
protectedinherited

◆ fTransform

G4Transform3D G4PlotterModel::fTransform
private

Definition at line 48 of file G4PlotterModel.hh.

Referenced by DescribeYourselfTo().

◆ fType

G4String G4VModel::fType
protectedinherited

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