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

#include <G4ToolsSGWindowsZB.hh>

+ Inheritance diagram for G4ToolsSGWindowsZB:

Public Member Functions

 G4ToolsSGWindowsZB ()
 
virtual ~G4ToolsSGWindowsZB ()
 
G4VSceneHandlerCreateSceneHandler (const G4String &name="")
 
G4VViewerCreateViewer (G4VSceneHandler &, const G4String &name="")
 
- Public Member Functions inherited from G4VGraphicsSystem
 G4VGraphicsSystem (const G4String &name, Functionality f)
 
 G4VGraphicsSystem (const G4String &name, const G4String &nickname, Functionality f)
 
 G4VGraphicsSystem (const G4String &name, const G4String &nickname, const G4String &description, Functionality f)
 
virtual ~G4VGraphicsSystem ()
 
const G4StringGetName () const
 
const G4StringGetNickname () const
 
const std::vector< G4String > & GetNicknames () const
 
const G4StringGetDescription () const
 
Functionality GetFunctionality () const
 
virtual G4bool IsUISessionCompatible () const
 
void AddNickname (const G4String &nickname)
 

Protected Member Functions

 G4ToolsSGWindowsZB (const G4ToolsSGWindowsZB &a_from)
 
G4ToolsSGWindowsZBoperator= (const G4ToolsSGWindowsZB &)
 
void Initialise ()
 

Protected Attributes

toolx::Windows::session * fSGSession
 
- Protected Attributes inherited from G4VGraphicsSystem
G4String fName
 
std::vector< G4StringfNicknames
 
G4String fDescription
 
Functionality fFunctionality
 

Additional Inherited Members

- Public Types inherited from G4VGraphicsSystem
enum  Functionality {
  noFunctionality , nonEuclidian , twoD , twoDStore ,
  threeD , threeDInteractive , virtualReality , fileWriter
}
 

Detailed Description

Definition at line 35 of file G4ToolsSGWindowsZB.hh.

Constructor & Destructor Documentation

◆ G4ToolsSGWindowsZB() [1/2]

G4ToolsSGWindowsZB::G4ToolsSGWindowsZB ( )

Definition at line 35 of file G4ToolsSGWindowsZB.cc.

35 :
36parent
37("TOOLSSG_WINDOWS_ZB",
38 "TSG_WINDOWS_ZB",
39 "TOOLSSG_WINDOWS_ZB is a graphics driver based on the g4tools tools/sg scene graph logic where\n\
40 the rendering is done with the g4tools zbuffer and the windowing is done with Microsoft Windows.",
42,fSGSession(nullptr)
43{}
toolx::Windows::session * fSGSession

◆ ~G4ToolsSGWindowsZB()

G4ToolsSGWindowsZB::~G4ToolsSGWindowsZB ( )
virtual

Definition at line 45 of file G4ToolsSGWindowsZB.cc.

45 {
46 delete fSGSession;
47}

◆ G4ToolsSGWindowsZB() [2/2]

G4ToolsSGWindowsZB::G4ToolsSGWindowsZB ( const G4ToolsSGWindowsZB & a_from)
inlineprotected

Definition at line 41 of file G4ToolsSGWindowsZB.hh.

41:parent(a_from){}

Member Function Documentation

◆ CreateSceneHandler()

G4VSceneHandler * G4ToolsSGWindowsZB::CreateSceneHandler ( const G4String & name = "")
virtual

Implements G4VGraphicsSystem.

Definition at line 60 of file G4ToolsSGWindowsZB.cc.

60 {
61 G4VSceneHandler* pScene = new G4ToolsSGSceneHandler(*this, a_name);
62 return pScene;
63}

◆ CreateViewer()

G4VViewer * G4ToolsSGWindowsZB::CreateViewer ( G4VSceneHandler & a_scene,
const G4String & name = "" )
virtual

Implements G4VGraphicsSystem.

Definition at line 65 of file G4ToolsSGWindowsZB.cc.

65 {
67 if(!fSGSession) return nullptr;
68 G4VViewer* pView =
70 if (pView) {
71 if (pView->GetViewId() < 0) {
72 G4cerr <<
73 "G4ToolsSGWindowsZB::CreateViewer: ERROR flagged by negative"
74 " view id in G4ToolsSGViewer creation."
75 "\n Destroying view and returning null pointer."
76 << G4endl;
77 delete pView;
78 pView = nullptr;
79 }
80 }
81 if (!pView) {
82 G4cerr <<
83 "G4ToolsSGWindowsZB::CreateViewer: ERROR: null pointer on new G4ToolsSGViewer."
84 << G4endl;
85 }
86 return pView;
87}
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition G4ios.hh:67
G4int GetViewId() const

◆ Initialise()

void G4ToolsSGWindowsZB::Initialise ( )
protected

Definition at line 49 of file G4ToolsSGWindowsZB.cc.

49 {
50 if(fSGSession) return; //done.
51 fSGSession = new toolx::Windows::session(G4cout);
52 if(!fSGSession->is_valid()) {
53 G4cerr << "G4ToolsSGWindowsZB::Initialise : session::is_valid() failed." << G4endl;
54 delete fSGSession;
55 fSGSession = nullptr;
56 return;
57 }
58}
G4GLOB_DLL std::ostream G4cout

Referenced by CreateViewer().

◆ operator=()

G4ToolsSGWindowsZB & G4ToolsSGWindowsZB::operator= ( const G4ToolsSGWindowsZB & )
inlineprotected

Definition at line 42 of file G4ToolsSGWindowsZB.hh.

42{return *this;}

Member Data Documentation

◆ fSGSession

toolx::Windows::session* G4ToolsSGWindowsZB::fSGSession
protected

Definition at line 49 of file G4ToolsSGWindowsZB.hh.

Referenced by CreateViewer(), Initialise(), and ~G4ToolsSGWindowsZB().


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