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

#include <G4HepRepViewer.hh>

+ Inheritance diagram for G4HepRepViewer:

Public Member Functions

 G4HepRepViewer (G4VSceneHandler &scene, const G4String &name="")
 
virtual ~G4HepRepViewer ()
 
void SetView ()
 
void ClearView ()
 
void DrawView ()
 
void ShowView ()
 
void FinishView ()
 
void reset ()
 
- Public Member Functions inherited from G4VViewer
 G4VViewer (G4VSceneHandler &, G4int id, const G4String &name="")
 
virtual ~G4VViewer ()
 
virtual void Initialise ()
 
virtual void ResetView ()
 
virtual void SetView ()=0
 
virtual void ClearView ()=0
 
virtual void DrawView ()=0
 
void RefreshView ()
 
virtual void ShowView ()
 
virtual void FinishView ()
 
const G4StringGetName () const
 
const G4StringGetShortName () const
 
void SetName (const G4String &)
 
G4int GetViewId () const
 
G4VSceneHandlerGetSceneHandler () const
 
const G4ViewParametersGetViewParameters () const
 
const G4ViewParametersGetDefaultViewParameters () const
 
void SetViewParameters (const G4ViewParameters &vp)
 
void SetDefaultViewParameters (const G4ViewParameters &vp)
 
const G4VisAttributesGetApplicableVisAttributes (const G4VisAttributes *) const
 
void SetNeedKernelVisit (G4bool need)
 
void NeedKernelVisit ()
 
void ProcessView ()
 

Additional Inherited Members

- Protected Attributes inherited from G4VViewer
G4VSceneHandlerfSceneHandler
 
G4int fViewId
 
G4String fName
 
G4String fShortName
 
G4ViewParameters fVP
 
G4ViewParameters fDefaultVP
 
G4bool fNeedKernelVisit
 

Detailed Description

Author
Mark Donszelmann

Definition at line 42 of file G4HepRepViewer.hh.

Constructor & Destructor Documentation

◆ G4HepRepViewer()

G4HepRepViewer::G4HepRepViewer ( G4VSceneHandler scene,
const G4String name = "" 
)

Definition at line 49 of file G4HepRepViewer.cc.

50 : G4VViewer (sceneHandler, sceneHandler.IncrementViewCount(), name),
51 geometryIncluded(false) {
52
53#ifdef SDEBUG
54 cout << "G4HepRepViewer::G4HepRepViewer " << name << endl;
55#endif
56
57 // Make changes to view parameters for HepRep...
58 fVP.SetCulling(false);
60}
G4ViewParameters fDefaultVP
Definition: G4VViewer.hh:138
G4ViewParameters fVP
Definition: G4VViewer.hh:137
void SetCulling(G4bool)

◆ ~G4HepRepViewer()

G4HepRepViewer::~G4HepRepViewer ( )
virtual

Definition at line 64 of file G4HepRepViewer.cc.

64 {
65#ifdef SDEBUG
66 cout << "G4HepRepViewer::~G4HepRepViewer" << endl;
67#endif
68 dynamic_cast<G4HepRep*>(GetSceneHandler()->GetGraphicsSystem())->removeViewer();
69}
G4VGraphicsSystem * GetGraphicsSystem() const
G4VSceneHandler * GetSceneHandler() const

Member Function Documentation

◆ ClearView()

void G4HepRepViewer::ClearView ( void  )
virtual

Implements G4VViewer.

Definition at line 72 of file G4HepRepViewer.cc.

72 {
73#ifdef SDEBUG
74 cout << "G4HepRepViewer::ClearView" << endl;
75#endif
76}

◆ DrawView()

void G4HepRepViewer::DrawView ( )
virtual

Implements G4VViewer.

Definition at line 91 of file G4HepRepViewer.cc.

91 {
92#ifdef SDEBUG
93 cout << "G4HepRepViewer::DrawView" << endl;
94#endif
95 if (!geometryIncluded) {
96 // draws the geometry
99 geometryIncluded = true;
100 }
101}
void ProcessView()
Definition: G4VViewer.cc:115
void NeedKernelVisit()
Definition: G4VViewer.cc:86

◆ FinishView()

void G4HepRepViewer::FinishView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 118 of file G4HepRepViewer.cc.

118 {
119#ifdef SDEBUG
120 cout << "G4HepRepViewer::FinishView" << endl;
121#endif
123}
virtual void FinishView()
Definition: G4VViewer.cc:111

◆ reset()

void G4HepRepViewer::reset ( )

Definition at line 125 of file G4HepRepViewer.cc.

125 {
126 geometryIncluded = false;
127}

◆ SetView()

void G4HepRepViewer::SetView ( )
virtual

Implements G4VViewer.

Definition at line 78 of file G4HepRepViewer.cc.

78 {
79#ifdef SDEBUG
80 cout << "G4HepRepViewer::SetView" << endl;
81#endif
82}

◆ ShowView()

void G4HepRepViewer::ShowView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 103 of file G4HepRepViewer.cc.

103 {
104#ifdef SDEBUG
105 cout << "G4HepRepViewer::ShowView" << endl;
106#endif
108
109 G4HepRepSceneHandler* sceneHandler = dynamic_cast<G4HepRepSceneHandler*>(GetSceneHandler());
110 if (sceneHandler->closeHepRep()) {
111 sceneHandler->openHepRep();
112
114 if (messenger->appendGeometry()) geometryIncluded = false;
115 }
116}
virtual G4bool appendGeometry()
static G4HepRepMessenger * GetInstance()
bool closeHepRep(bool final=false)
virtual void ShowView()
Definition: G4VViewer.cc:113

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