34 #ifdef G4VIS_BUILD_VRML_DRIVER
49 G4VRML2Viewer::G4VRML2Viewer(G4VRML2SceneHandler& sceneHandler,
const G4String&
name) :
51 sceneHandler.IncrementViewCount(),
53 fSceneHandler(sceneHandler),
54 fDest(sceneHandler.fDest)
60 G4VRML2Viewer::~G4VRML2Viewer()
63 void G4VRML2Viewer::SetView()
65 #if defined DEBUG_FR_VIEW
67 G4cout <<
"***** G4VRML2Viewer::SetView(): No effects" <<
G4endl;
76 void G4VRML2Viewer::DrawView()
78 #if defined DEBUG_FR_VIEW
82 fSceneHandler.VRMLBeginModeling() ;
93 void G4VRML2Viewer::ClearView(
void)
95 #if defined DEBUG_FR_VIEW
97 G4cout <<
"***** G4VRML2Viewer::ClearView(): No effects" <<
G4endl;
101 void G4VRML2Viewer::ShowView(
void)
103 #if defined DEBUG_FR_VIEW
107 fSceneHandler.VRMLEndModeling();
110 void G4VRML2Viewer::FinishView(
void)
112 #if defined DEBUG_FR_VIEW
114 G4cout <<
"***** G4VRML2Viewer::FinishView(): No effects" <<
G4endl;
118 void G4VRML2Viewer::SendViewParameters ()
124 #if defined DEBUG_FR_VIEW
126 G4cout <<
"***** G4VRML2Viewer::SendViewParameters()\n";
129 if ( fsin_VHA < 1.0
e-6 ) {
return ; }
132 G4double extent_radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
133 G4double camera_distance = extent_radius / fsin_VHA ;
137 = fSceneHandler.GetScene()->GetStandardTargetPoint()
138 + fVP.GetCurrentTargetPoint();
139 G4double E_z = target_point.
z() + camera_distance;
144 fDest <<
"#---------- CAMERA" <<
"\n";
145 fDest <<
"Viewpoint {" <<
"\n";
146 fDest <<
"\t" <<
"position " ;
147 fDest <<
E.x() <<
" " ;
148 fDest <<
E.y() <<
" " ;
149 fDest <<
E.z() <<
"\n" ;
150 fDest <<
"}" <<
"\n";