Geant4-11
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
G4OpenInventorQt Class Reference

#include <G4OpenInventorQt.hh>

Inheritance diagram for G4OpenInventorQt:
G4OpenInventor G4VGraphicsSystem

Public Types

enum  Functionality {
  noFunctionality , nonEuclidian , twoD , twoDStore ,
  threeD , threeDInteractive , virtualReality , fileWriter
}
 

Public Member Functions

void AddNickname (const G4String &nickname)
 
G4VSceneHandlerCreateSceneHandler (const G4String &name)
 
G4VViewerCreateViewer (G4VSceneHandler &, const G4String &name="")
 
 G4OpenInventorQt ()
 
const G4StringGetDescription () const
 
Functionality GetFunctionality () const
 
G4VInteractorManagerGetInteractorManager ()
 
const G4StringGetName () const
 
const G4StringGetNickname () const
 
const std::vector< G4String > & GetNicknames () const
 
void InitNodes ()
 
G4bool IsUISessionCompatible () const
 
void SetInteractorManager (G4VInteractorManager *)
 
virtual ~G4OpenInventorQt ()
 

Protected Attributes

G4String fDescription
 
Functionality fFunctionality
 
G4String fName
 
std::vector< G4StringfNicknames
 

Private Member Functions

virtual void Initialize ()
 

Private Attributes

bool fInited
 
G4VInteractorManagerinteractorManager
 

Detailed Description

Definition at line 34 of file G4OpenInventorQt.hh.

Member Enumeration Documentation

◆ Functionality

Enumerator
noFunctionality 
nonEuclidian 
twoD 
twoDStore 
threeD 
threeDInteractive 
virtualReality 
fileWriter 

Definition at line 49 of file G4VGraphicsSystem.hh.

49 {
51 ,nonEuclidian // e.g., tree representation of geometry hierarchy.
52 ,twoD // Simple 2D, e.g., X (no stored structures).
53 ,twoDStore // 2D with stored structures.
54 ,threeD // Passive 3D (with stored structures).
55 ,threeDInteractive // 3D with "pick" functionality.
56 ,virtualReality // Virtual Reality functionality.
57 ,fileWriter // File writer
58 };

Constructor & Destructor Documentation

◆ G4OpenInventorQt()

G4OpenInventorQt::G4OpenInventorQt ( )

Definition at line 40 of file G4OpenInventorQt.cc.

41 : G4OpenInventor("OpenInventorQt", "OIQt", G4VGraphicsSystem::threeD),
42 fInited(false)
43{
44}
G4OpenInventor(const G4String, const G4String, G4VGraphicsSystem::Functionality)

◆ ~G4OpenInventorQt()

G4OpenInventorQt::~G4OpenInventorQt ( )
virtual

Definition at line 70 of file G4OpenInventorQt.cc.

71{
72}

Member Function Documentation

◆ AddNickname()

void G4VGraphicsSystem::AddNickname ( const G4String nickname)
inlineinherited

Definition at line 85 of file G4VGraphicsSystem.hh.

85{fNicknames.push_back(nickname);}
std::vector< G4String > fNicknames

References G4VGraphicsSystem::fNicknames.

◆ CreateSceneHandler()

G4VSceneHandler * G4OpenInventor::CreateSceneHandler ( const G4String name)
virtualinherited

Implements G4VGraphicsSystem.

Definition at line 68 of file G4OpenInventor.cc.

68 {
69 Initialize();
71 return p;
72}
virtual void Initialize()=0
const char * name(G4int ptype)

References G4OpenInventor::Initialize(), and G4InuclParticleNames::name().

◆ CreateViewer()

G4VViewer * G4OpenInventorQt::CreateViewer ( G4VSceneHandler scene,
const G4String name = "" 
)
virtual

Implements G4VGraphicsSystem.

Definition at line 74 of file G4OpenInventorQt.cc.

76{
77 auto pView = new G4OpenInventorQtViewer(static_cast<G4OpenInventorSceneHandler&>(scene), name);
78
79 if (pView) {
80 if (pView->GetViewId() < 0) {
81 G4cerr <<
82 "G4OpenInventorQt::CreateViewer: ERROR flagged by negative"
83 " view id in G4OpenInventorQtViewer creation."
84 "\n Destroying view and returning null pointer."
85 << G4endl;
86 delete pView;
87 pView = 0;
88 }
89 }
90 if (!pView) {
91 G4cerr <<
92 "G4OpenInventorQt::CreateViewer: ERROR: null pointer on new G4OpenInventorQtViewer."
93 << G4endl;
94 }
95
96 Initialize();
97
98 return pView;
99}
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
virtual void Initialize()

References G4cerr, G4endl, Initialize(), and G4InuclParticleNames::name().

◆ GetDescription()

const G4String & G4VGraphicsSystem::GetDescription ( ) const
inlineinherited

Definition at line 82 of file G4VGraphicsSystem.hh.

82{return fDescription;}

References G4VGraphicsSystem::fDescription.

◆ GetFunctionality()

Functionality G4VGraphicsSystem::GetFunctionality ( ) const
inlineinherited

Definition at line 83 of file G4VGraphicsSystem.hh.

83{return fFunctionality;}
Functionality fFunctionality

References G4VGraphicsSystem::fFunctionality.

Referenced by G4VisManager::EndOfRun().

◆ GetInteractorManager()

G4VInteractorManager * G4OpenInventor::GetInteractorManager ( )
inherited

◆ GetName()

const G4String & G4VGraphicsSystem::GetName ( ) const
inlineinherited

Definition at line 79 of file G4VGraphicsSystem.hh.

79{return fName;}

