28 #ifndef G4OPENINVENTORVIEWER_HH
29 #define G4OPENINVENTORVIEWER_HH
31 #ifdef G4VIS_BUILD_OI_DRIVER
42 class Geant4_SoImageWriter;
43 class Geant4_SoGL2PSAction;
44 class G4OpenInventorSceneHandler;
51 class G4OpenInventorViewer:
public G4VViewer {
57 virtual void KernelVisitDecision();
59 G4OpenInventorViewer(G4OpenInventorSceneHandler& scene,
61 virtual ~G4OpenInventorViewer();
63 virtual void ViewerRender() = 0;
64 virtual SoCamera* GetCamera() = 0;
66 void WritePostScript(
const G4String& file =
"g4out.ps");
67 void WritePDF(
const G4String& file =
"g4out.pdf");
68 void WritePixmapPostScript(
const G4String& file =
"g4out.ps");
69 void WriteInventor(
const G4String& file =
"g4out.iv");
70 void SceneGraphStatistics();
73 void SetPreviewAndFull();
77 void SetReducedWireFrame(
bool);
83 static void GroupCameraSensorCB(
void*,SoSensor*);
84 static void CameraSensorCB(
void*,SoSensor*);
85 static void pointAt(SoCamera*,
const SbVec3f & targetpoint,
const SbVec3f & upvector);
86 static void lookAt(SoCamera*,
const SbVec3f & dir,
const SbVec3f & up);
87 static void lookedAt(SoCamera*,SbVec3f & dir, SbVec3f & up);
94 static void SelectionCB(
void*,SoPath*);
95 G4OpenInventorSceneHandler& fG4OpenInventorSceneHandler;
97 SoSelection* fSoSelection;
98 Geant4_SoImageWriter* fSoImageWriter;
99 Geant4_SoGL2PSAction* fGL2PSAction;
100 SoNodeSensor* fGroupCameraSensor;
101 SoNodeSensor* fCameraSensor;
virtual void ClearView()=0
virtual void DrawView()=0