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

#include <G4ToolsSGXtGLES.hh>

+ Inheritance diagram for G4ToolsSGXtGLES:

Public Member Functions

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

 G4ToolsSGXtGLES (const G4ToolsSGXtGLES &a_from)
 
G4ToolsSGXtGLESoperator= (const G4ToolsSGXtGLES &)
 
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 G4ToolsSGXtGLES.hh.

Constructor & Destructor Documentation

◆ G4ToolsSGXtGLES() [1/2]

G4ToolsSGXtGLES::G4ToolsSGXtGLES ( )

Definition at line 51 of file G4ToolsSGXtGLES.cc.

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

◆ ~G4ToolsSGXtGLES()

G4ToolsSGXtGLES::~G4ToolsSGXtGLES ( )
virtual

Definition at line 61 of file G4ToolsSGXtGLES.cc.

61 {
62 delete fSGSession;
63}

◆ G4ToolsSGXtGLES() [2/2]

G4ToolsSGXtGLES::G4ToolsSGXtGLES ( const G4ToolsSGXtGLES & a_from)
inlineprotected

Definition at line 41 of file G4ToolsSGXtGLES.hh.

41:parent(a_from){}

Member Function Documentation

◆ CreateSceneHandler()

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

Implements G4VGraphicsSystem.

Definition at line 76 of file G4ToolsSGXtGLES.cc.

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

◆ CreateViewer()

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

Implements G4VGraphicsSystem.

Definition at line 81 of file G4ToolsSGXtGLES.cc.

81 {
83 if(!fSGSession) return nullptr;
84 G4VViewer* pView =
86 if (pView) {
87 if (pView->GetViewId() < 0) {
88 G4cerr <<
89 "G4ToolsSGXtGLES::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 "G4ToolsSGXtGLES::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 G4ToolsSGXtGLES::Initialise ( )
protected

Definition at line 65 of file G4ToolsSGXtGLES.cc.

65 {
66 if(fSGSession) return; //done.
68 if(!fSGSession->is_valid()) {
69 G4cerr << "G4ToolsSGXtGLES::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=()

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

Definition at line 42 of file G4ToolsSGXtGLES.hh.

42{return *this;}

Member Data Documentation

◆ fSGSession

toolx::Xt::session* G4ToolsSGXtGLES::fSGSession
protected

Definition at line 49 of file G4ToolsSGXtGLES.hh.

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


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