48 sceneHandler.IncrementViewCount(),
50 fSceneHandler(sceneHandler),
51 fDest(sceneHandler.fDest)
53 fViewHalfAngle = 30. *
deg;
54 fsin_VHA = std::sin ( fViewHalfAngle ) ;
60 void G4VRML2FileViewer::SetView()
62 #if defined DEBUG_FR_VIEW
64 G4cout <<
"***** G4VRML2FileViewer::SetView(): No effects" <<
G4endl;
74 #if defined DEBUG_FR_VIEW
76 G4cout <<
"***** G4VRML2FileViewer::DrawView()" <<
G4endl;
92 #if defined DEBUG_FR_VIEW
94 G4cout <<
"***** G4VRML2File1View::ClearView()" <<
G4endl;
96 if(fSceneHandler.fFlagDestOpen) {
97 fSceneHandler.
fDest.close();
99 fSceneHandler.
fDest.open(fSceneHandler.fVRMLFileName);
100 fSceneHandler.
fDest <<
"#VRML V2.0 utf8" <<
"\n";
101 fSceneHandler.
fDest <<
"# Generated by VRML 2.0 driver of GEANT4\n" <<
"\n";
107 #if defined DEBUG_FR_VIEW
109 G4cout <<
"***** G4VRML2FileViewer::ShowView()" <<
G4endl;
116 #if defined DEBUG_FR_VIEW
118 G4cout <<
"***** G4VRML2FileViewer::FinishView(): No effects" <<
G4endl;
122 void G4VRML2FileViewer::SendViewParameters ()
128 #if defined DEBUG_FR_VIEW
130 G4cout <<
"***** G4VRML2FileViewer::SendViewParameters()\n";
134 if ( fsin_VHA < 1.0e-6 ) { return ; }
138 G4double camera_distance = extent_radius / fsin_VHA ;
144 G4double E_z = target_point.
z() + camera_distance;
149 fDest <<
"#---------- CAMERA" <<
G4endl;
150 fDest <<
"Viewpoint {" <<
G4endl;
151 fDest <<
"\t" <<
"position " ;
152 fDest << E.x() <<
" " ;
153 fDest << E.y() <<
" " ;
154 fDest << E.z() <<
G4endl ;
virtual ~G4VRML2FileViewer()
const G4Point3D & GetCurrentTargetPoint() const
G4double GetExtentRadius() const
G4GLOB_DLL std::ostream G4cout
const G4VisExtent & GetExtent() const
const G4Point3D & GetStandardTargetPoint() const
G4VRML2FileViewer(G4VRML2FileSceneHandler &scene, const G4String &name="")
G4Scene * GetScene() const
static Verbosity GetVerbosity()
static constexpr double deg