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

#include <G4XXXFileViewer.hh>

+ Inheritance diagram for G4XXXFileViewer:

Classes

class  FileWriter
 

Public Member Functions

 G4XXXFileViewer (G4VSceneHandler &, const G4String &name)
 
virtual ~G4XXXFileViewer ()
 
void SetView ()
 
void ClearView ()
 
void DrawView ()
 
void ShowView ()
 
FileWriterGetFileWriter ()
 
- 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

Definition at line 41 of file G4XXXFileViewer.hh.

Constructor & Destructor Documentation

◆ G4XXXFileViewer()

G4XXXFileViewer::G4XXXFileViewer ( G4VSceneHandler sceneHandler,
const G4String name 
)

Definition at line 73 of file G4XXXFileViewer.cc.

74 :
75 G4VViewer(sceneHandler, sceneHandler.IncrementViewCount(), name)
76{}
G4int IncrementViewCount()

◆ ~G4XXXFileViewer()

G4XXXFileViewer::~G4XXXFileViewer ( )
virtual

Definition at line 78 of file G4XXXFileViewer.cc.

79{
80 fFileWriter.Close();
81}

Member Function Documentation

◆ ClearView()

void G4XXXFileViewer::ClearView ( void  )
virtual

Implements G4VViewer.

Definition at line 89 of file G4XXXFileViewer.cc.

89 {
90#ifdef G4XXXFileDEBUG
91 G4cout << "G4XXXFileViewer::ClearView() called." << G4endl;
92#endif
93 fFileWriter.Rewind();
94}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

◆ DrawView()

void G4XXXFileViewer::DrawView ( )
virtual

Implements G4VViewer.

Definition at line 96 of file G4XXXFileViewer.cc.

96 {
97#ifdef G4XXXFileDEBUG
98 G4cout << "G4XXXFileViewer::DrawView() called." << G4endl;
99#endif
100
101 // First, a view should decide when to re-visit the G4 kernel.
102 // Sometimes it might not be necessary, e.g., if the scene is stored
103 // in a graphical database (e.g., OpenGL's display lists) and only
104 // the viewing angle has changed. But graphics systems without a
105 // graphical database will always need to visit the G4 kernel.
106
107 NeedKernelVisit (); // Default is - always visit G4 kernel.
108 // Note: this routine sets the fNeedKernelVisit flag of *all* the
109 // views of the scene.
110
111 ProcessView (); // The basic logic is here.
112
113 // Then a view may have more to do, e.g., display the graphical
114 // database. That code should come here...
115
116 // ...before finally...
117 FinishView (); // Flush streams and/or swap buffers.
118}
void ProcessView()
Definition: G4VViewer.cc:115
void NeedKernelVisit()
Definition: G4VViewer.cc:86
virtual void FinishView()
Definition: G4VViewer.cc:111

◆ GetFileWriter()

FileWriter & G4XXXFileViewer::GetFileWriter ( )
inline

Definition at line 65 of file G4XXXFileViewer.hh.

65{return fFileWriter;}

◆ SetView()

void G4XXXFileViewer::SetView ( )
virtual

Implements G4VViewer.

Definition at line 83 of file G4XXXFileViewer.cc.

83 {
84#ifdef G4XXXFileDEBUG
85 G4cout << "G4XXXFileViewer::SetView() called." << G4endl;
86#endif
87}

◆ ShowView()

void G4XXXFileViewer::ShowView ( void  )
virtual

Reimplemented from G4VViewer.

Definition at line 120 of file G4XXXFileViewer.cc.

120 {
121#ifdef G4XXXFileDEBUG
122 G4cout << "G4XXXFileViewer::ShowView() called." << G4endl;
123#endif
124 fFileWriter.Close();
125}

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