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

#include <G4OpenInventorWin.hh>

Inheritance diagram for G4OpenInventorWin:
G4OpenInventor G4VGraphicsSystem G4OpenInventorWin32

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="")
 
 G4OpenInventorWin ()
 
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 ~G4OpenInventorWin ()
 

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 35 of file G4OpenInventorWin.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

◆ G4OpenInventorWin()

G4OpenInventorWin::G4OpenInventorWin ( )

Definition at line 39 of file G4OpenInventorWin.cc.

40:G4OpenInventor("OpenInventorWin","OIWin32",G4VGraphicsSystem::threeD)
41,fInited(false)
42{
43}
G4OpenInventor(const G4String, const G4String, G4VGraphicsSystem::Functionality)

◆ ~G4OpenInventorWin()

G4OpenInventorWin::~G4OpenInventorWin ( )
virtual

Definition at line 62 of file G4OpenInventorWin.cc.

62{}

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 * G4OpenInventorWin::CreateViewer ( G4VSceneHandler scene,
const G4String name = "" 
)
virtual

Implements G4VGraphicsSystem.

Definition at line 63 of file G4OpenInventorWin.cc.

References 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

Definition at line 65 of file G4OpenInventor.cc.

65 {
66 return interactorManager;
67}
G4VInteractorManager * interactorManager

References G4OpenInventor::interactorManager.

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

◆ 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 G4OpenInventorWin::Initialize ( void  )
privatevirtual

Implements G4OpenInventor.

Definition at line 45 of file G4OpenInventorWin.cc.

46{
47 if(fInited) return; //Done
48
51 GetInteractorManager () -> AddDispatcher((G4DispatchFunction)SoWin::dispatchEvent);
52
53 HWND toplevel = (HWND)GetInteractorManager()->GetMainInteractor();
54
55 if(!SoWin::getTopLevelWidget()) SoWin::init(toplevel);
56
57 InitNodes();
58
59 fInited = true;
60}
G4bool(* G4DispatchFunction)(void *)
void SetInteractorManager(G4VInteractorManager *)
G4VInteractorManager * GetInteractorManager()
G4Interactor GetMainInteractor()
static G4bool DispatchWin32Event(void *)
Definition: G4Win32.cc:139
static G4Win32 * getInstance()
Definition: G4Win32.cc:43

References G4Win32::DispatchWin32Event(), fInited, G4Win32::getInstance(), G4OpenInventor::GetInteractorManager(), G4VInteractorManager::GetMainInteractor(), 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 G4OpenInventorQt::Initialize(), 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 G4OpenInventorWin::fInited
private

Definition at line 43 of file G4OpenInventorWin.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: