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

#include <G4ToolsSGXtZB.hh>

+ Inheritance diagram for G4ToolsSGXtZB:

Public Member Functions

 G4ToolsSGXtZB ()
 
virtual ~G4ToolsSGXtZB ()
 
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

 G4ToolsSGXtZB (const G4ToolsSGXtZB &a_from)
 
G4ToolsSGXtZBoperator= (const G4ToolsSGXtZB &)
 
void Initialise ()
 

Protected Attributes

toolx::Xt::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 G4ToolsSGXtZB.hh.

Constructor & Destructor Documentation

◆ G4ToolsSGXtZB() [1/2]

G4ToolsSGXtZB::G4ToolsSGXtZB ( )

Definition at line 51 of file G4ToolsSGXtZB.cc.

51 :
52parent
53("TOOLSSG_XT_ZB",
54 "TSG_XT_ZB",
55 "TOOLSSG_XT_ZB is a graphics driver based on the g4tools tools/sg scene graph logic where\n\
56 the rendering is done with the g4tools zbuffer and the windowing is done with the Xt toolkit.",
58,fSGSession(nullptr)
59{}
toolx::Xt::session * fSGSession

◆ ~G4ToolsSGXtZB()

G4ToolsSGXtZB::~G4ToolsSGXtZB ( )
virtual

Definition at line 61 of file G4ToolsSGXtZB.cc.

61 {
62 delete fSGSession;
63}

◆ G4ToolsSGXtZB() [2/2]

G4ToolsSGXtZB::G4ToolsSGXtZB ( const G4ToolsSGXtZB & a_from)
inlineprotected

Definition at line 41 of file G4ToolsSGXtZB.hh.

41:parent(a_from){}

Member Function Documentation

◆ CreateSceneHandler()

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

Implements G4VGraphicsSystem.

Definition at line 76 of file G4ToolsSGXtZB.cc.

76 {
77 G4VSceneHandler* pScene = new G4ToolsSGSceneHandler(*this, a_name);
78 return pScene;
79}

◆ CreateViewer()

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

Implements G4VGraphicsSystem.

Definition at line 81 of file G4ToolsSGXtZB.cc.

81 {
83 if(!fSGSession) return nullptr;
84 G4VViewer* pView =
86 if (pView) {
87 if (pView->GetViewId() < 0) {
88 G4cerr <<
89 "G4ToolsSGXtZB::CreateViewer: ERROR flagged by negative"
90 " view id in G4ToolsSGViewer creation."
91 "\n Destroying view and returning null pointer."
92 << G4endl;
93 delete pView;
94 pView = nullptr;
95 }
96 }
97 if (!pView) {
98 G4cerr <<
99 "G4ToolsSGXtZB::CreateViewer: ERROR: null pointer on new G4ToolsSGViewer."
100 << G4endl;
101 }
102 return pView;
103}
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition G4ios.hh:67
G4int GetViewId() const

◆ Initialise()

void G4ToolsSGXtZB::Initialise ( )
protected

Definition at line 65 of file G4ToolsSGXtZB.cc.

65 {
66 if(fSGSession) return; //done.
68 if(!fSGSession->is_valid()) {
69 G4cerr << "G4ToolsSGXtZB::Initialise : session::is_valid() failed." << G4endl;
70 delete fSGSession;
71 fSGSession = nullptr;
72 return;
73 }
74}
G4GLOB_DLL std::ostream G4cout

Referenced by CreateViewer().

◆ operator=()

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

Definition at line 42 of file G4ToolsSGXtZB.hh.

42{return *this;}

Member Data Documentation

◆ fSGSession

toolx::Xt::session* G4ToolsSGXtZB::fSGSession
protected

Definition at line 49 of file G4ToolsSGXtZB.hh.

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


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