47 sceneHandler.IncrementViewCount(),
49 fSceneHandler(sceneHandler),
50 fDest(sceneHandler.fDest)
52 fViewHalfAngle = 0.5 * 0.785398 ;
53 fsin_VHA = std::sin ( fViewHalfAngle ) ;
59void G4VRML2FileViewer::SetView()
61#if defined DEBUG_FR_VIEW
63 G4cout <<
"***** G4VRML2FileViewer::SetView(): No effects" <<
G4endl;
73#if defined DEBUG_FR_VIEW
75 G4cout <<
"***** G4VRML2FileViewer::DrawView()" <<
G4endl;
91#if defined DEBUG_FR_VIEW
93 G4cout <<
"***** G4VRML2File1View::ClearView()" <<
G4endl;
95 if(fSceneHandler.fFlagDestOpen) {
96 fSceneHandler.
fDest.close();
98 fSceneHandler.
fDest.open(fSceneHandler.fVRMLFileName);
99 fSceneHandler.
fDest <<
"#VRML V2.0 utf8" <<
"\n";
100 fSceneHandler.
fDest <<
"# Generated by VRML 2.0 driver of GEANT4\n" <<
"\n";
106#if defined DEBUG_FR_VIEW
108 G4cout <<
"***** G4VRML2FileViewer::ShowView()" <<
G4endl;
115#if defined DEBUG_FR_VIEW
117 G4cout <<
"***** G4VRML2FileViewer::FinishView(): No effects" <<
G4endl;
121void G4VRML2FileViewer::SendViewParameters ()
127#if defined DEBUG_FR_VIEW
129 G4cout <<
"***** G4VRML2FileViewer::SendViewParameters()\n";
133 if ( fsin_VHA < 1.0e-6 ) { return ; }
137 G4double camera_distance = extent_radius / fsin_VHA ;
143 G4double E_z = target_point.
z() + camera_distance;
148 fDest <<
"#---------- CAMERA" <<
G4endl;
149 fDest <<
"Viewpoint {" <<
G4endl;
150 fDest <<
"\t" <<
"position " ;
151 fDest << E.x() <<
" " ;
152 fDest << E.y() <<
" " ;
153 fDest << E.z() <<
G4endl ;
G4DLLIMPORT std::ostream G4cout
const G4VisExtent & GetExtent() const
const G4Point3D & GetStandardTargetPoint() const
G4VRML2FileViewer(G4VRML2FileSceneHandler &scene, const G4String &name="")
virtual ~G4VRML2FileViewer()
G4Scene * GetScene() const
const G4Point3D & GetCurrentTargetPoint() const
G4double GetExtentRadius() const
static Verbosity GetVerbosity()