33 #define G4DAWNFILE_STRUCTURE_PRIORITY 1.
65 sceneHandler.IncrementViewCount (),
67 fSceneHandler (sceneHandler)
71 if( std::getenv(
"G4DAWNFILE_VIEWER" ) != NULL ) {
89 if( std::getenv(
"G4DAWNFILE_PS_VIEWER" ) != NULL ) {
90 strcpy(
fPSViewer, std::getenv(
"G4DAWNFILE_PS_VIEWER" ) ) ;
102 #if defined DEBUG_FR_VIEW
104 G4cout <<
"***** G4DAWNFILEViewer::SetView(): No effects" <<
G4endl;
115 #if defined DEBUG_FR_VIEW
117 G4cout <<
"***** G4DAWNFILEViewer::ClearView (): No effects " <<
G4endl;
133 #if defined DEBUG_FR_VIEW
135 G4cout <<
"***** G4DAWNFILEViewer::DrawView () " <<
G4endl;
153 #if defined DEBUG_FR_VIEW
155 G4cout <<
"***** G4DAWNFILEViewer::ShowView () " <<
G4endl;
184 G4cout <<
"ERROR: Failed to generate file ";
216 enum { FR_WIREFRAME_STYLE = 1, FR_WF_STORED_STYLE = 2,
217 FR_HID_STYLE = 3, FR_HID2_STYLE = 4,
218 FR_HID3_STYLE = 5, FR_DRAWING_MODE_END_STYLE = 6 };
223 out << FR_WIREFRAME_STYLE <<
G4endl;
226 out << FR_HID2_STYLE <<
G4endl;
230 out << FR_HID_STYLE <<
G4endl;
233 out << FR_WIREFRAME_STYLE <<
G4endl;
248 #if defined DEBUG_FR_VIEW
250 G4cout <<
"***** G4DAWNFILEViewer::SendViewParameters() ";
257 const G4double MIN_HALF_ANGLE = 0.01 ;
266 if( half_view_angle > MAX_HALF_ANGLE ) {
267 half_view_angle = MAX_HALF_ANGLE ;
270 if( half_view_angle < MIN_HALF_ANGLE ) {
272 camera_distance = radius * HOW_FAR ;
275 camera_distance = radius / std::sin ( half_view_angle );
279 if ( camera_distance < radius ) {
282 G4cout <<
" Camera cannot enter inside objects" <<
G4endl;
284 camera_distance =
radius ;
291 const G4double h_angle = (180.0 /
pi) * camera_direction.phi () ;
296 std::ofstream gui_out (
".DAWN_1.history") ;
301 gui_out << camera_distance <<
G4endl;
302 gui_out << v_angle <<
G4endl ;
303 gui_out << h_angle <<
G4endl ;
304 gui_out <<
"0" <<
G4endl ;
310 gui_out << target_point.
x() <<
G4endl ;
311 gui_out << target_point.
y() <<
G4endl ;
312 gui_out << target_point.
z() <<
G4endl ;
316 if( half_view_angle < MIN_HALF_ANGLE ) {
318 gui_out << zoom_factor <<
G4endl;
321 const G4double FR_HALF_SCREEN_SIZE = 0.5 ;
323 = FR_HALF_SCREEN_SIZE / std::tan( half_view_angle );
324 focal_distance *= zoom_factor ;
326 gui_out <<
"fd" << focal_distance <<
G4endl;
330 gui_out <<
"0.001" <<
G4endl ;
331 gui_out <<
"0" <<
G4endl ;
341 gui_out << 19.0 <<
G4endl;
342 gui_out << 71.0 <<
G4endl;