45 :
G4VViewer(sceneHandler, sceneHandler.IncrementViewCount(), name)
46 , fSceneHandler(sceneHandler)
47 , fDest(sceneHandler.fDest)
49 fViewHalfAngle = 30. * deg;
50 fsin_VHA = std::sin(fViewHalfAngle);
55void G4VRML2FileViewer::SetView()
57#if defined DEBUG_FR_VIEW
59 G4cout <<
"***** G4VRML2FileViewer::SetView(): No effects" <<
G4endl;
68#if defined DEBUG_FR_VIEW
70 G4cout <<
"***** G4VRML2FileViewer::DrawView()" <<
G4endl;
86#if defined DEBUG_FR_VIEW
88 G4cout <<
"***** G4VRML2File1View::ClearView()" <<
G4endl;
90 if(fSceneHandler.fFlagDestOpen)
92 fSceneHandler.
fDest.close();
94 fSceneHandler.
fDest.open(fSceneHandler.fVRMLFileName);
95 fSceneHandler.
fDest <<
"#VRML V2.0 utf8"
97 fSceneHandler.
fDest <<
"# Generated by VRML 2.0 driver of GEANT4\n"
104#if defined DEBUG_FR_VIEW
106 G4cout <<
"***** G4VRML2FileViewer::ShowView()" <<
G4endl;
113#if defined DEBUG_FR_VIEW
115 G4cout <<
"***** G4VRML2FileViewer::FinishView(): No effects" <<
G4endl;
119void G4VRML2FileViewer::SendViewParameters()
125#if defined DEBUG_FR_VIEW
127 G4cout <<
"***** G4VRML2FileViewer::SendViewParameters()\n";
131 if(fsin_VHA < 1.0e-6)
139 G4double camera_distance = extent_radius / fsin_VHA;
145 G4double E_z = target_point.
z() + camera_distance;
150 fDest <<
"#---------- CAMERA" <<
G4endl;
151 fDest <<
"Viewpoint {" <<
G4endl;
154 fDest << E.x() <<
" ";
155 fDest << E.y() <<
" ";
G4GLOB_DLL 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()