References G4VGraphicsSystem::fName.

Referenced by G4VSceneHandler::AddPrimitive().

◆ GetNickname()

const G4String & G4VGraphicsSystem::GetNickname ( ) const
inlineinherited

Definition at line 80 of file G4VGraphicsSystem.hh.

80{return fNicknames[0];}

References G4VGraphicsSystem::fNicknames.

Referenced by G4VisCommandViewerList::SetNewValue().

◆ GetNicknames()

const std::vector< G4String > & G4VGraphicsSystem::GetNicknames ( ) const
inlineinherited

Definition at line 81 of file G4VGraphicsSystem.hh.

81{return fNicknames;}

References G4VGraphicsSystem::fNicknames.

◆ Initialize()

void G4OpenInventorQt::Initialize ( void  )
privatevirtual

Implements G4OpenInventor.

Definition at line 46 of file G4OpenInventorQt.cc.

47{
48 if(fInited) return; //Done
49
50 // FWJ DEBUG
51 // G4cout << "G4OpenInventorQt: SETINTERACTORMANAGER " << G4SoQt::getInstance()
52 // << G4endl;
53
55
56 // FWJ DEBUG
57 // G4cout << "G4OpenInventorQt: GETINTERACTORMANAGER " <<
58 // GetInteractorManager() << G4endl;
59
60 // FWJ for now, create an independent main window
61 // NOW should be done in G4SoQt [public G4VInteractorManager]
62 // QWidget* mainWin = SoQt::init("Geant4");
63
64 // In parent G4OpenInventor
65 InitNodes();
66
67 fInited = true;
68}
void SetInteractorManager(G4VInteractorManager *)
static G4SoQt * getInstance()
Definition: G4SoQt.cc:54

References fInited, G4SoQt::getInstance(), G4OpenInventor::InitNodes(), and G4OpenInventor::SetInteractorManager().

Referenced by CreateViewer().

◆ InitNodes()

void G4OpenInventor::InitNodes ( )
inherited

Definition at line 74 of file G4OpenInventor.cc.

75{
85
89}
static void initClass()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition: SoPolyhedron.cc:59
static void initClass()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition: SoMarkerSet.cc:627
static void initClass(void)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
static void initClass()
Class Initializer, required.
Definition: SoBox.cc:77
static void initClass()
Class Initializer, required.
Definition: SoCons.cc:84
static void initClass(void)
static void initClass()
static void initClass()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
static void initClass()
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
static void initClass()
Class Initializer, required.
Definition: SoTrap.cc:89
static void initClass()
Class Initializer, required.
Definition: SoTrd.cc:59
static void initClass()
Class Initializer, required.
Definition: SoTubs.cc:84

References Geant4_SoPolyhedron::initClass(), SoGL2PSAction::initClass(), SoDetectorTreeKit::initClass(), SoBox::initClass(), SoCons::initClass(), SoImageWriter::initClass(), HEPVis_SoMarkerSet::initClass(), SoTrap::initClass(), SoTrd::initClass(), SoTubs::initClass(), SoAlternateRepAction::initClass(), and SoCounterAction::initClass().

Referenced by Initialize(), G4OpenInventorWin::Initialize(), G4OpenInventorXt::Initialize(), and G4OpenInventorXtExtended::Initialize().

◆ IsUISessionCompatible()

G4bool G4OpenInventor::IsUISessionCompatible ( ) const
virtualinherited

Reimplemented from G4VGraphicsSystem.

Definition at line 91 of file G4OpenInventor.cc.

92{
93 G4bool isCompatible = false;
96
97 // If session is a batch session, it may be:
98 // a) this is a batch job (the user has not instantiated any UI session);
99 // b) we are currently processing a UI command, in which case the UI
100 // manager creates a temporary batch session and to find out if there is
101 // a genuine UI session that the user has instantiated we must drill
102 // down through previous sessions to a possible non-batch session.
103 while (G4UIbatch* batch = dynamic_cast<G4UIbatch*>(session)) {
104 session = batch->GetPreviousSession();
105 }
106
107 // OI windows are not appropriate in a batch session.
108 if (session) {
109 // If non-zero, this is the originating non-batch session
110 // The user has instantiated a UI session...
111 isCompatible = true;
112 }
113
114 return isCompatible;
115}
bool G4bool
Definition: G4Types.hh:86
G4UIsession * GetSession() const
Definition: G4UImanager.hh:187
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77

References G4UImanager::GetSession(), and G4UImanager::GetUIpointer().

◆ SetInteractorManager()

void G4OpenInventor::SetInteractorManager ( G4VInteractorManager im)
inherited

Field Documentation

◆ fDescription

G4String G4VGraphicsSystem::fDescription
protectedinherited

Definition at line 90 of file G4VGraphicsSystem.hh.

Referenced by G4VGraphicsSystem::GetDescription().

◆ fFunctionality

Functionality G4VGraphicsSystem::fFunctionality
protectedinherited

Definition at line 91 of file G4VGraphicsSystem.hh.

Referenced by G4VGraphicsSystem::GetFunctionality().

◆ fInited

bool G4OpenInventorQt::fInited
private

Definition at line 42 of file G4OpenInventorQt.hh.

Referenced by Initialize().

◆ fName

G4String G4VGraphicsSystem::fName
protectedinherited

Definition at line 88 of file G4VGraphicsSystem.hh.

Referenced by G4VGraphicsSystem::GetName().

◆ fNicknames

std::vector<G4String> G4VGraphicsSystem::fNicknames
protectedinherited

◆ interactorManager

G4VInteractorManager* G4OpenInventor::interactorManager
privateinherited

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