Geant4 10.7.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 ()
 
std::vector< G4ThreeVectorComputeFlyThrough (G4Vector3D *)
 
const G4StringGetName () const
 
const G4StringGetShortName () const
 
void SetName (const G4String &)
 
G4int GetViewId () const
 
G4VSceneHandlerGetSceneHandler () const
 
const G4ViewParametersGetViewParameters () const
 
const G4ViewParametersGetDefaultViewParameters () const
 
virtual const std::vector< G4ModelingParameters::VisAttributesModifier > * GetPrivateVisAttributesModifiers () 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 Member Functions inherited from G4VViewer
void SetTouchable (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath)
 
void TouchableSetVisibility (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, G4bool visibility)
 
void TouchableSetColour (const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, const G4Colour &)
 
- 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 41 of file G4HepRepViewer.hh.

Constructor & Destructor Documentation

◆ G4HepRepViewer()

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

Definition at line 48 of file G4HepRepViewer.cc.

49 : G4VViewer (sceneHandler, sceneHandler.IncrementViewCount(), name),
50 geometryIncluded(false) {
51
52#ifdef SDEBUG
53 cout << "G4HepRepViewer::G4HepRepViewer " << name << endl;
54#endif
55
56 // Make changes to view parameters for HepRep...
57 fVP.SetCulling(false);
59}
G4ViewParameters fDefaultVP
Definition: G4VViewer.hh:220
G4ViewParameters fVP
Definition: G4VViewer.hh:219
void SetCulling(G4bool)
const char * name(G4int ptype)

◆ ~G4HepRepViewer()

G4HepRepViewer::~G4HepRepViewer ( )
virtual

Definition at line 63 of file G4HepRepViewer.cc.

63 {
64#ifdef SDEBUG
65 cout << "G4HepRepViewer::~G4HepRepViewer" << endl;
66#endif
67 G4HepRep* pHepRepSystem =
68 dynamic_cast<G4HepRep*>(GetSceneHandler()->GetGraphicsSystem());
69 if (pHepRepSystem) pHepRepSystem->removeViewer();
70}
void removeViewer()
Definition: G4HepRep.cc:83
G4VGraphicsSystem * GetGraphicsSystem() const
G4VSceneHandler * GetSceneHandler() const

Member Function Documentation

◆ ClearView()

void G4HepRepViewer::ClearView ( void  )
virtual

Implements G4VViewer.

Definition at line 73 of file G4HepRepViewer.cc.

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

◆ DrawView()

void G4HepRepViewer::DrawView ( )
virtual

Implements G4VViewer.

Definition at line 92 of file G4HepRepViewer.cc.

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

◆ FinishView()

void G4HepRepViewer::FinishView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 121 of file G4HepRepViewer.cc.

121 {
122#ifdef SDEBUG
123 cout << "G4HepRepViewer::FinishView" << endl;
124#endif
126}
virtual void FinishView()
Definition: G4VViewer.cc:100

◆ reset()

void G4HepRepViewer::reset ( )

Definition at line 128 of file G4HepRepViewer.cc.

128 {
129 geometryIncluded = false;
130}

◆ SetView()

void G4HepRepViewer::SetView ( )
virtual

Implements G4VViewer.

Definition at line 79 of file G4HepRepViewer.cc.

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

◆ ShowView()

void G4HepRepViewer::ShowView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 104 of file G4HepRepViewer.cc.

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

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