Geant4  10.02.p03
G4HepRepViewer Class Reference

#include <G4HepRepViewer.hh>

Inheritance diagram for G4HepRepViewer:
Collaboration 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 ()
 
void RefreshView ()
 
const G4String & GetName () const
 
const G4String & GetShortName () const
 
void SetName (const G4String &)
 
G4int GetViewId () const
 
G4VSceneHandler * GetSceneHandler () const
 
const G4ViewParameters & GetViewParameters () const
 
const G4ViewParameters & GetDefaultViewParameters () const
 
virtual const std::vector< G4ModelingParameters::VisAttributesModifier > * GetPrivateVisAttributesModifiers () const
 
void SetViewParameters (const G4ViewParameters &vp)
 
void SetDefaultViewParameters (const G4ViewParameters &vp)
 
const G4VisAttributes * GetApplicableVisAttributes (const G4VisAttributes *) const
 
void SetNeedKernelVisit (G4bool need)
 
void NeedKernelVisit ()
 
void ProcessView ()
 

Private Attributes

bool geometryIncluded
 

Additional Inherited Members

- Protected Attributes inherited from G4VViewer
G4VSceneHandler & fSceneHandler
 
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);
59  fDefaultVP.SetCulling(false);
60 }
G4String name
Definition: TRTMaterials.hh:40
G4ViewParameters fDefaultVP
Definition: G4VViewer.hh:161
G4VViewer(G4VSceneHandler &, G4int id, const G4String &name="")
Definition: G4VViewer.cc:45
G4ViewParameters fVP
Definition: G4VViewer.hh:160
void SetCulling(G4bool)
Here is the call graph for this function:

◆ ~G4HepRepViewer()

G4HepRepViewer::~G4HepRepViewer ( )
virtual

Definition at line 64 of file G4HepRepViewer.cc.

64  {
65 #ifdef SDEBUG
66  cout << "G4HepRepViewer::~G4HepRepViewer" << endl;
67 #endif
68  G4HepRep* pHepRepSystem =
69  dynamic_cast<G4HepRep*>(GetSceneHandler()->GetGraphicsSystem());
70  if (pHepRepSystem) pHepRepSystem->removeViewer();
71 }
G4VSceneHandler * GetSceneHandler() const
void removeViewer()
Definition: G4HepRep.cc:84
G4VGraphicsSystem * GetGraphicsSystem() const
Here is the call graph for this function:

Member Function Documentation

◆ ClearView()

void G4HepRepViewer::ClearView ( void  )
virtual

Implements G4VViewer.

Definition at line 74 of file G4HepRepViewer.cc.

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

◆ DrawView()

void G4HepRepViewer::DrawView ( )
virtual

Implements G4VViewer.

Definition at line 93 of file G4HepRepViewer.cc.

93  {
94 #ifdef SDEBUG
95  cout << "G4HepRepViewer::DrawView" << endl;
96 #endif
97  if (!geometryIncluded) {
98  // draws the geometry
100  ProcessView();
101  geometryIncluded = true;
102  }
103 }
void NeedKernelVisit()
Definition: G4VViewer.cc:86
void ProcessView()
Definition: G4VViewer.cc:115
Here is the call graph for this function:

◆ FinishView()

void G4HepRepViewer::FinishView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 122 of file G4HepRepViewer.cc.

122  {
123 #ifdef SDEBUG
124  cout << "G4HepRepViewer::FinishView" << endl;
125 #endif
127 }
virtual void FinishView()
Definition: G4VViewer.cc:111
Here is the call graph for this function:

◆ reset()

void G4HepRepViewer::reset ( )

Definition at line 129 of file G4HepRepViewer.cc.

129  {
130  geometryIncluded = false;
131 }
Here is the caller graph for this function:

◆ SetView()

void G4HepRepViewer::SetView ( )
virtual

Implements G4VViewer.

Definition at line 80 of file G4HepRepViewer.cc.

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

◆ ShowView()

void G4HepRepViewer::ShowView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 105 of file G4HepRepViewer.cc.

105  {
106 #ifdef SDEBUG
107  cout << "G4HepRepViewer::ShowView" << endl;
108 #endif
110 
111  G4HepRepSceneHandler* sceneHandler = dynamic_cast<G4HepRepSceneHandler*>(GetSceneHandler());
112  if (sceneHandler) {
113  if (sceneHandler->closeHepRep()) {
114  sceneHandler->openHepRep();
115 
117  if (messenger->appendGeometry()) geometryIncluded = false;
118  }
119  }
120 }
bool closeHepRep(bool final=false)
virtual void ShowView()
Definition: G4VViewer.cc:113
G4VSceneHandler * GetSceneHandler() const
static G4HepRepMessenger * GetInstance()
virtual G4bool appendGeometry()
Here is the call graph for this function:

Member Data Documentation

◆ geometryIncluded

bool G4HepRepViewer::geometryIncluded
private

Definition at line 55 of file G4HepRepViewer.hh.


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