Import Geant4 1.1.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: FRClient.cc,v 1.2.8.1 1999/12/07 20:53:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: FRClient.cc,v 1.3 1999/12/15 14:54:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// FRClient.cc
|
||||
// FukuiRenderer Client
|
||||
@@ -73,7 +73,7 @@ int FRClient::connect(const char *hostname, int port_)
|
||||
}
|
||||
hp = gethostbyname(hostname) ;
|
||||
if ( !hp ) {
|
||||
G4cerr << "ERROR: gethostbyname() failed" << endl;
|
||||
G4cerr << "ERROR: gethostbyname() failed" << G4endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRClient.cc,v 1.2.8.1 1999/12/07 20:53:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4FRClient.cc,v 1.4 1999/12/27 07:49:22 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4FRClient.cc
|
||||
// Yasuhide Sawada & Satoshi Tanaka
|
||||
@@ -86,10 +86,11 @@ G4FRClient& G4FRClient::operator << (G4FRClient& (*func)(G4FRClient&))
|
||||
return func(*this);
|
||||
}
|
||||
|
||||
//manipulator
|
||||
G4FRClient& endl(G4FRClient& c)
|
||||
{
|
||||
return c << "\n";
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
////manipulator
|
||||
//G4FRClient& endl(G4FRClient& c)
|
||||
//{
|
||||
// return c << "\n";
|
||||
//}
|
||||
///////////////////////////////////////
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1.cc,v 1.3.8.1 1999/12/07 20:53:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML1.cc,v 1.4 1999/12/15 14:54:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML1.cc
|
||||
// Yasuhide Sawada & Satoshi Tanaka
|
||||
@@ -58,7 +58,7 @@ G4VSceneHandler* G4VRML1::CreateSceneHandler(const G4String& name)
|
||||
p = new G4VRML1SceneHandler(*this, name);
|
||||
|
||||
G4cout << G4VRML1SceneHandler::GetSceneCount()
|
||||
<< " " << fName << " scenes extanct." << endl;
|
||||
<< " " << fName << " scenes extanct." << G4endl;
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1File.cc,v 1.3.8.1 1999/12/07 20:53:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML1File.cc,v 1.4 1999/12/15 14:54:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML1File.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -45,7 +45,7 @@ G4VSceneHandler* G4VRML1File::CreateSceneHandler(const G4String& name)
|
||||
p = new G4VRML1FileSceneHandler(*this, name);
|
||||
|
||||
G4cout << G4VRML1FileSceneHandler::GetSceneCount()
|
||||
<< " " << fName << " scenes extanct." << endl;
|
||||
<< " " << fName << " scenes extanct." << G4endl;
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1FileSceneHandler.cc,v 1.1.8.1 1999/12/07 20:53:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML1FileSceneHandler.cc,v 1.2 1999/12/15 14:54:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML1FileSceneHandler.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
//#define DEBUG_FR_SCENE
|
||||
|
||||
#include <fstream.h>
|
||||
#include "g4std/fstream"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -86,7 +86,7 @@ G4VRML1FileSceneHandler::G4VRML1FileSceneHandler(G4VRML1File& system, const G4St
|
||||
G4VRML1FileSceneHandler::~G4VRML1FileSceneHandler()
|
||||
{
|
||||
#if defined DEBUG_FR_SCENE
|
||||
G4cerr << "***** ~G4VRML1FileSceneHandler" << endl;
|
||||
G4cerr << "***** ~G4VRML1FileSceneHandler" << G4endl;
|
||||
#endif
|
||||
fSceneCount--;
|
||||
}
|
||||
@@ -115,13 +115,13 @@ void G4VRML1FileSceneHandler::connectPort()
|
||||
|
||||
// Message
|
||||
if( fMaxFileNum > 1 && i == MAX_FILE_INDEX ) {
|
||||
G4cerr << "===========================================" << endl;
|
||||
G4cerr << "WARNING MESSAGE from VRML1FILE driver: " << endl;
|
||||
G4cerr << " This file name is the final one in the " << endl;
|
||||
G4cerr << " automatic updation of the output file name." << endl;
|
||||
G4cerr << " You may overwrite an existing file of " << endl;
|
||||
G4cerr << " the same name. " << endl;
|
||||
G4cerr << "===========================================" << endl;
|
||||
G4cerr << "===========================================" << G4endl;
|
||||
G4cerr << "WARNING MESSAGE from VRML1FILE driver: " << G4endl;
|
||||
G4cerr << " This file name is the final one in the " << G4endl;
|
||||
G4cerr << " automatic updation of the output file name." << G4endl;
|
||||
G4cerr << " You may overwrite an existing file of " << G4endl;
|
||||
G4cerr << " the same name. " << G4endl;
|
||||
G4cerr << "===========================================" << G4endl;
|
||||
}
|
||||
|
||||
// re-determine file to G4VRMLFILE_DEST_DIR/g4_i.wrl for i>0
|
||||
@@ -130,7 +130,7 @@ void G4VRML1FileSceneHandler::connectPort()
|
||||
}
|
||||
|
||||
// check validity of the file name
|
||||
ifstream fin ;
|
||||
G4std::ifstream fin ;
|
||||
fin.open(fVRMLFileName) ;
|
||||
if(!fin) {
|
||||
// new file
|
||||
@@ -144,11 +144,11 @@ void G4VRML1FileSceneHandler::connectPort()
|
||||
} // for
|
||||
|
||||
// open a VRML 1.0 file with determined file name
|
||||
G4cerr << "===========================================" << endl;
|
||||
G4cerr << "Output VRML 1.0 file: " << fVRMLFileName << endl;
|
||||
G4cerr << "Muximal number of file in the destination directory: " << fMaxFileNum << endl;
|
||||
G4cerr << " (Customizable as: setenv G4VRMLFILE_MAX_FILE_NUM number) " << endl;
|
||||
G4cerr << "===========================================" << endl;
|
||||
G4cerr << "===========================================" << G4endl;
|
||||
G4cerr << "Output VRML 1.0 file: " << fVRMLFileName << G4endl;
|
||||
G4cerr << "Muximal number of file in the destination directory: " << fMaxFileNum << G4endl;
|
||||
G4cerr << " (Customizable as: setenv G4VRMLFILE_MAX_FILE_NUM number) " << G4endl;
|
||||
G4cerr << "===========================================" << G4endl;
|
||||
|
||||
fDest.open(fVRMLFileName) ; fFlagDestOpen = true ;
|
||||
}
|
||||
@@ -165,18 +165,18 @@ void G4VRML1FileSceneHandler::closePort()
|
||||
|
||||
// close VRML file
|
||||
fDest.close(); fFlagDestOpen = false ;
|
||||
G4cerr << "*** VRML 1.0 File " << fVRMLFileName << " is generated." << endl;
|
||||
G4cerr << "*** VRML 1.0 File " << fVRMLFileName << " is generated." << G4endl;
|
||||
|
||||
|
||||
// Invoke viewer
|
||||
|
||||
if ( !strcmp(viewer, NO_VRML_VIEWER )) {
|
||||
G4cerr << "MESSAGE from VRML1FILE driver:" << endl;
|
||||
G4cerr << "MESSAGE from VRML1FILE driver:" << G4endl;
|
||||
G4cerr << " Set an environmental variable " ;
|
||||
G4cerr << ENV_VRML_VIEWER << endl;
|
||||
G4cerr << " if you want to visualize the generated VRML file" << endl;
|
||||
G4cerr << " automatically. For example, " << endl;
|
||||
G4cerr << " setenv " << ENV_VRML_VIEWER << " vrweb " << endl;
|
||||
G4cerr << ENV_VRML_VIEWER << G4endl;
|
||||
G4cerr << " if you want to visualize the generated VRML file" << G4endl;
|
||||
G4cerr << " automatically. For example, " << G4endl;
|
||||
G4cerr << " setenv " << ENV_VRML_VIEWER << " vrweb " << G4endl;
|
||||
} else {
|
||||
sprintf( command, "%s %s", viewer, fVRMLFileName );
|
||||
system( command );
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1FileViewer.cc,v 1.3.4.1 1999/12/07 20:53:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML1FileViewer.cc,v 1.4 1999/12/15 14:54:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRMLView.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -35,14 +35,14 @@ G4VRML1FileViewer::~G4VRML1FileViewer()
|
||||
void G4VRML1FileViewer::SetView()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML1FileViewer::SetView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML1FileViewer::SetView(): No effects" << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4VRML1FileViewer::DrawView()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML1FileViewer::DrawView()" << endl;
|
||||
G4cerr << "***** G4VRML1FileViewer::DrawView()" << G4endl;
|
||||
#endif
|
||||
|
||||
fSceneHandler.VRMLBeginModeling();
|
||||
@@ -56,14 +56,14 @@ void G4VRML1FileViewer::DrawView()
|
||||
void G4VRML1FileViewer::ClearView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML1File1View::ClearView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML1File1View::ClearView(): No effects" << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4VRML1FileViewer::ShowView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML1FileViewer::ShowView()" << endl;
|
||||
G4cerr << "***** G4VRML1FileViewer::ShowView()" << G4endl;
|
||||
#endif
|
||||
fSceneHandler.VRMLEndModeling();
|
||||
}
|
||||
@@ -71,7 +71,7 @@ void G4VRML1FileViewer::ShowView(void)
|
||||
void G4VRML1FileViewer::FinishView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML1FileViewer::FinishView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML1FileViewer::FinishView(): No effects" << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1SceneHandler.cc,v 1.1.8.1 1999/12/07 20:53:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML1SceneHandler.cc,v 1.2 1999/12/15 14:54:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML1SceneHandler.cc
|
||||
// Yasuhide Sawada and Satoshi Tanaka
|
||||
@@ -19,7 +19,7 @@
|
||||
//#define DEBUG_FR_SCENE
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fstream.h>
|
||||
#include "g4std/fstream"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
@@ -56,7 +56,7 @@ G4VRML1SceneHandler::G4VRML1SceneHandler(G4VRML1& system, const G4String& name)
|
||||
G4VRML1SceneHandler::~G4VRML1SceneHandler()
|
||||
{
|
||||
#if defined DEBUG_FR_SCENE
|
||||
G4cerr << "***** ~G4VRML1SceneHandler" << endl;
|
||||
G4cerr << "***** ~G4VRML1SceneHandler" << G4endl;
|
||||
#endif
|
||||
fSceneCount--;
|
||||
}
|
||||
@@ -79,12 +79,12 @@ void G4VRML1SceneHandler::connectPort(G4int max_trial)
|
||||
// INET domain connection is established
|
||||
G4cerr << "*** GEANT4 is connected to port ";
|
||||
G4cerr << fDest.getPort();
|
||||
G4cerr << " of server " << fSystem.getHostName() << endl;
|
||||
G4cerr << " of server " << fSystem.getHostName() << G4endl;
|
||||
break;
|
||||
} else {
|
||||
// Connection failed. Try the next port.
|
||||
G4cerr << "*** GEANT4 incremented targeting port to ";
|
||||
G4cerr << port << endl;
|
||||
G4cerr << port << G4endl;
|
||||
}
|
||||
|
||||
sleep (1);
|
||||
@@ -92,17 +92,17 @@ void G4VRML1SceneHandler::connectPort(G4int max_trial)
|
||||
} // for
|
||||
|
||||
if (!fDest.isConnected()) {
|
||||
G4cerr << "*** INET Connection failed. " << endl;
|
||||
G4cerr << " Maybe, you have not invoked viewer g4vrmlview yet, " << endl;
|
||||
G4cerr << " or too many viewers are already running in the " << endl;
|
||||
G4cerr << " server host(" << fSystem.getHostName() << "). " << endl;
|
||||
G4cerr << "*** INET Connection failed. " << G4endl;
|
||||
G4cerr << " Maybe, you have not invoked viewer g4vrmlview yet, " << G4endl;
|
||||
G4cerr << " or too many viewers are already running in the " << G4endl;
|
||||
G4cerr << " server host(" << fSystem.getHostName() << "). " << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4VRML1SceneHandler::closePort()
|
||||
{
|
||||
fDest.close();
|
||||
G4cerr << "*** INET Connection closed. " << endl;
|
||||
G4cerr << "*** INET Connection closed. " << G4endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1SceneHandlerFunc.icc,v 1.3.4.1 1999/12/07 20:53:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML1SceneHandlerFunc.icc,v 1.5 1999/12/27 07:49:22 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML1SceneHandlerFunc.icc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -24,7 +24,7 @@
|
||||
void G4VRML1SCENE::AddThis(const G4Trd& trd)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis trd" << endl ;
|
||||
G4cerr << "***** AddThis trd" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
ADDTHIS_WITH_NAME(trd)
|
||||
@@ -33,7 +33,7 @@ void G4VRML1SCENE::AddThis(const G4Trd& trd)
|
||||
void G4VRML1SCENE::AddThis(const G4Trap& trap)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis trap" << endl ;
|
||||
G4cerr << "***** AddThis trap" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
ADDTHIS_WITH_NAME(trap)
|
||||
@@ -42,7 +42,7 @@ void G4VRML1SCENE::AddThis(const G4Trap& trap)
|
||||
void G4VRML1SCENE::AddThis(const G4Para& para)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis para" << endl ;
|
||||
G4cerr << "***** AddThis para" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
ADDTHIS_WITH_NAME(para)
|
||||
@@ -51,7 +51,7 @@ void G4VRML1SCENE::AddThis(const G4Para& para)
|
||||
void G4VRML1SCENE::AddThis(const G4Torus& torus )
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis torus" << endl ;
|
||||
G4cerr << "***** AddThis torus" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
ADDTHIS_WITH_NAME(torus)
|
||||
@@ -61,7 +61,7 @@ void G4VRML1SCENE::AddThis(const G4Torus& torus )
|
||||
void G4VRML1SCENE::AddThis(const G4VSolid& vsolid)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis vsolid" << endl ;
|
||||
G4cerr << "***** AddThis vsolid" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
ADDTHIS_WITH_NAME(vsolid)
|
||||
@@ -70,7 +70,7 @@ void G4VRML1SCENE::AddThis(const G4VSolid& vsolid)
|
||||
void G4VRML1SCENE::AddThis(const G4Tubs& tubs)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis tubs" << endl ;
|
||||
G4cerr << "***** AddThis tubs" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
@@ -86,14 +86,14 @@ void G4VRML1SCENE::AddThis(const G4Tubs& tubs)
|
||||
// Send data
|
||||
if ( r == 0.0 && dp >= 360. * deg ) {
|
||||
// Send a built-in VRML node (Cylinder)
|
||||
fDest << "Separator {" << endl;
|
||||
fDest << "Separator {" << "\n";
|
||||
SendMatrixTransformNode( fpObjectTransformation );
|
||||
|
||||
fDest << "\t" << "DEF " << fCurrentDEF << " Separator {" << endl;
|
||||
fDest << "\t" << "DEF " << fCurrentDEF << " Separator {" << "\n";
|
||||
SendMaterialNode();
|
||||
SendCylinderNode(R, dz * 2);
|
||||
fDest << "\t" << "}" << endl; // DEF Separator
|
||||
fDest << "}" << endl; // Separator
|
||||
fDest << "\t" << "}" << "\n"; // DEF Separator
|
||||
fDest << "}" << "\n"; // Separator
|
||||
} else {
|
||||
// call AddPrimitive(Polyhedron)
|
||||
RequestPrimitives(tubs);
|
||||
@@ -107,7 +107,7 @@ void G4VRML1SCENE::AddThis(const G4Tubs& tubs)
|
||||
void G4VRML1SCENE::AddThis(const G4Cons& cons)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis cons" << endl ;
|
||||
G4cerr << "***** AddThis cons" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
@@ -126,14 +126,14 @@ void G4VRML1SCENE::AddThis(const G4Cons& cons)
|
||||
// Send data
|
||||
if ( r1 == 0.0 && r2 == 0.0 && R1 == R2 && dp >= 360. * deg) {
|
||||
// Send a built-in VRML node (Cylinder)
|
||||
fDest << "Separator {" << endl;
|
||||
fDest << "Separator {" << "\n";
|
||||
SendMatrixTransformNode( fpObjectTransformation );
|
||||
|
||||
fDest << "\t" << "DEF " << fCurrentDEF << " Separator {" << endl;
|
||||
fDest << "\t" << "DEF " << fCurrentDEF << " Separator {" << "\n";
|
||||
SendMaterialNode();
|
||||
SendCylinderNode(R1, dz * 2);
|
||||
fDest << "\t" << "}" << endl; // DEF Separator
|
||||
fDest << "}" << endl; // Separator
|
||||
fDest << "\t" << "}" << "\n"; // DEF Separator
|
||||
fDest << "}" << "\n"; // Separator
|
||||
} else {
|
||||
// call AddPrimitive(Polyhedron)
|
||||
RequestPrimitives(cons);
|
||||
@@ -146,7 +146,7 @@ void G4VRML1SCENE::AddThis(const G4Cons& cons)
|
||||
void G4VRML1SCENE::AddThis(const G4Box& box)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis box" << endl ;
|
||||
G4cerr << "***** AddThis box" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
@@ -154,17 +154,17 @@ void G4VRML1SCENE::AddThis(const G4Box& box)
|
||||
fCurrentDEF = "box_" + box.GetName();
|
||||
|
||||
// Send a built-in VRML node (Cube)
|
||||
fDest << "Separator {" << endl;
|
||||
fDest << "Separator {" << "\n";
|
||||
|
||||
//fDest << "\t" << "renderCulling ON" << endl;
|
||||
//fDest << "\t" << "renderCulling ON" << "\n";
|
||||
SendMatrixTransformNode( fpObjectTransformation );
|
||||
|
||||
fDest << "\t" << "DEF " << fCurrentDEF << " Separator {" << endl;
|
||||
fDest << "\t" << "DEF " << fCurrentDEF << " Separator {" << "\n";
|
||||
SendMaterialNode();
|
||||
SendCubeNode(box.GetXHalfLength() * 2, box.GetYHalfLength() * 2, box.GetZHalfLength() * 2);
|
||||
fDest << "\t" << "}" << endl; // DEF Separator
|
||||
fDest << "\t" << "}" << "\n"; // DEF Separator
|
||||
|
||||
fDest << "}" << endl; // Separator
|
||||
fDest << "}" << "\n"; // Separator
|
||||
|
||||
// reset current name to null
|
||||
fCurrentDEF = "";
|
||||
@@ -174,7 +174,7 @@ void G4VRML1SCENE::AddThis(const G4Box& box)
|
||||
void G4VRML1SCENE::AddThis(const G4Sphere& sphere)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis sphere" << endl ;
|
||||
G4cerr << "***** AddThis sphere" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
@@ -190,14 +190,14 @@ void G4VRML1SCENE::AddThis(const G4Sphere& sphere)
|
||||
// Send data
|
||||
if ( (dphi >= 360. * deg) && (dtheta >= 180. * deg) && (rmin == 0.0) ) {
|
||||
// Send a built-in VRML node (Sphere)
|
||||
fDest << "Separator {" << endl;
|
||||
fDest << "Separator {" << "\n";
|
||||
SendMatrixTransformNode( fpObjectTransformation );
|
||||
|
||||
fDest << "\t" << "DEF " << fCurrentDEF << " Separator {" << endl;
|
||||
fDest << "\t" << "DEF " << fCurrentDEF << " Separator {" << "\n";
|
||||
SendMaterialNode();
|
||||
SendSphereNode( rmax );
|
||||
fDest << "\t" << "}" << endl; // DEF Separator
|
||||
fDest << "}" << endl; // Separator
|
||||
fDest << "\t" << "}" << "\n"; // DEF Separator
|
||||
fDest << "}" << "\n"; // Separator
|
||||
} else {
|
||||
// call AddPrimitive(Polyhedron)
|
||||
RequestPrimitives( sphere );
|
||||
@@ -210,50 +210,50 @@ void G4VRML1SCENE::AddThis(const G4Sphere& sphere)
|
||||
void G4VRML1SCENE::AddPrimitive(const G4Polyline& polyline)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddPrimitive polyline" << endl ;
|
||||
G4cerr << "***** AddPrimitive polyline" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
fDest << "Separator {" << endl;
|
||||
fDest << "Separator {" << "\n";
|
||||
|
||||
SendMatrixTransformNode (fpObjectTransformation );
|
||||
|
||||
SendMaterialNode( polyline.GetVisAttributes() );
|
||||
|
||||
fDest << "\t" << "Coordinate3 {" << endl;
|
||||
fDest << "\t\t" << "point [" << endl;
|
||||
fDest << "\t" << "Coordinate3 {" << "\n";
|
||||
fDest << "\t\t" << "point [" << "\n";
|
||||
G4int e, i;
|
||||
for (i = 0, e = polyline.entries(); e; i++, e--) {
|
||||
fDest << "\t\t\t";
|
||||
fDest << polyline(i).x() << " ";
|
||||
fDest << polyline(i).y() << " ";
|
||||
fDest << polyline(i).z() << "," << endl;
|
||||
fDest << polyline(i).z() << "," << "\n";
|
||||
}
|
||||
fDest << "\t\t" << "]" << endl;
|
||||
fDest << "\t" << "}" << endl; // Coordinate3
|
||||
fDest << "\t\t" << "]" << "\n";
|
||||
fDest << "\t" << "}" << "\n"; // Coordinate3
|
||||
|
||||
fDest << "\t" << "IndexedLineSet {" << endl;
|
||||
fDest << "\t" << "IndexedLineSet {" << "\n";
|
||||
fDest << "\t\t" << "coordIndex [";
|
||||
for (i = 0, e = polyline.entries(); e; i++, e--) {
|
||||
if (i % 10 == 0)
|
||||
fDest << endl << "\t\t\t";
|
||||
fDest << "\n" << "\t\t\t";
|
||||
fDest << i << ", ";
|
||||
}
|
||||
fDest << "-1" << endl;
|
||||
fDest << "\t\t" << "]" << endl;
|
||||
fDest << "\t" << "}" << endl; // IndexedLineSet
|
||||
fDest << "-1" << "\n";
|
||||
fDest << "\t\t" << "]" << "\n";
|
||||
fDest << "\t" << "}" << "\n"; // IndexedLineSet
|
||||
|
||||
fDest << "}" << endl; // Separator
|
||||
fDest << "}" << "\n"; // Separator
|
||||
}
|
||||
|
||||
void G4VRML1SCENE::AddPrimitive(const G4Polyhedron& polyhedron)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddPrimitive(G4Polyhedron)" << endl;
|
||||
G4cerr << "***** AddPrimitive(G4Polyhedron)" << "\n";
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
fDest << "Separator {" << endl;
|
||||
fDest << "Separator {" << "\n";
|
||||
|
||||
SendMatrixTransformNode( fpObjectTransformation );
|
||||
|
||||
@@ -261,33 +261,33 @@ void G4VRML1SCENE::AddPrimitive(const G4Polyhedron& polyhedron)
|
||||
if (fCurrentDEF != "")
|
||||
fDest << "DEF " << fCurrentDEF << " ";
|
||||
|
||||
fDest << "Separator {" << endl;
|
||||
fDest << "Separator {" << "\n";
|
||||
|
||||
//fDest << "\t\t" << "renderCulling ON" << endl;
|
||||
//fDest << "\t\t" << "renderCulling ON" << "\n";
|
||||
|
||||
fDest << "\t\t" << "ShapeHints {" << endl;
|
||||
fDest << "\t\t\t" << "vertexOrdering COUNTERCLOCKWISE" << endl;
|
||||
fDest << "\t\t\t" << "shapeType SOLID" << endl;
|
||||
fDest << "\t\t\t" << "faceType CONVEX" << endl;
|
||||
fDest << "\t\t" << "}" << endl;
|
||||
fDest << "\t\t" << "ShapeHints {" << "\n";
|
||||
fDest << "\t\t\t" << "vertexOrdering COUNTERCLOCKWISE" << "\n";
|
||||
fDest << "\t\t\t" << "shapeType SOLID" << "\n";
|
||||
fDest << "\t\t\t" << "faceType CONVEX" << "\n";
|
||||
fDest << "\t\t" << "}" << "\n";
|
||||
|
||||
SendMaterialNode();
|
||||
|
||||
fDest << "\t\t" << "Coordinate3 {" << endl;
|
||||
fDest << "\t\t\t" << "point [" << endl;
|
||||
fDest << "\t\t" << "Coordinate3 {" << "\n";
|
||||
fDest << "\t\t\t" << "point [" << "\n";
|
||||
G4int i, j;
|
||||
for (i = 1, j = polyhedron.GetNoVertices(); j; j--, i++) {
|
||||
G4Point3D point = polyhedron.GetVertex(i);
|
||||
fDest << "\t\t\t\t";
|
||||
fDest << point.x() << " ";
|
||||
fDest << point.y() << " ";
|
||||
fDest << point.z() << "," << endl;
|
||||
fDest << point.z() << "," << "\n";
|
||||
}
|
||||
fDest << "\t\t\t" << "]" << endl;
|
||||
fDest << "\t\t" << "}" << endl; // Coordinate3
|
||||
fDest << "\t\t\t" << "]" << "\n";
|
||||
fDest << "\t\t" << "}" << "\n"; // Coordinate3
|
||||
|
||||
fDest << "\t\t" << "IndexedFaceSet {" << endl;
|
||||
fDest << "\t\t\t" << "coordIndex [" << endl;
|
||||
fDest << "\t\t" << "IndexedFaceSet {" << "\n";
|
||||
fDest << "\t\t\t" << "coordIndex [" << "\n";
|
||||
|
||||
// facet loop
|
||||
G4int f;
|
||||
@@ -301,13 +301,13 @@ void G4VRML1SCENE::AddPrimitive(const G4Polyhedron& polyhedron)
|
||||
notLastEdge = polyhedron.GetNextVertexIndex(index, edgeFlag);
|
||||
fDest << index - 1 << ", ";
|
||||
} while (notLastEdge);
|
||||
fDest << "-1," << endl;
|
||||
fDest << "-1," << "\n";
|
||||
}
|
||||
fDest << "\t\t\t" << "]" << endl;
|
||||
fDest << "\t\t" << "}" << endl; // IndexFaceSet
|
||||
fDest << "\t\t\t" << "]" << "\n";
|
||||
fDest << "\t\t" << "}" << "\n"; // IndexFaceSet
|
||||
|
||||
fDest << "\t" << "}" << endl; // (DEF) Separator
|
||||
fDest << "}" << endl; // Separator
|
||||
fDest << "\t" << "}" << "\n"; // (DEF) Separator
|
||||
fDest << "}" << "\n"; // Separator
|
||||
|
||||
}
|
||||
|
||||
@@ -315,9 +315,9 @@ void G4VRML1SCENE::AddPrimitive(const G4Polyhedron& polyhedron)
|
||||
void G4VRML1SCENE::AddPrimitive(const G4NURBS& nurb)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddPrimitive nurbs" << endl ;
|
||||
G4cerr << "***** AddPrimitive nurbs" << "\n" ;
|
||||
#endif
|
||||
G4cerr << "G4VRML1File::AddPrimitive(G4NURBS&): not implemented. " << endl ;
|
||||
G4cerr << "G4VRML1File::AddPrimitive(G4NURBS&): not implemented. " << "\n" ;
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
}
|
||||
@@ -325,12 +325,12 @@ void G4VRML1SCENE::AddPrimitive(const G4NURBS& nurb)
|
||||
void G4VRML1SCENE::AddPrimitive( const G4Text& text )
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddPrimitive text" << endl ;
|
||||
G4cerr << "***** AddPrimitive text" << "\n" ;
|
||||
#endif
|
||||
G4cerr <<
|
||||
"***** void G4VRML1SCENE::AddPrimitive( const G4Text& text )"
|
||||
" not implemented yet."
|
||||
<< endl;
|
||||
<< "\n";
|
||||
|
||||
VRMLBeginModeling () ;
|
||||
}
|
||||
@@ -338,13 +338,13 @@ void G4VRML1SCENE::AddPrimitive( const G4Text& text )
|
||||
void G4VRML1SCENE::AddPrimitive( const G4Circle& circle )
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddPrimitive circle" << endl ;
|
||||
G4cerr << "***** AddPrimitive circle" << "\n" ;
|
||||
#endif
|
||||
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
// begin sending a mark
|
||||
fDest << "Separator {" << endl;
|
||||
fDest << "Separator {" << "\n";
|
||||
|
||||
// send color
|
||||
SendMarkerColor ( circle ) ;
|
||||
@@ -356,25 +356,25 @@ void G4VRML1SCENE::AddPrimitive( const G4Circle& circle )
|
||||
G4double size = GetMarkerHalfSize ( circle );
|
||||
|
||||
// send shape with size
|
||||
fDest << "\t" << "Sphere {" << endl;
|
||||
fDest << "\t\t" << "radius " << size << endl;
|
||||
fDest << "\t" << "}" << endl;
|
||||
fDest << "\t" << "Sphere {" << "\n";
|
||||
fDest << "\t\t" << "radius " << size << "\n";
|
||||
fDest << "\t" << "}" << "\n";
|
||||
|
||||
// end sending a mark
|
||||
fDest << "}" << endl; // Separator
|
||||
fDest << "}" << "\n"; // Separator
|
||||
}
|
||||
|
||||
|
||||
void G4VRML1SCENE::AddPrimitive(const G4Square& square)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddPrimitive square" << endl ;
|
||||
G4cerr << "***** AddPrimitive square" << "\n" ;
|
||||
#endif
|
||||
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
// begin sending a mark
|
||||
fDest << "Separator {" << endl;
|
||||
fDest << "Separator {" << "\n";
|
||||
|
||||
// send color
|
||||
SendMarkerColor ( square );
|
||||
@@ -387,27 +387,27 @@ void G4VRML1SCENE::AddPrimitive(const G4Square& square)
|
||||
size *= 2.;
|
||||
|
||||
// send shape with size
|
||||
fDest << "\t" << "Cube {" << endl;
|
||||
fDest << "\t\t" << "width " << size << endl;
|
||||
fDest << "\t\t" << "height " << size << endl;
|
||||
fDest << "\t\t" << "depth " << size << endl;
|
||||
fDest << "\t" << "}" << endl;
|
||||
fDest << "\t" << "Cube {" << "\n";
|
||||
fDest << "\t\t" << "width " << size << "\n";
|
||||
fDest << "\t\t" << "height " << size << "\n";
|
||||
fDest << "\t\t" << "depth " << size << "\n";
|
||||
fDest << "\t" << "}" << "\n";
|
||||
|
||||
// end sending a mark
|
||||
fDest << "}" << endl; // Separator
|
||||
fDest << "}" << "\n"; // Separator
|
||||
}
|
||||
|
||||
void G4VRML1SCENE::ClearStore()
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** ClearStore(): No effects" << endl ;
|
||||
G4cerr << "***** ClearStore(): No effects" << "\n" ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4VRML1SCENE::BeginModeling()
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** BeginModeling " << endl ;
|
||||
G4cerr << "***** BeginModeling " << "\n" ;
|
||||
#endif
|
||||
G4VSceneHandler::BeginModeling();
|
||||
}
|
||||
@@ -415,7 +415,7 @@ void G4VRML1SCENE::BeginModeling()
|
||||
void G4VRML1SCENE::EndModeling()
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** EndModeling " << endl ;
|
||||
G4cerr << "***** EndModeling " << "\n" ;
|
||||
#endif
|
||||
G4VSceneHandler::EndModeling();
|
||||
}
|
||||
@@ -425,7 +425,7 @@ void G4VRML1SCENE::BeginPrimitives(const G4Transform3D& objectTransformation)
|
||||
G4VSceneHandler::BeginPrimitives (objectTransformation);
|
||||
fpObjectTransformation = &objectTransformation;
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** BeginPrimitives " << endl ;
|
||||
G4cerr << "***** BeginPrimitives " << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling();
|
||||
}
|
||||
@@ -433,7 +433,7 @@ void G4VRML1SCENE::BeginPrimitives(const G4Transform3D& objectTransformation)
|
||||
void G4VRML1SCENE::EndPrimitives()
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** EndPrimitives " << endl ;
|
||||
G4cerr << "***** EndPrimitives " << "\n" ;
|
||||
#endif
|
||||
G4VSceneHandler::EndPrimitives();
|
||||
}
|
||||
@@ -448,19 +448,19 @@ void G4VRML1SCENE::SendMaterialNode( const G4VisAttributes* pVA )
|
||||
|
||||
const G4Color& color = pVA->GetColor();
|
||||
|
||||
fDest << "\t\t" << "Material {" << endl;
|
||||
fDest << "\t\t" << "Material {" << "\n";
|
||||
|
||||
if (pVA->IsForceDrawingStyle() &&
|
||||
(pVA->GetForcedDrawingStyle() == G4VisAttributes::wireframe)) {
|
||||
fDest << "\t\t\t" << "transparency " << TRANSPARENCY << endl;
|
||||
fDest << "\t\t\t" << "transparency " << TRANSPARENCY << "\n";
|
||||
}
|
||||
|
||||
fDest << "\t\t\t" << "diffuseColor";
|
||||
fDest << " " << color.GetRed();
|
||||
fDest << " " << color.GetGreen();
|
||||
fDest << " " << color.GetBlue();
|
||||
fDest << endl;
|
||||
fDest << "\t\t" << "}" << endl;
|
||||
fDest << "\n";
|
||||
fDest << "\t\t" << "}" << "\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -498,52 +498,52 @@ void G4VRML1SCENE::SendMatrixTransformNode(const G4Transform3D *trans)
|
||||
e2 = e2.unit(); //
|
||||
e3 = e3.unit(); //
|
||||
|
||||
fDest << "\t" << "MatrixTransform {" << endl;
|
||||
fDest << "\t" << "MatrixTransform {" << "\n";
|
||||
fDest << "\t\t" << "matrix ";
|
||||
fDest << e1.x() << " " << e1.y() << " " << e1.z() << " 0 ";
|
||||
fDest << e2.x() << " " << e2.y() << " " << e2.z() << " 0 ";
|
||||
fDest << e3.x() << " " << e3.y() << " " << e3.z() << " 0 ";
|
||||
fDest << B.x() << " " << B.y() << " " << B.z() << " 1" << endl;
|
||||
fDest << "\t" << "}" << endl;
|
||||
fDest << B.x() << " " << B.y() << " " << B.z() << " 1" << "\n";
|
||||
fDest << "\t" << "}" << "\n";
|
||||
}
|
||||
|
||||
void G4VRML1SCENE::SendCubeNode(G4double w, G4double h, G4double d)
|
||||
{
|
||||
fDest << "\t\t" << "Cube {" << endl;
|
||||
fDest << "\t\t\t" << "width " << w << endl;
|
||||
fDest << "\t\t\t" << "height " << h << endl;
|
||||
fDest << "\t\t\t" << "depth " << d << endl;
|
||||
fDest << "\t\t" << "}" << endl;
|
||||
fDest << "\t\t" << "Cube {" << "\n";
|
||||
fDest << "\t\t\t" << "width " << w << "\n";
|
||||
fDest << "\t\t\t" << "height " << h << "\n";
|
||||
fDest << "\t\t\t" << "depth " << d << "\n";
|
||||
fDest << "\t\t" << "}" << "\n";
|
||||
}
|
||||
|
||||
void G4VRML1SCENE::SendCylinderNode(G4double R, G4double h)
|
||||
{
|
||||
fDest << "\t\t" << "Transform {" << endl;
|
||||
fDest << "\t\t\t" << "rotation 1 0 0 " << (90. * deg) << endl;
|
||||
fDest << "\t\t" << "}" << endl;
|
||||
fDest << "\t\t" << "Transform {" << "\n";
|
||||
fDest << "\t\t\t" << "rotation 1 0 0 " << (90. * deg) << "\n";
|
||||
fDest << "\t\t" << "}" << "\n";
|
||||
|
||||
fDest << "\t\t" << "Cylinder {" << endl;
|
||||
fDest << "\t\t\t" << "radius " << R << endl;
|
||||
fDest << "\t\t\t" << "height " << h << endl;
|
||||
fDest << "\t\t" << "}" << endl;
|
||||
fDest << "\t\t" << "Cylinder {" << "\n";
|
||||
fDest << "\t\t\t" << "radius " << R << "\n";
|
||||
fDest << "\t\t\t" << "height " << h << "\n";
|
||||
fDest << "\t\t" << "}" << "\n";
|
||||
}
|
||||
|
||||
void G4VRML1SCENE::SendSphereNode(G4double R)
|
||||
{
|
||||
fDest << "\t\t" << "Sphere {" << endl;
|
||||
fDest << "\t\t\t" << "radius " << R << endl;
|
||||
fDest << "\t\t" << "}" << endl;
|
||||
fDest << "\t\t" << "Sphere {" << "\n";
|
||||
fDest << "\t\t\t" << "radius " << R << "\n";
|
||||
fDest << "\t\t" << "}" << "\n";
|
||||
}
|
||||
|
||||
void G4VRML1SCENE::VRMLBeginModeling()
|
||||
{
|
||||
if (!IS_CONNECTED ) {
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** VRMLBeginModeling() (started)" << endl ;
|
||||
G4cerr << "***** VRMLBeginModeling() (started)" << "\n" ;
|
||||
#endif
|
||||
this->connectPort();
|
||||
fDest << "#VRML V1.0 ascii" << endl;
|
||||
fDest << "# Generated by VRML 1.0 driver of GEANT4\n" << endl;
|
||||
fDest << "#VRML V1.0 ascii" << "\n";
|
||||
fDest << "# Generated by VRML 1.0 driver of GEANT4\n" << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -551,10 +551,10 @@ void G4VRML1SCENE::VRMLEndModeling()
|
||||
{
|
||||
if ( IS_CONNECTED ) {
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** VRMLEndModeling() (started)" << endl ;
|
||||
G4cerr << "***** VRMLEndModeling() (started)" << "\n" ;
|
||||
#endif
|
||||
|
||||
fDest << "#End of file." << endl;
|
||||
fDest << "#End of file." << "\n";
|
||||
this->closePort();
|
||||
}
|
||||
}
|
||||
@@ -563,7 +563,7 @@ void G4VRML1SCENE::SendMarkerColor ( const G4VMarker& mark )
|
||||
{
|
||||
const G4Color& color = GetColor( mark );
|
||||
|
||||
fDest << "\t" << "Material {" << endl;
|
||||
fDest << "\t" << "Material {" << "\n";
|
||||
fDest << "\t\t";
|
||||
fDest << "ambientColor [] ";
|
||||
fDest << "specularColor [] ";
|
||||
@@ -571,13 +571,13 @@ void G4VRML1SCENE::SendMarkerColor ( const G4VMarker& mark )
|
||||
fDest << " " << color.GetRed();
|
||||
fDest << " " << color.GetGreen();
|
||||
fDest << " " << color.GetBlue();
|
||||
fDest << endl;
|
||||
fDest << "\n";
|
||||
fDest << "\t\t" << "emissiveColor";
|
||||
fDest << " " << color.GetRed();
|
||||
fDest << " " << color.GetGreen();
|
||||
fDest << " " << color.GetBlue();
|
||||
fDest << endl;
|
||||
fDest << "\t" << "}" << endl;
|
||||
fDest << "\n";
|
||||
fDest << "\t" << "}" << "\n";
|
||||
}
|
||||
|
||||
void
|
||||
@@ -587,10 +587,10 @@ G4VRML1SCENE::SendMarkerWorldPosition ( const G4VMarker& mark )
|
||||
|
||||
SendMatrixTransformNode( fpObjectTransformation );
|
||||
|
||||
fDest << "\t\t" << "Transform {" << endl;
|
||||
fDest << "\t\t" << "Transform {" << "\n";
|
||||
fDest << "\t\t\t" << "translation ";
|
||||
fDest << point.x() << " " << point.y() << " " << point.z() << endl;
|
||||
fDest << "\t\t" << "}" << endl;
|
||||
fDest << point.x() << " " << point.y() << " " << point.z() << "\n";
|
||||
fDest << "\t\t" << "}" << "\n" ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1Viewer.cc,v 1.3.4.1 1999/12/07 20:53:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML1Viewer.cc,v 1.4 1999/12/15 14:54:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRMLView.cc
|
||||
// Yasuhide Sawada & Satoshi Tanaka
|
||||
@@ -34,14 +34,14 @@ G4VRML1Viewer::~G4VRML1Viewer()
|
||||
void G4VRML1Viewer::SetView()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML1Viewer::SetView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML1Viewer::SetView(): No effects" << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4VRML1Viewer::DrawView()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML1Viewer::DrawView()" << endl;
|
||||
G4cerr << "***** G4VRML1Viewer::DrawView()" << G4endl;
|
||||
#endif
|
||||
|
||||
fSceneHandler.VRMLBeginModeling();
|
||||
@@ -55,14 +55,14 @@ void G4VRML1Viewer::DrawView()
|
||||
void G4VRML1Viewer::ClearView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML1Viewer::ClearView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML1Viewer::ClearView(): No effects" << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4VRML1Viewer::ShowView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML1Viewer::ShowView()" << endl;
|
||||
G4cerr << "***** G4VRML1Viewer::ShowView()" << G4endl;
|
||||
#endif
|
||||
fSceneHandler.VRMLEndModeling();
|
||||
}
|
||||
@@ -70,7 +70,7 @@ void G4VRML1Viewer::ShowView(void)
|
||||
void G4VRML1Viewer::FinishView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML1Viewer::FinishView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML1Viewer::FinishView(): No effects" << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2.cc,v 1.3.8.1 1999/12/07 20:53:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML2.cc,v 1.4 1999/12/15 14:54:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML2.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -58,7 +58,7 @@ G4VSceneHandler* G4VRML2::CreateSceneHandler(const G4String& name)
|
||||
p = new G4VRML2SceneHandler(*this, name);
|
||||
|
||||
G4cout << G4VRML2SceneHandler::GetSceneCount()
|
||||
<< " " << fName << " scenes extanct." << endl;
|
||||
<< " " << fName << " scenes extanct." << G4endl;
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2File.cc,v 1.3.8.1 1999/12/07 20:53:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML2File.cc,v 1.4 1999/12/15 14:54:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML2File.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -45,7 +45,7 @@ G4VSceneHandler* G4VRML2File::CreateSceneHandler(const G4String& name)
|
||||
p = new G4VRML2FileSceneHandler(*this, name);
|
||||
|
||||
G4cout << G4VRML2FileSceneHandler::GetSceneCount()
|
||||
<< " " << fName << " scenes extanct." << endl;
|
||||
<< " " << fName << " scenes extanct." << G4endl;
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2FileSceneHandler.cc,v 1.1.8.1 1999/12/07 20:53:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML2FileSceneHandler.cc,v 1.2 1999/12/15 14:54:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML2FileSceneHandler.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
//#define DEBUG_FR_SCENE
|
||||
|
||||
#include <fstream.h>
|
||||
#include "g4std/fstream"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -103,7 +103,7 @@ G4VRML2FileSceneHandler::G4VRML2FileSceneHandler(G4VRML2File& system, const G4St
|
||||
G4VRML2FileSceneHandler::~G4VRML2FileSceneHandler()
|
||||
{
|
||||
#if defined DEBUG_FR_SCENE
|
||||
G4cerr << "***** ~G4VRML2FileSceneHandler" << endl;
|
||||
G4cerr << "***** ~G4VRML2FileSceneHandler" << G4endl;
|
||||
#endif
|
||||
fSceneCount--;
|
||||
}
|
||||
@@ -132,13 +132,13 @@ void G4VRML2FileSceneHandler::connectPort()
|
||||
|
||||
// Message
|
||||
if( fMaxFileNum > 1 && i == MAX_FILE_INDEX ) {
|
||||
G4cerr << "===========================================" << endl;
|
||||
G4cerr << "WARNING MESSAGE from VRML2FILE driver: " << endl;
|
||||
G4cerr << " This file name is the final one in the " << endl;
|
||||
G4cerr << " automatic updation of the output file name." << endl;
|
||||
G4cerr << " You may overwrite an existing file of " << endl;
|
||||
G4cerr << " the same name. " << endl;
|
||||
G4cerr << "===========================================" << endl;
|
||||
G4cerr << "===========================================" << G4endl;
|
||||
G4cerr << "WARNING MESSAGE from VRML2FILE driver: " << G4endl;
|
||||
G4cerr << " This file name is the final one in the " << G4endl;
|
||||
G4cerr << " automatic updation of the output file name." << G4endl;
|
||||
G4cerr << " You may overwrite an existing file of " << G4endl;
|
||||
G4cerr << " the same name. " << G4endl;
|
||||
G4cerr << "===========================================" << G4endl;
|
||||
}
|
||||
|
||||
// re-determine file to G4VRMLFILE_DEST_DIR/g4_i.wrl for i>0
|
||||
@@ -147,7 +147,7 @@ void G4VRML2FileSceneHandler::connectPort()
|
||||
}
|
||||
|
||||
// check validity of the file name
|
||||
ifstream fin ;
|
||||
G4std::ifstream fin ;
|
||||
fin.open(fVRMLFileName) ;
|
||||
if(!fin) {
|
||||
// new file
|
||||
@@ -161,11 +161,11 @@ void G4VRML2FileSceneHandler::connectPort()
|
||||
} // for
|
||||
|
||||
// open a VRML 2.0 file with determined file name
|
||||
G4cerr << "===========================================" << endl;
|
||||
G4cerr << "Output VRML 2.0 file: " << fVRMLFileName << endl;
|
||||
G4cerr << "Muximal number of file in the destination directory: " << fMaxFileNum << endl;
|
||||
G4cerr << " (Customizable as: setenv G4VRMLFILE_MAX_FILE_NUM number) " << endl;
|
||||
G4cerr << "===========================================" << endl;
|
||||
G4cerr << "===========================================" << G4endl;
|
||||
G4cerr << "Output VRML 2.0 file: " << fVRMLFileName << G4endl;
|
||||
G4cerr << "Muximal number of file in the destination directory: " << fMaxFileNum << G4endl;
|
||||
G4cerr << " (Customizable as: setenv G4VRMLFILE_MAX_FILE_NUM number) " << G4endl;
|
||||
G4cerr << "===========================================" << G4endl;
|
||||
|
||||
fDest.open(fVRMLFileName) ; fFlagDestOpen = true ;
|
||||
}
|
||||
@@ -182,18 +182,18 @@ void G4VRML2FileSceneHandler::closePort()
|
||||
|
||||
// close VRML file
|
||||
fDest.close(); fFlagDestOpen = false ;
|
||||
G4cerr << "*** VRML 2.0 File " << fVRMLFileName << " is generated." << endl;
|
||||
G4cerr << "*** VRML 2.0 File " << fVRMLFileName << " is generated." << G4endl;
|
||||
|
||||
|
||||
// Invoke viewer
|
||||
|
||||
if ( !strcmp(viewer, NO_VRML_VIEWER )) {
|
||||
G4cerr << "MESSAGE from VRML2FILE driver:" << endl;
|
||||
G4cerr << "MESSAGE from VRML2FILE driver:" << G4endl;
|
||||
G4cerr << " Set an environmental variable " ;
|
||||
G4cerr << ENV_VRML_VIEWER << endl;
|
||||
G4cerr << " if you want to visualize the generated VRML file" << endl;
|
||||
G4cerr << " automatically. For example, " << endl;
|
||||
G4cerr << " setenv " << ENV_VRML_VIEWER << " vrwave " << endl;
|
||||
G4cerr << ENV_VRML_VIEWER << G4endl;
|
||||
G4cerr << " if you want to visualize the generated VRML file" << G4endl;
|
||||
G4cerr << " automatically. For example, " << G4endl;
|
||||
G4cerr << " setenv " << ENV_VRML_VIEWER << " vrwave " << G4endl;
|
||||
} else {
|
||||
sprintf( command, "%s %s", viewer, fVRMLFileName );
|
||||
system( command );
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2FileViewer.cc,v 1.3.4.1 1999/12/07 20:53:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML2FileViewer.cc,v 1.4 1999/12/15 14:54:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML2FileViewer.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -42,7 +42,7 @@ G4VRML2FileViewer::~G4VRML2FileViewer()
|
||||
void G4VRML2FileViewer::SetView()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML2FileViewer::SetView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML2FileViewer::SetView(): No effects" << G4endl;
|
||||
#endif
|
||||
|
||||
// Do nothing, since VRML a browser is running as a different process.
|
||||
@@ -53,7 +53,7 @@ void G4VRML2FileViewer::SetView()
|
||||
void G4VRML2FileViewer::DrawView()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML2FileViewer::DrawView()" << endl;
|
||||
G4cerr << "***** G4VRML2FileViewer::DrawView()" << G4endl;
|
||||
#endif
|
||||
|
||||
fSceneHandler.VRMLBeginModeling() ;
|
||||
@@ -70,14 +70,14 @@ void G4VRML2FileViewer::DrawView()
|
||||
void G4VRML2FileViewer::ClearView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML2File1View::ClearView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML2File1View::ClearView(): No effects" << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4VRML2FileViewer::ShowView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML2FileViewer::ShowView()" << endl;
|
||||
G4cerr << "***** G4VRML2FileViewer::ShowView()" << G4endl;
|
||||
#endif
|
||||
fSceneHandler.VRMLEndModeling();
|
||||
}
|
||||
@@ -85,7 +85,7 @@ void G4VRML2FileViewer::ShowView(void)
|
||||
void G4VRML2FileViewer::FinishView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML2FileViewer::FinishView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML2FileViewer::FinishView(): No effects" << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -112,15 +112,15 @@ void G4VRML2FileViewer::SendViewParameters ()
|
||||
G4Point3D E(0.0, 0.0, E_z );
|
||||
|
||||
// VRML codes are generated below
|
||||
fDest << endl;
|
||||
fDest << "#---------- CAMERA" << endl;
|
||||
fDest << "Viewpoint {" << endl;
|
||||
fDest << G4endl;
|
||||
fDest << "#---------- CAMERA" << G4endl;
|
||||
fDest << "Viewpoint {" << G4endl;
|
||||
fDest << "\t" << "position " ;
|
||||
fDest << E.x() << " " ;
|
||||
fDest << E.y() << " " ;
|
||||
fDest << E.z() << endl ;
|
||||
fDest << "}" << endl;
|
||||
fDest << endl;
|
||||
fDest << E.z() << G4endl ;
|
||||
fDest << "}" << G4endl;
|
||||
fDest << G4endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2SceneHandler.cc,v 1.1.8.1 1999/12/07 20:53:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML2SceneHandler.cc,v 1.2 1999/12/15 14:54:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML2SceneHandler.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -19,7 +19,7 @@
|
||||
//#define DEBUG_FR_SCENE
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fstream.h>
|
||||
#include "g4std/fstream"
|
||||
#include <math.h>
|
||||
|
||||
#include "globals.hh"
|
||||
@@ -71,7 +71,7 @@ G4VRML2SceneHandler::G4VRML2SceneHandler(G4VRML2& system, const G4String& name)
|
||||
G4VRML2SceneHandler::~G4VRML2SceneHandler()
|
||||
{
|
||||
#if defined DEBUG_FR_SCENE
|
||||
G4cerr << "***** ~G4VRML2SceneHandler" << endl;
|
||||
G4cerr << "***** ~G4VRML2SceneHandler" << G4endl;
|
||||
#endif
|
||||
fSceneCount--;
|
||||
}
|
||||
@@ -94,12 +94,12 @@ void G4VRML2SceneHandler::connectPort(G4int max_trial)
|
||||
// INET domain connection is established
|
||||
G4cerr << "*** GEANT4 is connected to port ";
|
||||
G4cerr << fDest.getPort();
|
||||
G4cerr << " of server " << fSystem.getHostName() << endl;
|
||||
G4cerr << " of server " << fSystem.getHostName() << G4endl;
|
||||
break;
|
||||
} else {
|
||||
// Connection failed. Try the next port.
|
||||
G4cerr << "*** GEANT4 incremented targeting port to ";
|
||||
G4cerr << port << endl;
|
||||
G4cerr << port << G4endl;
|
||||
}
|
||||
|
||||
sleep (1);
|
||||
@@ -107,17 +107,17 @@ void G4VRML2SceneHandler::connectPort(G4int max_trial)
|
||||
} // for
|
||||
|
||||
if (!fDest.isConnected()) {
|
||||
G4cerr << "*** INET Connection failed. " << endl;
|
||||
G4cerr << " Maybe, you have not invoked viewer g4vrmlview yet, " << endl;
|
||||
G4cerr << " or too many viewers are already running in the " << endl;
|
||||
G4cerr << " server host(" << fSystem.getHostName() << "). " << endl;
|
||||
G4cerr << "*** INET Connection failed. " << G4endl;
|
||||
G4cerr << " Maybe, you have not invoked viewer g4vrmlview yet, " << G4endl;
|
||||
G4cerr << " or too many viewers are already running in the " << G4endl;
|
||||
G4cerr << " server host(" << fSystem.getHostName() << "). " << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4VRML2SceneHandler::closePort()
|
||||
{
|
||||
fDest.close();
|
||||
G4cerr << "*** INET Connection closed. " << endl;
|
||||
G4cerr << "*** INET Connection closed. " << G4endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2SceneHandlerFunc.icc,v 1.3.4.1 1999/12/07 20:53:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML2SceneHandlerFunc.icc,v 1.5 1999/12/27 07:49:22 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML2SceneHandlerFunc.icc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -16,7 +16,7 @@
|
||||
void G4VRML2SCENE::AddThis(const G4Trd& trd)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis trd" << endl ;
|
||||
G4cerr << "***** AddThis trd" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
G4VSceneHandler::AddThis(trd);
|
||||
@@ -25,7 +25,7 @@ void G4VRML2SCENE::AddThis(const G4Trd& trd)
|
||||
void G4VRML2SCENE::AddThis(const G4Trap& trap)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis trap" << endl ;
|
||||
G4cerr << "***** AddThis trap" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
G4VSceneHandler::AddThis(trap);
|
||||
@@ -34,7 +34,7 @@ void G4VRML2SCENE::AddThis(const G4Trap& trap)
|
||||
void G4VRML2SCENE::AddThis(const G4Para& para)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis para" << endl ;
|
||||
G4cerr << "***** AddThis para" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
G4VSceneHandler::AddThis(para);
|
||||
@@ -43,7 +43,7 @@ void G4VRML2SCENE::AddThis(const G4Para& para)
|
||||
void G4VRML2SCENE::AddThis(const G4Torus& torus )
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis torus" << endl ;
|
||||
G4cerr << "***** AddThis torus" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
G4VSceneHandler::AddThis(torus);
|
||||
@@ -53,7 +53,7 @@ void G4VRML2SCENE::AddThis(const G4Torus& torus )
|
||||
void G4VRML2SCENE::AddThis(const G4VSolid& vsolid)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis vsolid" << endl ;
|
||||
G4cerr << "***** AddThis vsolid" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
G4VSceneHandler::AddThis(vsolid);
|
||||
@@ -62,7 +62,7 @@ void G4VRML2SCENE::AddThis(const G4VSolid& vsolid)
|
||||
void G4VRML2SCENE::AddThis(const G4Tubs& tubs)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis tubs" << endl ;
|
||||
G4cerr << "***** AddThis tubs" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
G4VSceneHandler::AddThis(tubs) ;
|
||||
@@ -73,7 +73,7 @@ void G4VRML2SCENE::AddThis(const G4Tubs& tubs)
|
||||
void G4VRML2SCENE::AddThis(const G4Cons& cons)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis cons" << endl ;
|
||||
G4cerr << "***** AddThis cons" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
G4VSceneHandler::AddThis(cons) ;
|
||||
@@ -82,7 +82,7 @@ void G4VRML2SCENE::AddThis(const G4Cons& cons)
|
||||
void G4VRML2SCENE::AddThis(const G4Box& box)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis box" << endl ;
|
||||
G4cerr << "***** AddThis box" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
G4VSceneHandler::AddThis(box) ;
|
||||
@@ -92,7 +92,7 @@ void G4VRML2SCENE::AddThis(const G4Box& box)
|
||||
void G4VRML2SCENE::AddThis(const G4Sphere& sphere)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddThis sphere" << endl ;
|
||||
G4cerr << "***** AddThis sphere" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
G4VSceneHandler::AddThis(sphere) ;
|
||||
@@ -101,22 +101,22 @@ void G4VRML2SCENE::AddThis(const G4Sphere& sphere)
|
||||
void G4VRML2SCENE::AddPrimitive(const G4Polyline& polyline)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddPrimitive polyline" << endl ;
|
||||
G4cerr << "***** AddPrimitive polyline" << "\n" ;
|
||||
#endif
|
||||
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
// VRML codes are generated below
|
||||
|
||||
fDest << "#---------- POLYLINE" << endl;
|
||||
fDest << "Shape {" << endl;
|
||||
fDest << "#---------- POLYLINE" << "\n";
|
||||
fDest << "Shape {" << "\n";
|
||||
|
||||
SendLineColor ( polyline.GetVisAttributes() );
|
||||
|
||||
fDest << "\t" << "geometry IndexedLineSet {" << endl;
|
||||
fDest << "\t" << "geometry IndexedLineSet {" << "\n";
|
||||
|
||||
fDest << "\t\t" << "coord Coordinate {" << endl;
|
||||
fDest << "\t\t\t" << "point [" << endl;
|
||||
fDest << "\t\t" << "coord Coordinate {" << "\n";
|
||||
fDest << "\t\t\t" << "point [" << "\n";
|
||||
G4int e, i;
|
||||
for (i = 0, e = polyline.entries(); e; i++, e--) {
|
||||
|
||||
@@ -126,31 +126,31 @@ void G4VRML2SCENE::AddPrimitive(const G4Polyline& polyline)
|
||||
fDest << "\t\t\t\t";
|
||||
fDest << point.x() << " ";
|
||||
fDest << point.y() << " ";
|
||||
fDest << point.z() << "," << endl;
|
||||
fDest << point.z() << "," << "\n";
|
||||
|
||||
} // for
|
||||
|
||||
fDest << "\t\t\t" << "]" << endl; // point
|
||||
fDest << "\t\t" << "}" << endl; // coord
|
||||
fDest << "\t\t\t" << "]" << "\n"; // point
|
||||
fDest << "\t\t" << "}" << "\n"; // coord
|
||||
|
||||
fDest << "\t\t" << "coordIndex [";
|
||||
for (i = 0, e = polyline.entries(); e; i++, e--) {
|
||||
if (i % 10 == 0)
|
||||
fDest << endl << "\t\t\t";
|
||||
fDest << "\n" << "\t\t\t";
|
||||
fDest << i << ", ";
|
||||
}
|
||||
fDest << "-1" << endl;
|
||||
fDest << "\t\t" << "]" << endl; // coordIndex
|
||||
fDest << "\t" << "}" << endl; // geometry IndexedLineSet
|
||||
fDest << "-1" << "\n";
|
||||
fDest << "\t\t" << "]" << "\n"; // coordIndex
|
||||
fDest << "\t" << "}" << "\n"; // geometry IndexedLineSet
|
||||
|
||||
fDest << "}" << endl; // Shape
|
||||
fDest << "}" << "\n"; // Shape
|
||||
}
|
||||
|
||||
|
||||
void G4VRML2SCENE::AddPrimitive(const G4Polyhedron& polyhedron)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
cerr << "***** AddPrimitive(G4Polyhedron)" << endl;
|
||||
G4cerr << "***** AddPrimitive(G4Polyhedron)" << "\n";
|
||||
#endif
|
||||
|
||||
VRMLBeginModeling () ;
|
||||
@@ -164,24 +164,24 @@ void G4VRML2SCENE::AddPrimitive(const G4Polyhedron& polyhedron)
|
||||
|
||||
// VRML codes are generated below
|
||||
|
||||
fDest << "#---------- SOLID: " << pv_name << endl;
|
||||
fDest << "#---------- SOLID: " << pv_name << "\n";
|
||||
|
||||
if ( IsPVPickable() ) {
|
||||
|
||||
fDest << "Anchor {" << endl;
|
||||
fDest << " description " << "\"" << pv_name << "\"" << endl;
|
||||
fDest << " url \"\" " << endl;
|
||||
fDest << " children [" << endl;
|
||||
fDest << "Anchor {" << "\n";
|
||||
fDest << " description " << "\"" << pv_name << "\"" << "\n";
|
||||
fDest << " url \"\" " << "\n";
|
||||
fDest << " children [" << "\n";
|
||||
}
|
||||
|
||||
fDest << "\t"; fDest << "Shape {" << endl;
|
||||
fDest << "\t"; fDest << "Shape {" << "\n";
|
||||
|
||||
SendMaterialNode();
|
||||
|
||||
fDest << "\t\t" << "geometry IndexedFaceSet {" << endl;
|
||||
fDest << "\t\t" << "geometry IndexedFaceSet {" << "\n";
|
||||
|
||||
fDest << "\t\t\t" << "coord Coordinate {" << endl;
|
||||
fDest << "\t\t\t\t" << "point [" << endl;
|
||||
fDest << "\t\t\t" << "coord Coordinate {" << "\n";
|
||||
fDest << "\t\t\t\t" << "point [" << "\n";
|
||||
G4int i, j;
|
||||
for (i = 1, j = polyhedron.GetNoVertices(); j; j--, i++) {
|
||||
G4Point3D point = polyhedron.GetVertex(i);
|
||||
@@ -191,12 +191,12 @@ void G4VRML2SCENE::AddPrimitive(const G4Polyhedron& polyhedron)
|
||||
fDest << "\t\t\t\t\t";
|
||||
fDest << point.x() << " ";
|
||||
fDest << point.y() << " ";
|
||||
fDest << point.z() << "," << endl;
|
||||
fDest << point.z() << "," << "\n";
|
||||
}
|
||||
fDest << "\t\t\t\t" << "]" << endl; // point
|
||||
fDest << "\t\t\t" << "}" << endl; // coord
|
||||
fDest << "\t\t\t\t" << "]" << "\n"; // point
|
||||
fDest << "\t\t\t" << "}" << "\n"; // coord
|
||||
|
||||
fDest << "\t\t\t" << "coordIndex [" << endl;
|
||||
fDest << "\t\t\t" << "coordIndex [" << "\n";
|
||||
|
||||
// facet loop
|
||||
G4int f;
|
||||
@@ -210,18 +210,18 @@ void G4VRML2SCENE::AddPrimitive(const G4Polyhedron& polyhedron)
|
||||
notLastEdge = polyhedron.GetNextVertexIndex(index, edgeFlag);
|
||||
fDest << index - 1 << ", ";
|
||||
} while (notLastEdge);
|
||||
fDest << "-1," << endl;
|
||||
fDest << "-1," << "\n";
|
||||
}
|
||||
fDest << "\t\t\t" << "]" << endl; // coordIndex
|
||||
fDest << "\t\t\t" << "]" << "\n"; // coordIndex
|
||||
|
||||
fDest << "\t\t\t" << "solid FALSE" << endl; // draw backfaces
|
||||
fDest << "\t\t\t" << "solid FALSE" << "\n"; // draw backfaces
|
||||
|
||||
fDest << "\t\t" << "}" << endl; // IndexFaceSet
|
||||
fDest << "\t" << "}" << endl; // Shape
|
||||
fDest << "\t\t" << "}" << "\n"; // IndexFaceSet
|
||||
fDest << "\t" << "}" << "\n"; // Shape
|
||||
|
||||
if ( IsPVPickable() ) {
|
||||
fDest << " ]" << endl; // children
|
||||
fDest << "}" << endl; // Anchor
|
||||
fDest << " ]" << "\n"; // children
|
||||
fDest << "}" << "\n"; // Anchor
|
||||
}
|
||||
|
||||
}
|
||||
@@ -230,9 +230,9 @@ void G4VRML2SCENE::AddPrimitive(const G4Polyhedron& polyhedron)
|
||||
void G4VRML2SCENE::AddPrimitive(const G4NURBS& nurb)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddPrimitive nurbs" << endl ;
|
||||
G4cerr << "***** AddPrimitive nurbs" << "\n" ;
|
||||
#endif
|
||||
G4cerr << "G4VRML2File::AddPrimitive(G4NURBS&): not implemented. " << endl ;
|
||||
G4cerr << "G4VRML2File::AddPrimitive(G4NURBS&): not implemented. " << "\n" ;
|
||||
|
||||
VRMLBeginModeling () ;
|
||||
}
|
||||
@@ -240,12 +240,12 @@ void G4VRML2SCENE::AddPrimitive(const G4NURBS& nurb)
|
||||
void G4VRML2SCENE::AddPrimitive( const G4Text& text )
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddPrimitive text" << endl ;
|
||||
G4cerr << "***** AddPrimitive text" << "\n" ;
|
||||
#endif
|
||||
G4cerr <<
|
||||
"***** void G4VRML2SCENE::AddPrimitive( const G4Text& text )"
|
||||
" not implemented yet."
|
||||
<< endl;
|
||||
<< "\n";
|
||||
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
@@ -254,7 +254,7 @@ void G4VRML2SCENE::AddPrimitive( const G4Text& text )
|
||||
void G4VRML2SCENE::AddPrimitive( const G4Circle& circle )
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddPrimitive circle" << endl ;
|
||||
G4cerr << "***** AddPrimitive circle" << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling () ;
|
||||
|
||||
@@ -267,52 +267,52 @@ void G4VRML2SCENE::AddPrimitive( const G4Circle& circle )
|
||||
G4double radius = GetMarkerHalfSize ( circle );
|
||||
|
||||
// VRML codes are generated below
|
||||
fDest << "#---------- 3D MARKER (Circle)" << endl;
|
||||
fDest << "Anchor {" << endl;
|
||||
fDest << "#---------- 3D MARKER (Circle)" << "\n";
|
||||
fDest << "Anchor {" << "\n";
|
||||
|
||||
if( circle.GetInfo().isNull() ) {
|
||||
fDest << " description " << "\"(" << X << " " ;
|
||||
fDest << Y << " " ;
|
||||
fDest << Z << ")\"" << endl;
|
||||
fDest << Z << ")\"" << "\n";
|
||||
} else {
|
||||
fDest << " description " << "\"" << info << "\"" << endl;
|
||||
fDest << " description " << "\"" << info << "\"" << "\n";
|
||||
}
|
||||
|
||||
|
||||
fDest << " url \"\" " << endl;
|
||||
fDest << " url \"\" " << "\n";
|
||||
|
||||
fDest << " children [" << endl;
|
||||
fDest << " children [" << "\n";
|
||||
|
||||
fDest << " Transform {" << endl;
|
||||
fDest << " Transform {" << "\n";
|
||||
|
||||
fDest << " translation ";
|
||||
fDest << X << " " << Y << " " << Z << endl;
|
||||
fDest << X << " " << Y << " " << Z << "\n";
|
||||
|
||||
fDest << " children [" << endl;
|
||||
fDest << " children [" << "\n";
|
||||
|
||||
fDest << "\t" << "Shape {" << endl;
|
||||
fDest << "\t" << "Shape {" << "\n";
|
||||
|
||||
SendMarkerColor( circle );
|
||||
|
||||
// send shape with size
|
||||
fDest << "\t\t" << "geometry Sphere {" << endl;
|
||||
fDest << "\t\t\t" << "radius " << radius << endl;
|
||||
fDest << "\t\t" << "}" << endl;
|
||||
fDest << "\t\t" << "geometry Sphere {" << "\n";
|
||||
fDest << "\t\t\t" << "radius " << radius << "\n";
|
||||
fDest << "\t\t" << "}" << "\n";
|
||||
|
||||
fDest << "\t" << "}" << endl; // Shape
|
||||
fDest << "\t" << "}" << "\n"; // Shape
|
||||
|
||||
fDest << " ]" << endl; // children
|
||||
fDest << " }" << endl; // Transform
|
||||
fDest << " ]" << "\n"; // children
|
||||
fDest << " }" << "\n"; // Transform
|
||||
|
||||
fDest << " ]" << endl; // children
|
||||
fDest << "}" << endl; // Anchor
|
||||
fDest << " ]" << "\n"; // children
|
||||
fDest << "}" << "\n"; // Anchor
|
||||
|
||||
}
|
||||
|
||||
void G4VRML2SCENE::AddPrimitive(const G4Square& square)
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** AddPrimitive square" << endl ;
|
||||
G4cerr << "***** AddPrimitive square" << "\n" ;
|
||||
#endif
|
||||
|
||||
VRMLBeginModeling () ;
|
||||
@@ -327,60 +327,60 @@ void G4VRML2SCENE::AddPrimitive(const G4Square& square)
|
||||
G4double diameter = 2.0 * radius ;
|
||||
|
||||
// VRML codes are generated below
|
||||
fDest << "#---------- 3D MARKER (Square)" << endl;
|
||||
fDest << "Anchor {" << endl;
|
||||
fDest << "#---------- 3D MARKER (Square)" << "\n";
|
||||
fDest << "Anchor {" << "\n";
|
||||
|
||||
if( square.GetInfo().isNull() ) {
|
||||
fDest << " description " << "\"(" << X << " " ;
|
||||
fDest << Y << " " ;
|
||||
fDest << Z << ")\"" << endl;
|
||||
fDest << Z << ")\"" << "\n";
|
||||
} else {
|
||||
fDest << " description " << "\"" << info << "\"" << endl;
|
||||
fDest << " description " << "\"" << info << "\"" << "\n";
|
||||
}
|
||||
|
||||
fDest << " url \"\" " << endl;
|
||||
fDest << " url \"\" " << "\n";
|
||||
|
||||
fDest << " children [" << endl;
|
||||
fDest << " children [" << "\n";
|
||||
|
||||
fDest << " Transform {" << endl;
|
||||
fDest << " Transform {" << "\n";
|
||||
|
||||
fDest << " translation ";
|
||||
fDest << X << " " << Y << " " << Z << endl;
|
||||
fDest << X << " " << Y << " " << Z << "\n";
|
||||
|
||||
fDest << " children [" << endl;
|
||||
fDest << " children [" << "\n";
|
||||
|
||||
fDest << "\t" << "Shape {" << endl;
|
||||
fDest << "\t" << "Shape {" << "\n";
|
||||
|
||||
SendMarkerColor( square );
|
||||
|
||||
// send shape with size
|
||||
fDest << "\t\t" << "geometry Box {" << endl;
|
||||
fDest << "\t\t" << "geometry Box {" << "\n";
|
||||
fDest << "\t\t\t" << "size " << diameter << " " ;
|
||||
fDest << diameter << " " ;
|
||||
fDest << diameter << endl ;
|
||||
fDest << "\t\t" << "}" << endl;
|
||||
fDest << diameter << "\n" ;
|
||||
fDest << "\t\t" << "}" << "\n";
|
||||
|
||||
fDest << "\t" << "}" << endl; // Shape
|
||||
fDest << "\t" << "}" << "\n"; // Shape
|
||||
|
||||
fDest << " ]" << endl; // children
|
||||
fDest << " }" << endl; // Transform
|
||||
fDest << " ]" << "\n"; // children
|
||||
fDest << " }" << "\n"; // Transform
|
||||
|
||||
fDest << " ]" << endl; // children
|
||||
fDest << "}" << endl; // Anchor
|
||||
fDest << " ]" << "\n"; // children
|
||||
fDest << "}" << "\n"; // Anchor
|
||||
|
||||
}
|
||||
|
||||
void G4VRML2SCENE::ClearStore()
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** ClearStore(): No effetcs" << endl ;
|
||||
G4cerr << "***** ClearStore(): No effetcs" << "\n" ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4VRML2SCENE::BeginModeling()
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** BeginModeling" << endl ;
|
||||
G4cerr << "***** BeginModeling" << "\n" ;
|
||||
#endif
|
||||
G4VSceneHandler::BeginModeling();
|
||||
|
||||
@@ -389,7 +389,7 @@ void G4VRML2SCENE::BeginModeling()
|
||||
void G4VRML2SCENE::EndModeling()
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** EndModeling " << endl ;
|
||||
G4cerr << "***** EndModeling " << "\n" ;
|
||||
#endif
|
||||
G4VSceneHandler::EndModeling();
|
||||
}
|
||||
@@ -399,7 +399,7 @@ void G4VRML2SCENE::BeginPrimitives(const G4Transform3D& objectTransformation)
|
||||
G4VSceneHandler::BeginPrimitives (objectTransformation);
|
||||
fpObjectTransformation = &objectTransformation;
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** BeginPrimitives " << endl ;
|
||||
G4cerr << "***** BeginPrimitives " << "\n" ;
|
||||
#endif
|
||||
VRMLBeginModeling();
|
||||
}
|
||||
@@ -407,7 +407,7 @@ void G4VRML2SCENE::BeginPrimitives(const G4Transform3D& objectTransformation)
|
||||
void G4VRML2SCENE::EndPrimitives()
|
||||
{
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** EndPrimitives " << endl ;
|
||||
G4cerr << "***** EndPrimitives " << "\n" ;
|
||||
#endif
|
||||
G4VSceneHandler::EndPrimitives();
|
||||
}
|
||||
@@ -438,36 +438,36 @@ void G4VRML2SCENE::SendMaterialNode( const G4VisAttributes* pVA )
|
||||
// Error recovery: Use default values of VRML browser
|
||||
fDest << "\t\t" ;
|
||||
fDest << "appearance Appearance { material Material {} }";
|
||||
fDest << endl;
|
||||
fDest << "\n";
|
||||
|
||||
} else {
|
||||
|
||||
const G4Color& color = pVA->GetColor();
|
||||
|
||||
fDest << "\t\t" << "appearance Appearance {" << endl;
|
||||
fDest << "\t\t\t" << "material Material {" << endl;
|
||||
fDest << "\t\t" << "appearance Appearance {" << "\n";
|
||||
fDest << "\t\t\t" << "material Material {" << "\n";
|
||||
|
||||
// diffuse color
|
||||
fDest << "\t\t\t\t" << "diffuseColor ";
|
||||
fDest << color.GetRed() << " " ;
|
||||
fDest << color.GetGreen() << " " ;
|
||||
fDest << color.GetBlue() << endl;
|
||||
fDest << color.GetBlue() << "\n";
|
||||
|
||||
// emmisive color
|
||||
// fDest << "\t\t\t\t" << "emissiveColor ";
|
||||
// fDest << color.GetRed() << " " ;
|
||||
// fDest << color.GetGreen() << " " ;
|
||||
//fDest << color.GetBlue() << endl;
|
||||
//fDest << color.GetBlue() << "\n";
|
||||
//
|
||||
|
||||
// wireframe is expressed as transparency
|
||||
if ( flagWF )
|
||||
{
|
||||
fDest << "\t\t\t\t" << "transparency " << TRANSPARENCY << endl;
|
||||
fDest << "\t\t\t\t" << "transparency " << TRANSPARENCY << "\n";
|
||||
}
|
||||
|
||||
fDest << "\t\t\t" << "}" << endl; // material
|
||||
fDest << "\t\t" << "}" << endl; // appearance
|
||||
fDest << "\t\t\t" << "}" << "\n"; // material
|
||||
fDest << "\t\t" << "}" << "\n"; // appearance
|
||||
}
|
||||
|
||||
}
|
||||
@@ -484,11 +484,11 @@ void G4VRML2SCENE::VRMLBeginModeling()
|
||||
{
|
||||
if (!IS_CONNECTED ) {
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** VRMLBeginModeling (started)" << endl ;
|
||||
G4cerr << "***** VRMLBeginModeling (started)" << "\n" ;
|
||||
#endif
|
||||
this->connectPort();
|
||||
fDest << "#VRML V2.0 utf8" << endl;
|
||||
fDest << "# Generated by VRML 2.0 driver of GEANT4\n" << endl;
|
||||
fDest << "#VRML V2.0 utf8" << "\n";
|
||||
fDest << "# Generated by VRML 2.0 driver of GEANT4\n" << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -496,9 +496,9 @@ void G4VRML2SCENE::VRMLEndModeling()
|
||||
{
|
||||
if ( IS_CONNECTED ) {
|
||||
#if defined DEBUG_SCENE_FUNC
|
||||
G4cerr << "***** VRMLEndModeling (started)" << endl ;
|
||||
G4cerr << "***** VRMLEndModeling (started)" << "\n" ;
|
||||
#endif
|
||||
fDest << "#End of file." << endl;
|
||||
fDest << "#End of file." << "\n";
|
||||
this->closePort();
|
||||
}
|
||||
}
|
||||
@@ -507,18 +507,18 @@ void G4VRML2SCENE::SendMarkerColor ( const G4VMarker& mark )
|
||||
{
|
||||
const G4Color& color = GetColor( mark );
|
||||
|
||||
fDest << "\t\t" << "appearance Appearance {" << endl;
|
||||
fDest << "\t\t\t" << "material Material {" << endl;
|
||||
fDest << "\t\t" << "appearance Appearance {" << "\n";
|
||||
fDest << "\t\t\t" << "material Material {" << "\n";
|
||||
fDest << "\t\t\t\t" << "diffuseColor ";
|
||||
fDest << color.GetRed() << " " ;
|
||||
fDest << color.GetGreen() << " " ;
|
||||
fDest << color.GetBlue() << endl;
|
||||
fDest << color.GetBlue() << "\n";
|
||||
fDest << "\t\t\t\t" << "emissiveColor ";
|
||||
fDest << color.GetRed() << " " ;
|
||||
fDest << color.GetGreen() << " " ;
|
||||
fDest << color.GetBlue() << endl;
|
||||
fDest << "\t\t\t" << "}" << endl; // material
|
||||
fDest << "\t\t" << "}" << endl; // appearance
|
||||
fDest << color.GetBlue() << "\n";
|
||||
fDest << "\t\t\t" << "}" << "\n"; // material
|
||||
fDest << "\t\t" << "}" << "\n"; // appearance
|
||||
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ G4VRML2SCENE::SendMarkerWorldPosition ( const G4VMarker& mark )
|
||||
point.transform( *fpObjectTransformation );
|
||||
|
||||
fDest << " translation ";
|
||||
fDest << point.x() << " " << point.y() << " " << point.z() << endl;
|
||||
fDest << point.x() << " " << point.y() << " " << point.z() << "\n";
|
||||
|
||||
}
|
||||
|
||||
@@ -600,18 +600,18 @@ void G4VRML2SCENE::SendLineColor ( const G4VisAttributes* pVA )
|
||||
const G4Color& color = pVA->GetColor();
|
||||
|
||||
|
||||
fDest << "\t" << "appearance Appearance {" << endl;
|
||||
fDest << "\t\t" << "material Material {" << endl;
|
||||
fDest << "\t" << "appearance Appearance {" << "\n";
|
||||
fDest << "\t\t" << "material Material {" << "\n";
|
||||
fDest << "\t\t\t" << "diffuseColor ";
|
||||
fDest << color.GetRed() << " " ;
|
||||
fDest << color.GetGreen() << " " ;
|
||||
fDest << color.GetBlue() << endl;
|
||||
fDest << color.GetBlue() << "\n";
|
||||
fDest << "\t\t\t" << "emissiveColor ";
|
||||
fDest << color.GetRed() << " " ;
|
||||
fDest << color.GetGreen() << " " ;
|
||||
fDest << color.GetBlue() << endl;
|
||||
fDest << "\t\t" << "}" << endl; // material
|
||||
fDest << "\t" << "}" << endl; // appearance
|
||||
fDest << color.GetBlue() << "\n";
|
||||
fDest << "\t\t" << "}" << "\n"; // material
|
||||
fDest << "\t" << "}" << "\n"; // appearance
|
||||
}
|
||||
|
||||
G4double G4VRML2SCENE::SetPVTransparency ()
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2Viewer.cc,v 1.3.4.1 1999/12/07 20:53:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VRML2Viewer.cc,v 1.5 1999/12/27 07:49:22 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// G4VRML2Viewer.cc
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
@@ -41,7 +41,7 @@ G4VRML2Viewer::~G4VRML2Viewer()
|
||||
void G4VRML2Viewer::SetView()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML2Viewer::SetView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML2Viewer::SetView(): No effects" << G4endl;
|
||||
#endif
|
||||
|
||||
// Do nothing, since VRML a browser is running as a different process.
|
||||
@@ -53,7 +53,7 @@ void G4VRML2Viewer::SetView()
|
||||
void G4VRML2Viewer::DrawView()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML2Viewer::DrawView()" << endl;
|
||||
G4cerr << "***** G4VRML2Viewer::DrawView()" << G4endl;
|
||||
#endif
|
||||
fSceneHandler.VRMLBeginModeling() ;
|
||||
|
||||
@@ -69,14 +69,14 @@ void G4VRML2Viewer::DrawView()
|
||||
void G4VRML2Viewer::ClearView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML2Viewer::ClearView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML2Viewer::ClearView(): No effects" << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void G4VRML2Viewer::ShowView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML2Viewer::ShowView()" << endl;
|
||||
G4cerr << "***** G4VRML2Viewer::ShowView()" << G4endl;
|
||||
#endif
|
||||
fSceneHandler.VRMLEndModeling();
|
||||
}
|
||||
@@ -84,7 +84,7 @@ void G4VRML2Viewer::ShowView(void)
|
||||
void G4VRML2Viewer::FinishView(void)
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4VRML2Viewer::FinishView(): No effects" << endl;
|
||||
G4cerr << "***** G4VRML2Viewer::FinishView(): No effects" << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -110,15 +110,15 @@ void G4VRML2Viewer::SendViewParameters ()
|
||||
G4Point3D E(0.0, 0.0, E_z );
|
||||
|
||||
// VRML codes are generated below
|
||||
fDest << endl;
|
||||
fDest << "#---------- CAMERA" << endl;
|
||||
fDest << "Viewpoint {" << endl;
|
||||
fDest << "\n";
|
||||
fDest << "#---------- CAMERA" << "\n";
|
||||
fDest << "Viewpoint {" << "\n";
|
||||
fDest << "\t" << "position " ;
|
||||
fDest << E.x() << " " ;
|
||||
fDest << E.y() << " " ;
|
||||
fDest << E.z() << endl ;
|
||||
fDest << "}" << endl;
|
||||
fDest << endl;
|
||||
fDest << E.z() << "\n" ;
|
||||
fDest << "}" << "\n";
|
||||
fDest << "\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user