Geant4-11
Public Member Functions | Data Fields
source.g4viscp.G4VisCP Class Reference

Public Member Functions

def __init__ (self, gsys="OGLIX")
 
def add_scene (self, ascene)
 
def select_scene (self, iscene)
 

Data Fields

 gsystem
 
 scenelist
 
 viewpoint
 

Detailed Description

Definition at line 44 of file g4viscp.py.

Constructor & Destructor Documentation

◆ __init__()

def source.g4viscp.G4VisCP.__init__ (   self,
  gsys = "OGLIX" 
)

Definition at line 47 of file g4viscp.py.

47 def __init__(self, gsys="OGLIX"):
48 self.gsystem= gsys
49 self.scenelist= [G4Scene("default")]
50 self.viewpoint= [270., 90.]
51
52 rc= ApplyUICommand("/vis/open " + gsys)
53 if (rc != 0):
54 return
55
56 self.scenelist[0].create_scene()
57 ApplyUICommand("/vis/viewer/set/viewpointThetaPhi %f %f"
58 % (self.viewpoint[0], self.viewpoint[1]) )
59 ApplyUICommand("/tracking/storeTrajectory 1")
60

Member Function Documentation

◆ add_scene()

def source.g4viscp.G4VisCP.add_scene (   self,
  ascene 
)

Definition at line 61 of file g4viscp.py.

61 def add_scene(self, ascene):
62 self.scenelist.append(ascene)
63

References source.g4viscp.G4VisCP.scenelist.

◆ select_scene()

def source.g4viscp.G4VisCP.select_scene (   self,
  iscene 
)

Definition at line 64 of file g4viscp.py.

64 def select_scene(self, iscene):
65 self.scenelist[iscene].update_scene()
66 ApplyUICommand("/vis/viewer/set/viewpointThetaPhi %f %f"
67 % (self.viewpoint[0], self.viewpoint[1]) )
68

References source.g4viscp.G4VisCP.scenelist, and source.g4viscp.G4VisCP.viewpoint.

Field Documentation

◆ gsystem

source.g4viscp.G4VisCP.gsystem

Definition at line 48 of file g4viscp.py.

◆ scenelist

source.g4viscp.G4VisCP.scenelist

◆ viewpoint

source.g4viscp.G4VisCP.viewpoint

Definition at line 50 of file g4viscp.py.

Referenced by source.g4viscp.G4VisCP.select_scene().


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