Import Geant4 0.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:09:25 +02:00
parent b97f8d0df7
commit aaa409b6ee
2922 changed files with 55107 additions and 81674 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: FRClient.cc,v 2.2 1998/07/13 17:12:04 urbi Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: FRClient.cc,v 1.2 1999/01/09 16:27:41 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// FRClient.cc
// FukuiRenderer Client
+2 -2
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4FRClient.cc,v 2.0 1998/07/02 16:48:06 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4FRClient.cc,v 1.2 1999/01/09 16:27:42 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4FRClient.cc
// Yasuhide Sawada & Satoshi Tanaka
+13 -13
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML1.cc,v 2.4 1998/11/09 19:33:17 allison Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML1.cc,v 1.3 1999/01/11 00:48:04 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML1.cc
// Yasuhide Sawada & Satoshi Tanaka
@@ -19,11 +19,11 @@
#include <stdio.h> // sscanf
#include <stdlib.h> // getenv
#include "G4VScene.hh"
#include "G4VSceneHandler.hh"
#include "G4VRML1.hh"
#include "G4VRML1Scene.hh"
#include "G4VRML1View.hh"
#include "G4VRML1SceneHandler.hh"
#include "G4VRML1Viewer.hh"
#include "G4FRClient.hh"
@@ -51,24 +51,24 @@ G4VRML1::~G4VRML1()
}
G4VScene* G4VRML1::CreateScene(const G4String& name)
G4VSceneHandler* G4VRML1::CreateSceneHandler(const G4String& name)
{
G4VScene *p = NULL;
G4VSceneHandler *p = NULL;
p = new G4VRML1Scene(*this, name);
p = new G4VRML1SceneHandler(*this, name);
G4cout << G4VRML1Scene::GetSceneCount()
G4cout << G4VRML1SceneHandler::GetSceneCount()
<< " " << fName << " scenes extanct." << endl;
return p;
}
G4VView* G4VRML1::CreateView(G4VScene& scene, const G4String& name)
G4VViewer* G4VRML1::CreateViewer(G4VSceneHandler& scene, const G4String& name)
{
G4VView* pView = NULL;
G4VViewer* pView = NULL;
G4VRML1Scene* pScene = (G4VRML1Scene*)&scene;
pView = new G4VRML1View(*pScene, name);
G4VRML1SceneHandler* pScene = (G4VRML1SceneHandler*)&scene;
pView = new G4VRML1Viewer(*pScene, name);
return pView;
}
+13 -13
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML1File.cc,v 2.4 1998/11/09 19:33:18 allison Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML1File.cc,v 1.3 1999/01/11 00:48:05 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML1File.cc
// Satoshi Tanaka & Yasuhide Sawada
@@ -19,11 +19,11 @@
#include <stdio.h> // sscanf
#include <stdlib.h> // getenv
#include "G4VScene.hh"
#include "G4VSceneHandler.hh"
#include "G4VRML1File.hh"
#include "G4VRML1FileScene.hh"
#include "G4VRML1FileView.hh"
#include "G4VRML1FileSceneHandler.hh"
#include "G4VRML1FileViewer.hh"
#include "G4FRClient.hh"
@@ -38,24 +38,24 @@ G4VRML1File::~G4VRML1File()
}
G4VScene* G4VRML1File::CreateScene(const G4String& name)
G4VSceneHandler* G4VRML1File::CreateSceneHandler(const G4String& name)
{
G4VScene *p = NULL;
G4VSceneHandler *p = NULL;
p = new G4VRML1FileScene(*this, name);
p = new G4VRML1FileSceneHandler(*this, name);
G4cout << G4VRML1FileScene::GetSceneCount()
G4cout << G4VRML1FileSceneHandler::GetSceneCount()
<< " " << fName << " scenes extanct." << endl;
return p;
}
G4VView* G4VRML1File::CreateView(G4VScene& scene, const G4String& name)
G4VViewer* G4VRML1File::CreateViewer(G4VSceneHandler& scene, const G4String& name)
{
G4VView* pView = NULL;
G4VViewer* pView = NULL;
G4VRML1FileScene* pScene = (G4VRML1FileScene*)&scene;
pView = new G4VRML1FileView(*pScene, name);
G4VRML1FileSceneHandler* pScene = (G4VRML1FileSceneHandler*)&scene;
pView = new G4VRML1FileViewer(*pScene, name);
return pView;
}
@@ -5,10 +5,10 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML1FileScene.cc,v 2.7 1998/12/07 06:40:18 stanaka Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML1FileSceneHandler.cc,v 1.1 1999/01/09 16:27:44 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML1FileScene.cc
// G4VRML1FileSceneHandler.cc
// Satoshi Tanaka & Yasuhide Sawada
//=================//
@@ -39,8 +39,8 @@
#include "G4Circle.hh"
#include "G4Square.hh"
#include "G4VRML1FileScene.hh"
#include "G4VRML1FileView.hh"
#include "G4VRML1FileSceneHandler.hh"
#include "G4VRML1FileViewer.hh"
#include "G4VRML1File.hh"
// CONST
@@ -52,8 +52,8 @@ const char NO_VRML_VIEWER [] = "NONE";
const char VRMLFILE_DEST_DIR [] = "G4VRMLFILE_DEST_DIR";
G4VRML1FileScene::G4VRML1FileScene(G4VRML1File& system, const G4String& name) :
G4VScene(system, fSceneIdCount++, name),
G4VRML1FileSceneHandler::G4VRML1FileSceneHandler(G4VRML1File& system, const G4String& name) :
G4VSceneHandler(system, fSceneIdCount++, name),
fSystem(system),
fDest() ,
fFlagDestOpen( false )
@@ -83,23 +83,23 @@ G4VRML1FileScene::G4VRML1FileScene(G4VRML1File& system, const G4String& name) :
}
G4VRML1FileScene::~G4VRML1FileScene()
G4VRML1FileSceneHandler::~G4VRML1FileSceneHandler()
{
#if defined DEBUG_FR_SCENE
G4cerr << "***** ~G4VRML1FileScene" << endl;
G4cerr << "***** ~G4VRML1FileSceneHandler" << endl;
#endif
fSceneCount--;
}
#define G4VRML1SCENE G4VRML1FileScene
#define G4VRML1SCENE G4VRML1FileSceneHandler
#define IS_CONNECTED this->isConnected()
#include "G4VRML1SceneFunc.icc"
#include "G4VRML1SceneHandlerFunc.icc"
#undef IS_CONNECTED
#undef G4VRML1SCENE
void G4VRML1FileScene::connectPort()
void G4VRML1FileSceneHandler::connectPort()
{
// g4.wrl, g4_1.wrl, ..., g4_MAX_FILE_INDEX.wrl
const int MAX_FILE_INDEX = fMaxFileNum - 1 ;
@@ -154,7 +154,7 @@ void G4VRML1FileScene::connectPort()
}
void G4VRML1FileScene::closePort()
void G4VRML1FileSceneHandler::closePort()
{
char command[256] ;
char viewer [256] ;
@@ -183,7 +183,7 @@ void G4VRML1FileScene::closePort()
}
}
G4int G4VRML1FileScene::fSceneIdCount = 0;
G4int G4VRML1FileScene::fSceneCount = 0;
G4int G4VRML1FileSceneHandler::fSceneIdCount = 0;
G4int G4VRML1FileSceneHandler::fSceneCount = 0;
#endif
@@ -1,78 +0,0 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML1FileView.cc,v 2.4 1998/11/09 19:33:22 allison Exp $
// GEANT4 tag $Name: geant4-00 $
//
// G4VRMLView.cc
// Satoshi Tanaka & Yasuhide Sawada
//=================//
#ifdef G4VIS_BUILD_VRMLFILE_DRIVER
//=================//
//#define DEBUG_FR_VIEW
#include "G4SceneData.hh"
#include "G4VRML1FileView.hh"
#include "G4VRML1FileScene.hh"
#include "G4VRML1File.hh"
#include "G4ios.hh"
G4VRML1FileView::G4VRML1FileView(G4VRML1FileScene& scene,
const G4String& name) :
G4VView(scene, scene.IncrementViewCount(), name), fScene(scene)
{}
G4VRML1FileView::~G4VRML1FileView()
{}
void G4VRML1FileView::SetView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1FileView::SetView()" << endl;
G4cerr << "G4VRML1FileView::SetView(); not imlemented. " << endl;
#endif
}
void G4VRML1FileView::DrawView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1FileView::DrawView()" << endl;
#endif
// Here is a minimal DrawView() function.
NeedKernelVisit();
ProcessView();
FinishView();
}
void G4VRML1FileView::ClearView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1File1View::ClearView()" << endl;
G4cerr << "G4VRML1FileView::ClearView(); not implemented. " << endl;
#endif
}
void G4VRML1FileView::ShowView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1FileView::ShowView()" << endl;
#endif
fScene.endSending();
}
void G4VRML1FileView::FinishView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1FileView::FinishView()" << endl;
#endif
}
#endif
@@ -0,0 +1,78 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML1FileViewer.cc,v 1.2 1999/01/11 00:48:07 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRMLView.cc
// Satoshi Tanaka & Yasuhide Sawada
//=================//
#ifdef G4VIS_BUILD_VRMLFILE_DRIVER
//=================//
//#define DEBUG_FR_VIEW
#include "G4Scene.hh"
#include "G4VRML1FileViewer.hh"
#include "G4VRML1FileSceneHandler.hh"
#include "G4VRML1File.hh"
#include "G4ios.hh"
G4VRML1FileViewer::G4VRML1FileViewer(G4VRML1FileSceneHandler& scene,
const G4String& name) :
G4VViewer(scene, scene.IncrementViewCount(), name), fSceneHandler(scene)
{}
G4VRML1FileViewer::~G4VRML1FileViewer()
{}
void G4VRML1FileViewer::SetView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1FileViewer::SetView()" << endl;
G4cerr << "G4VRML1FileViewer::SetView(); not imlemented. " << endl;
#endif
}
void G4VRML1FileViewer::DrawView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1FileViewer::DrawView()" << endl;
#endif
// Here is a minimal DrawView() function.
NeedKernelVisit();
ProcessView();
FinishView();
}
void G4VRML1FileViewer::ClearView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1File1View::ClearView()" << endl;
G4cerr << "G4VRML1FileViewer::ClearView(); not implemented. " << endl;
#endif
}
void G4VRML1FileViewer::ShowView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1FileViewer::ShowView()" << endl;
#endif
fSceneHandler.endSending();
}
void G4VRML1FileViewer::FinishView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1FileViewer::FinishView()" << endl;
#endif
}
#endif
@@ -5,10 +5,10 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML1Scene.cc,v 2.4 1998/11/09 19:33:24 allison Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML1SceneHandler.cc,v 1.1 1999/01/09 16:27:46 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML1Scene.cc
// G4VRML1SceneHandler.cc
// Yasuhide Sawada and Satoshi Tanaka
//=================//
@@ -37,14 +37,14 @@
#include "G4Circle.hh"
#include "G4Square.hh"
#include "G4VRML1Scene.hh"
#include "G4VRML1View.hh"
#include "G4VRML1SceneHandler.hh"
#include "G4VRML1Viewer.hh"
#include "G4VRML1.hh"
G4VRML1Scene::G4VRML1Scene(G4VRML1& system, const G4String& name) :
G4VScene(system, fSceneIdCount++, name),
G4VRML1SceneHandler::G4VRML1SceneHandler(G4VRML1& system, const G4String& name) :
G4VSceneHandler(system, fSceneIdCount++, name),
fSystem(system),
fDest()
{
@@ -53,24 +53,24 @@ G4VRML1Scene::G4VRML1Scene(G4VRML1& system, const G4String& name) :
}
G4VRML1Scene::~G4VRML1Scene()
G4VRML1SceneHandler::~G4VRML1SceneHandler()
{
#if defined DEBUG_FR_SCENE
G4cerr << "***** ~G4VRML1Scene" << endl;
G4cerr << "***** ~G4VRML1SceneHandler" << endl;
#endif
fSceneCount--;
}
#define G4VRML1SCENE G4VRML1Scene
#define G4VRML1SCENE G4VRML1SceneHandler
#define IS_CONNECTED fDest.isConnected()
#include "G4VRML1SceneFunc.icc"
#include "G4VRML1SceneHandlerFunc.icc"
#undef IS_CONNECTED
#undef G4VRML1SCENE
void G4VRML1Scene::connectPort(G4int max_trial)
void G4VRML1SceneHandler::connectPort(G4int max_trial)
{
G4int trial = 0 ;
int port = fSystem.getPort();
@@ -99,14 +99,14 @@ void G4VRML1Scene::connectPort(G4int max_trial)
}
}
void G4VRML1Scene::closePort()
void G4VRML1SceneHandler::closePort()
{
fDest.close();
G4cerr << "*** INET Connection closed. " << endl;
}
G4int G4VRML1Scene::fSceneIdCount = 0;
G4int G4VRML1Scene::fSceneCount = 0;
G4int G4VRML1SceneHandler::fSceneIdCount = 0;
G4int G4VRML1SceneHandler::fSceneCount = 0;
#endif
@@ -5,10 +5,10 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML1SceneFunc.icc,v 2.3 1998/11/09 03:09:45 stanaka Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML1SceneHandlerFunc.icc,v 1.2 1999/01/11 00:48:08 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML1SceneFunc.icc
// G4VRML1SceneHandlerFunc.icc
// Satoshi Tanaka & Yasuhide Sawada
//#define DEBUG_SCENE_FUNC
@@ -387,7 +387,7 @@ void G4VRML1SCENE::BeginModeling()
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** BeginModeling\n";
#endif
G4VScene::BeginModeling();
G4VSceneHandler::BeginModeling();
beginSending();
}
@@ -396,12 +396,12 @@ void G4VRML1SCENE::EndModeling()
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** EndModeling \n";
#endif
G4VScene::EndModeling();
G4VSceneHandler::EndModeling();
}
void G4VRML1SCENE::BeginPrimitives(const G4Transform3D& objectTransformation)
{
G4VScene::BeginPrimitives (objectTransformation);
G4VSceneHandler::BeginPrimitives (objectTransformation);
fpObjectTransformation = &objectTransformation;
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** BeginPrimitives \n";
@@ -414,7 +414,7 @@ void G4VRML1SCENE::EndPrimitives()
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** EndPrimitives \n";
#endif
G4VScene::EndPrimitives();
G4VSceneHandler::EndPrimitives();
}
void G4VRML1SCENE::SendMaterialNode( const G4VisAttributes* pVA )
@@ -446,7 +446,7 @@ void G4VRML1SCENE::SendMaterialNode( const G4VisAttributes* pVA )
void G4VRML1SCENE::SendMaterialNode()
{
SendMaterialNode
( fpView->GetApplicableVisAttributes (fpVisAttribs) );
( fpViewer->GetApplicableVisAttributes (fpVisAttribs) );
}
@@ -573,9 +573,9 @@ G4double G4VRML1SCENE::GetMarkerHalfSize ( const G4VMarker& mark )
//----- parameters to calculate 3d size from 2d size
const double HALF_SCREEN_SIZE_2D = 300.0 ; // pixels
double zoom_factor = fpView->GetViewParameters().GetZoomFactor() ;
double zoom_factor = fpViewer->GetViewParameters().GetZoomFactor() ;
if ( zoom_factor <= 0.0 ) { zoom_factor = 1.0 ; }
double extent_radius_3d = GetSceneData().GetExtent().GetExtentRadius() ;
double extent_radius_3d = GetScene()->GetExtent().GetExtentRadius() ;
if ( extent_radius_3d <= 0.0 ) { extent_radius_3d = 1.0 ; }
//----- get marker radius in 3D units
@@ -597,7 +597,7 @@ G4double G4VRML1SCENE::GetMarkerHalfSize ( const G4VMarker& mark )
} else {
// local
double mark_radius_2d \
= fpView->GetViewParameters().GetDefaultMarker().GetScreenSize();
= fpViewer->GetViewParameters().GetDefaultMarker().GetScreenSize();
// get mark radius in 3D units
size \
@@ -606,7 +606,7 @@ G4double G4VRML1SCENE::GetMarkerHalfSize ( const G4VMarker& mark )
}
//----- global rescaling
size *= fpView->GetViewParameters().GetGlobalMarkerScale();
size *= fpViewer->GetViewParameters().GetGlobalMarkerScale();
//----- return size
return size ;
@@ -1,78 +0,0 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML1View.cc,v 2.4 1998/11/09 19:33:29 allison Exp $
// GEANT4 tag $Name: geant4-00 $
//
// G4VRMLView.cc
// Yasuhide Sawada & Satoshi Tanaka
//=================//
#ifdef G4VIS_BUILD_VRML_DRIVER
//=================//
//#define DEBUG_FR_VIEW
#include "G4SceneData.hh"
#include "G4VRML1View.hh"
#include "G4VRML1Scene.hh"
#include "G4VRML1.hh"
#include "G4ios.hh"
G4VRML1View::G4VRML1View(G4VRML1Scene& scene, const G4String& name) :
G4VView(scene, scene.IncrementViewCount(), name), fScene(scene)
{}
G4VRML1View::~G4VRML1View()
{}
void G4VRML1View::SetView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1View::SetView()" << endl;
G4cerr << "G4VRML1View::SetView(); not imlemented. " << endl;
#endif
}
void G4VRML1View::DrawView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1View::DrawView()" << endl;
#endif
// Here is a minimal DrawView() function.
NeedKernelVisit();
ProcessView();
FinishView();
}
void G4VRML1View::ClearView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1View::ClearView()" << endl;
G4cerr << "G4VRML1View::ClearView(); not implemented. " << endl;
#endif
}
void G4VRML1View::ShowView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1View::ShowView()" << endl;
#endif
fScene.endSending();
}
void G4VRML1View::FinishView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1View::FinishView()" << endl;
//G4cerr << "G4VRML1View::FinishView(); not implemented. " << endl;
#endif
//fScene.endSending();
}
#endif
@@ -0,0 +1,78 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML1Viewer.cc,v 1.2 1999/01/11 00:48:09 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRMLView.cc
// Yasuhide Sawada & Satoshi Tanaka
//=================//
#ifdef G4VIS_BUILD_VRML_DRIVER
//=================//
//#define DEBUG_FR_VIEW
#include "G4Scene.hh"
#include "G4VRML1Viewer.hh"
#include "G4VRML1SceneHandler.hh"
#include "G4VRML1.hh"
#include "G4ios.hh"
G4VRML1Viewer::G4VRML1Viewer(G4VRML1SceneHandler& scene, const G4String& name) :
G4VViewer(scene, scene.IncrementViewCount(), name), fSceneHandler(scene)
{}
G4VRML1Viewer::~G4VRML1Viewer()
{}
void G4VRML1Viewer::SetView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1Viewer::SetView()" << endl;
G4cerr << "G4VRML1Viewer::SetView(); not imlemented. " << endl;
#endif
}
void G4VRML1Viewer::DrawView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1Viewer::DrawView()" << endl;
#endif
// Here is a minimal DrawView() function.
NeedKernelVisit();
ProcessView();
FinishView();
}
void G4VRML1Viewer::ClearView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1Viewer::ClearView()" << endl;
G4cerr << "G4VRML1Viewer::ClearView(); not implemented. " << endl;
#endif
}
void G4VRML1Viewer::ShowView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1Viewer::ShowView()" << endl;
#endif
fSceneHandler.endSending();
}
void G4VRML1Viewer::FinishView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML1Viewer::FinishView()" << endl;
//G4cerr << "G4VRML1Viewer::FinishView(); not implemented. " << endl;
#endif
//fSceneHandler.endSending();
}
#endif
+13 -13
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML2.cc,v 2.2 1998/11/09 19:33:31 allison Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML2.cc,v 1.3 1999/01/11 00:48:09 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML2.cc
// Satoshi Tanaka & Yasuhide Sawada
@@ -19,11 +19,11 @@
#include <stdio.h> // sscanf
#include <stdlib.h> // getenv
#include "G4VScene.hh"
#include "G4VSceneHandler.hh"
#include "G4VRML2.hh"
#include "G4VRML2Scene.hh"
#include "G4VRML2View.hh"
#include "G4VRML2SceneHandler.hh"
#include "G4VRML2Viewer.hh"
#include "G4FRClient.hh"
@@ -51,24 +51,24 @@ G4VRML2::~G4VRML2()
}
G4VScene* G4VRML2::CreateScene(const G4String& name)
G4VSceneHandler* G4VRML2::CreateSceneHandler(const G4String& name)
{
G4VScene *p = NULL;
G4VSceneHandler *p = NULL;
p = new G4VRML2Scene(*this, name);
p = new G4VRML2SceneHandler(*this, name);
G4cout << G4VRML2Scene::GetSceneCount()
G4cout << G4VRML2SceneHandler::GetSceneCount()
<< " " << fName << " scenes extanct." << endl;
return p;
}
G4VView* G4VRML2::CreateView(G4VScene& scene, const G4String& name)
G4VViewer* G4VRML2::CreateViewer(G4VSceneHandler& scene, const G4String& name)
{
G4VView* pView = NULL;
G4VViewer* pView = NULL;
G4VRML2Scene* pScene = (G4VRML2Scene*)&scene;
pView = new G4VRML2View(*pScene, name);
G4VRML2SceneHandler* pScene = (G4VRML2SceneHandler*)&scene;
pView = new G4VRML2Viewer(*pScene, name);
return pView;
}
+13 -13
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML2File.cc,v 2.2 1998/11/09 19:33:33 allison Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML2File.cc,v 1.3 1999/01/11 00:48:10 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML2File.cc
// Satoshi Tanaka & Yasuhide Sawada
@@ -19,11 +19,11 @@
#include <stdio.h> // sscanf
#include <stdlib.h> // getenv
#include "G4VScene.hh"
#include "G4VSceneHandler.hh"
#include "G4VRML2File.hh"
#include "G4VRML2FileScene.hh"
#include "G4VRML2FileView.hh"
#include "G4VRML2FileSceneHandler.hh"
#include "G4VRML2FileViewer.hh"
#include "G4FRClient.hh"
@@ -38,24 +38,24 @@ G4VRML2File::~G4VRML2File()
}
G4VScene* G4VRML2File::CreateScene(const G4String& name)
G4VSceneHandler* G4VRML2File::CreateSceneHandler(const G4String& name)
{
G4VScene *p = NULL;
G4VSceneHandler *p = NULL;
p = new G4VRML2FileScene(*this, name);
p = new G4VRML2FileSceneHandler(*this, name);
G4cout << G4VRML2FileScene::GetSceneCount()
G4cout << G4VRML2FileSceneHandler::GetSceneCount()
<< " " << fName << " scenes extanct." << endl;
return p;
}
G4VView* G4VRML2File::CreateView(G4VScene& scene, const G4String& name)
G4VViewer* G4VRML2File::CreateViewer(G4VSceneHandler& scene, const G4String& name)
{
G4VView* pView = NULL;
G4VViewer* pView = NULL;
G4VRML2FileScene* pScene = (G4VRML2FileScene*)&scene;
pView = new G4VRML2FileView(*pScene, name);
G4VRML2FileSceneHandler* pScene = (G4VRML2FileSceneHandler*)&scene;
pView = new G4VRML2FileViewer(*pScene, name);
return pView;
}
@@ -5,10 +5,10 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML2FileScene.cc,v 2.6 1998/12/07 06:40:19 stanaka Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML2FileSceneHandler.cc,v 1.1 1999/01/09 16:27:50 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML2FileScene.cc
// G4VRML2FileSceneHandler.cc
// Satoshi Tanaka & Yasuhide Sawada
//=================//
@@ -40,8 +40,8 @@
#include "G4Circle.hh"
#include "G4Square.hh"
#include "G4VRML2FileScene.hh"
#include "G4VRML2FileView.hh"
#include "G4VRML2FileSceneHandler.hh"
#include "G4VRML2FileViewer.hh"
#include "G4VRML2File.hh"
// CONST
@@ -53,8 +53,8 @@ const char NO_VRML_VIEWER [] = "NONE";
const char VRMLFILE_DEST_DIR [] = "G4VRMLFILE_DEST_DIR";
G4VRML2FileScene::G4VRML2FileScene(G4VRML2File& system, const G4String& name) :
G4VScene(system, fSceneIdCount++, name),
G4VRML2FileSceneHandler::G4VRML2FileSceneHandler(G4VRML2File& system, const G4String& name) :
G4VSceneHandler(system, fSceneIdCount++, name),
fSystem(system),
fDest() ,
fFlagDestOpen( false ),
@@ -100,23 +100,23 @@ G4VRML2FileScene::G4VRML2FileScene(G4VRML2File& system, const G4String& name) :
}
G4VRML2FileScene::~G4VRML2FileScene()
G4VRML2FileSceneHandler::~G4VRML2FileSceneHandler()
{
#if defined DEBUG_FR_SCENE
G4cerr << "***** ~G4VRML2FileScene" << endl;
G4cerr << "***** ~G4VRML2FileSceneHandler" << endl;
#endif
fSceneCount--;
}
#define G4VRML2SCENE G4VRML2FileScene
#define G4VRML2SCENE G4VRML2FileSceneHandler
#define IS_CONNECTED this->isConnected()
#include "G4VRML2SceneFunc.icc"
#include "G4VRML2SceneHandlerFunc.icc"
#undef IS_CONNECTED
#undef G4VRML2SCENE
void G4VRML2FileScene::connectPort()
void G4VRML2FileSceneHandler::connectPort()
{
// g4.wrl, g4_1.wrl, ..., g4_MAX_FILE_INDEX.wrl
const int MAX_FILE_INDEX = fMaxFileNum - 1 ;
@@ -171,7 +171,7 @@ void G4VRML2FileScene::connectPort()
}
void G4VRML2FileScene::closePort()
void G4VRML2FileSceneHandler::closePort()
{
char command[256] ;
char viewer [256] ;
@@ -200,7 +200,7 @@ void G4VRML2FileScene::closePort()
}
}
G4int G4VRML2FileScene::fSceneIdCount = 0;
G4int G4VRML2FileScene::fSceneCount = 0;
G4int G4VRML2FileSceneHandler::fSceneIdCount = 0;
G4int G4VRML2FileSceneHandler::fSceneCount = 0;
#endif
@@ -5,10 +5,10 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML2FileView.cc,v 2.2 1998/11/09 19:33:36 allison Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML2FileViewer.cc,v 1.2 1999/01/11 00:48:11 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML2FileView.cc
// G4VRML2FileViewer.cc
// Satoshi Tanaka & Yasuhide Sawada
//=================//
@@ -20,30 +20,30 @@
#include <math.h>
#include "G4SceneData.hh"
#include "G4VRML2FileView.hh"
#include "G4VRML2FileScene.hh"
#include "G4Scene.hh"
#include "G4VRML2FileViewer.hh"
#include "G4VRML2FileSceneHandler.hh"
#include "G4VRML2File.hh"
#include "G4ios.hh"
G4VRML2FileView::G4VRML2FileView(G4VRML2FileScene& scene,
G4VRML2FileViewer::G4VRML2FileViewer(G4VRML2FileSceneHandler& scene,
const G4String& name) :
G4VView(scene, scene.IncrementViewCount(), name),
fScene(scene),
G4VViewer(scene, scene.IncrementViewCount(), name),
fSceneHandler(scene),
fDest(scene.fDest)
{
fViewHalfAngle = 0.5 * 0.785398 ; // 0.5 * 45*deg
fsin_VHA = sin ( fViewHalfAngle ) ;
}
G4VRML2FileView::~G4VRML2FileView()
G4VRML2FileViewer::~G4VRML2FileViewer()
{}
void G4VRML2FileView::SetView()
void G4VRML2FileViewer::SetView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2FileView::SetView()" << endl;
G4cerr << "G4VRML2FileView::SetView(); not imlemented. " << endl;
G4cerr << "***** G4VRML2FileViewer::SetView()" << endl;
G4cerr << "G4VRML2FileViewer::SetView(); not imlemented. " << endl;
#endif
// Do nothing, since VRML a browser is running as a different process.
@@ -51,14 +51,14 @@ void G4VRML2FileView::SetView()
}
void G4VRML2FileView::DrawView()
void G4VRML2FileViewer::DrawView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2FileView::DrawView()" << endl;
G4cerr << "***** G4VRML2FileViewer::DrawView()" << endl;
#endif
// Open VRML2 file and output header comments
fScene.beginSending() ;
fSceneHandler.beginSending() ;
// Viewpoint node
SendViewParameters();
@@ -69,44 +69,44 @@ void G4VRML2FileView::DrawView()
FinishView();
}
void G4VRML2FileView::ClearView(void)
void G4VRML2FileViewer::ClearView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2File1View::ClearView()" << endl;
G4cerr << "G4VRML2FileView::ClearView(); not implemented. " << endl;
G4cerr << "G4VRML2FileViewer::ClearView(); not implemented. " << endl;
#endif
}
void G4VRML2FileView::ShowView(void)
void G4VRML2FileViewer::ShowView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2FileView::ShowView()" << endl;
G4cerr << "***** G4VRML2FileViewer::ShowView()" << endl;
#endif
fScene.endSending();
fSceneHandler.endSending();
}
void G4VRML2FileView::FinishView(void)
void G4VRML2FileViewer::FinishView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2FileView::FinishView()" << endl;
G4cerr << "***** G4VRML2FileViewer::FinishView()" << endl;
#endif
}
void G4VRML2FileView::SendViewParameters ()
void G4VRML2FileViewer::SendViewParameters ()
{
// Calculates view representation based on extent of object being
// viewed and (initial) direction of camera. (Note: it can change
// later due to user interaction via visualization system's GUI.)
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2FileView::SendViewParameters()\n";
G4cerr << "***** G4VRML2FileViewer::SendViewParameters()\n";
#endif
// error recovery
if ( fsin_VHA < 1.0e-6 ) { return ; }
// camera distance
G4double extent_radius = fScene.GetSceneData().GetExtent().GetExtentRadius();
G4double extent_radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
G4double camera_distance = extent_radius / fsin_VHA ;
// camera position on Z axis
@@ -5,10 +5,10 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML2Scene.cc,v 2.4 1998/11/29 22:00:34 stanaka Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML2SceneHandler.cc,v 1.1 1999/01/09 16:27:53 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML2Scene.cc
// G4VRML2SceneHandler.cc
// Satoshi Tanaka & Yasuhide Sawada
//=================//
@@ -38,14 +38,14 @@
#include "G4Circle.hh"
#include "G4Square.hh"
#include "G4VRML2Scene.hh"
#include "G4VRML2View.hh"
#include "G4VRML2SceneHandler.hh"
#include "G4VRML2Viewer.hh"
#include "G4VRML2.hh"
G4VRML2Scene::G4VRML2Scene(G4VRML2& system, const G4String& name) :
G4VScene(system, fSceneIdCount++, name),
G4VRML2SceneHandler::G4VRML2SceneHandler(G4VRML2& system, const G4String& name) :
G4VSceneHandler(system, fSceneIdCount++, name),
fSystem(system),
fDest(),
fPVPickable ( false )
@@ -68,24 +68,24 @@ G4VRML2Scene::G4VRML2Scene(G4VRML2& system, const G4String& name) :
}
G4VRML2Scene::~G4VRML2Scene()
G4VRML2SceneHandler::~G4VRML2SceneHandler()
{
#if defined DEBUG_FR_SCENE
G4cerr << "***** ~G4VRML2Scene" << endl;
G4cerr << "***** ~G4VRML2SceneHandler" << endl;
#endif
fSceneCount--;
}
#define G4VRML2SCENE G4VRML2Scene
#define G4VRML2SCENE G4VRML2SceneHandler
#define IS_CONNECTED fDest.isConnected()
#include "G4VRML2SceneFunc.icc"
#include "G4VRML2SceneHandlerFunc.icc"
#undef IS_CONNECTED
#undef G4VRML2SCENE
void G4VRML2Scene::connectPort(G4int max_trial)
void G4VRML2SceneHandler::connectPort(G4int max_trial)
{
G4int trial = 0 ;
int port = fSystem.getPort();
@@ -114,14 +114,14 @@ void G4VRML2Scene::connectPort(G4int max_trial)
}
}
void G4VRML2Scene::closePort()
void G4VRML2SceneHandler::closePort()
{
fDest.close();
G4cerr << "*** INET Connection closed. " << endl;
}
G4int G4VRML2Scene::fSceneIdCount = 0;
G4int G4VRML2Scene::fSceneCount = 0;
G4int G4VRML2SceneHandler::fSceneIdCount = 0;
G4int G4VRML2SceneHandler::fSceneCount = 0;
#endif
@@ -5,10 +5,10 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML2SceneFunc.icc,v 2.3 1998/11/29 22:00:34 stanaka Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML2SceneHandlerFunc.icc,v 1.2 1999/01/11 00:48:11 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML2SceneFunc.icc
// G4VRML2SceneHandlerFunc.icc
// Satoshi Tanaka & Yasuhide Sawada
//#define DEBUG_SCENE_FUNC
@@ -18,7 +18,7 @@ void G4VRML2SCENE::AddThis(const G4Trd& trd)
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** AddThis trd\n";
#endif
G4VScene::AddThis(trd);
G4VSceneHandler::AddThis(trd);
}
void G4VRML2SCENE::AddThis(const G4Trap& trap)
@@ -26,7 +26,7 @@ void G4VRML2SCENE::AddThis(const G4Trap& trap)
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** AddThis trap\n";
#endif
G4VScene::AddThis(trap);
G4VSceneHandler::AddThis(trap);
}
void G4VRML2SCENE::AddThis(const G4Para& para)
@@ -34,7 +34,7 @@ void G4VRML2SCENE::AddThis(const G4Para& para)
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** AddThis para\n";
#endif
G4VScene::AddThis(para);
G4VSceneHandler::AddThis(para);
}
void G4VRML2SCENE::AddThis(const G4Torus& torus )
@@ -42,7 +42,7 @@ void G4VRML2SCENE::AddThis(const G4Torus& torus )
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** AddThis torus\n";
#endif
G4VScene::AddThis(torus);
G4VSceneHandler::AddThis(torus);
}
@@ -51,7 +51,7 @@ void G4VRML2SCENE::AddThis(const G4VSolid& vsolid)
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** AddThis vsolid\n";
#endif
G4VScene::AddThis(vsolid);
G4VSceneHandler::AddThis(vsolid);
}
void G4VRML2SCENE::AddThis(const G4Tubs& tubs)
@@ -59,7 +59,7 @@ void G4VRML2SCENE::AddThis(const G4Tubs& tubs)
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** AddThis tubs\n";
#endif
G4VScene::AddThis(tubs) ;
G4VSceneHandler::AddThis(tubs) ;
}
@@ -69,7 +69,7 @@ void G4VRML2SCENE::AddThis(const G4Cons& cons)
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** AddThis cons\n";
#endif
G4VScene::AddThis(cons) ;
G4VSceneHandler::AddThis(cons) ;
}
void G4VRML2SCENE::AddThis(const G4Box& box)
@@ -77,7 +77,7 @@ void G4VRML2SCENE::AddThis(const G4Box& box)
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** AddThis box\n";
#endif
G4VScene::AddThis(box) ;
G4VSceneHandler::AddThis(box) ;
}
@@ -86,7 +86,7 @@ void G4VRML2SCENE::AddThis(const G4Sphere& sphere)
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** AddThis sphere\n";
#endif
G4VScene::AddThis(sphere) ;
G4VSceneHandler::AddThis(sphere) ;
}
void G4VRML2SCENE::AddPrimitive(const G4Polyline& polyline)
@@ -363,7 +363,7 @@ void G4VRML2SCENE::BeginModeling()
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** BeginModeling\n";
#endif
G4VScene::BeginModeling();
G4VSceneHandler::BeginModeling();
beginSending(); // error recovery:
// This function should be already called in
// DrawView() of the View class
@@ -375,12 +375,12 @@ void G4VRML2SCENE::EndModeling()
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** EndModeling \n";
#endif
G4VScene::EndModeling();
G4VSceneHandler::EndModeling();
}
void G4VRML2SCENE::BeginPrimitives(const G4Transform3D& objectTransformation)
{
G4VScene::BeginPrimitives (objectTransformation);
G4VSceneHandler::BeginPrimitives (objectTransformation);
fpObjectTransformation = &objectTransformation;
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** BeginPrimitives \n";
@@ -396,7 +396,7 @@ void G4VRML2SCENE::EndPrimitives()
#if defined DEBUG_SCENE_FUNC
G4cerr << "***** EndPrimitives \n";
#endif
G4VScene::EndPrimitives();
G4VSceneHandler::EndPrimitives();
}
void G4VRML2SCENE::SendMaterialNode( const G4VisAttributes* pVA )
@@ -406,7 +406,7 @@ void G4VRML2SCENE::SendMaterialNode( const G4VisAttributes* pVA )
G4double TRANSPARENCY = GetPVTransparency() ;
// Wireframe or not
const G4ViewParameters& cur_view_param = fpView -> GetViewParameters ();
const G4ViewParameters& cur_view_param = fpViewer -> GetViewParameters ();
if (pVA->IsForceDrawingStyle() &&
(pVA->GetForcedDrawingStyle() == G4VisAttributes::wireframe))
{
@@ -463,7 +463,7 @@ void G4VRML2SCENE::SendMaterialNode( const G4VisAttributes* pVA )
void G4VRML2SCENE::SendMaterialNode()
{
SendMaterialNode
( fpView->GetApplicableVisAttributes (fpVisAttribs) );
( fpViewer->GetApplicableVisAttributes (fpVisAttribs) );
}
@@ -536,9 +536,9 @@ G4double G4VRML2SCENE::GetMarkerHalfSize ( const G4VMarker& mark )
//----- parameters to calculate 3d size from 2d size
const double HALF_SCREEN_SIZE_2D = 300.0 ; // pixels
double zoom_factor = fpView->GetViewParameters().GetZoomFactor() ;
double zoom_factor = fpViewer->GetViewParameters().GetZoomFactor() ;
if ( zoom_factor <= 0.0 ) { zoom_factor = 1.0 ; }
double extent_radius_3d = GetSceneData().GetExtent().GetExtentRadius() ;
double extent_radius_3d = GetScene()->GetExtent().GetExtentRadius() ;
if ( extent_radius_3d <= 0.0 ) { extent_radius_3d = 1.0 ; }
//----- get marker radius in 3D units
@@ -560,7 +560,7 @@ G4double G4VRML2SCENE::GetMarkerHalfSize ( const G4VMarker& mark )
} else {
// local
double mark_radius_2d \
= fpView->GetViewParameters().GetDefaultMarker().GetScreenSize();
= fpViewer->GetViewParameters().GetDefaultMarker().GetScreenSize();
// get mark radius in 3D units
size \
@@ -569,7 +569,7 @@ G4double G4VRML2SCENE::GetMarkerHalfSize ( const G4VMarker& mark )
}
//----- global rescaling
size *= fpView->GetViewParameters().GetGlobalMarkerScale();
size *= fpViewer->GetViewParameters().GetGlobalMarkerScale();
//----- return size
return size ;
@@ -5,10 +5,10 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VRML2View.cc,v 2.2 1998/11/09 19:33:40 allison Exp $
// GEANT4 tag $Name: geant4-00 $
// $Id: G4VRML2Viewer.cc,v 1.2 1999/01/11 00:48:12 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
// G4VRML2View.cc
// G4VRML2Viewer.cc
// Satoshi Tanaka & Yasuhide Sawada
//=================//
@@ -20,29 +20,29 @@
#include <math.h>
#include "G4SceneData.hh"
#include "G4VRML2View.hh"
#include "G4VRML2Scene.hh"
#include "G4Scene.hh"
#include "G4VRML2Viewer.hh"
#include "G4VRML2SceneHandler.hh"
#include "G4VRML2.hh"
#include "G4ios.hh"
G4VRML2View::G4VRML2View(G4VRML2Scene& scene, const G4String& name) :
G4VView(scene, scene.IncrementViewCount(), name),
fScene(scene),
G4VRML2Viewer::G4VRML2Viewer(G4VRML2SceneHandler& scene, const G4String& name) :
G4VViewer(scene, scene.IncrementViewCount(), name),
fSceneHandler(scene),
fDest(scene.fDest)
{
fViewHalfAngle = 0.5 * 0.785398 ; // 0.5 * 45*deg
fsin_VHA = sin ( fViewHalfAngle ) ;
}
G4VRML2View::~G4VRML2View()
G4VRML2Viewer::~G4VRML2Viewer()
{}
void G4VRML2View::SetView()
void G4VRML2Viewer::SetView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2View::SetView()" << endl;
G4cerr << "G4VRML2View::SetView(); not imlemented. " << endl;
G4cerr << "***** G4VRML2Viewer::SetView()" << endl;
G4cerr << "G4VRML2Viewer::SetView(); not imlemented. " << endl;
#endif
// Do nothing, since VRML a browser is running as a different process.
@@ -51,13 +51,13 @@ void G4VRML2View::SetView()
}
void G4VRML2View::DrawView()
void G4VRML2Viewer::DrawView()
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2View::DrawView()" << endl;
G4cerr << "***** G4VRML2Viewer::DrawView()" << endl;
#endif
// Open VRML2 file and output header comments
fScene.beginSending() ;
fSceneHandler.beginSending() ;
// Viewpoint node
SendViewParameters();
@@ -68,45 +68,45 @@ void G4VRML2View::DrawView()
FinishView();
}
void G4VRML2View::ClearView(void)
void G4VRML2Viewer::ClearView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2View::ClearView()" << endl;
G4cerr << "G4VRML2View::ClearView(); not implemented. " << endl;
G4cerr << "***** G4VRML2Viewer::ClearView()" << endl;
G4cerr << "G4VRML2Viewer::ClearView(); not implemented. " << endl;
#endif
}
void G4VRML2View::ShowView(void)
void G4VRML2Viewer::ShowView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2View::ShowView()" << endl;
G4cerr << "***** G4VRML2Viewer::ShowView()" << endl;
#endif
fScene.endSending();
fSceneHandler.endSending();
}
void G4VRML2View::FinishView(void)
void G4VRML2Viewer::FinishView(void)
{
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2View::FinishView()" << endl;
//G4cerr << "G4VRML2View::FinishView(); not implemented. " << endl;
G4cerr << "***** G4VRML2Viewer::FinishView()" << endl;
//G4cerr << "G4VRML2Viewer::FinishView(); not implemented. " << endl;
#endif
//fScene.endSending();
//fSceneHandler.endSending();
}
void G4VRML2View::SendViewParameters ()
void G4VRML2Viewer::SendViewParameters ()
{
// Calculates view representation based on extent of object being
// viewed and (initial) direction of camera. (Note: it can change
// later due to user interaction via visualization system's GUI.)
#if defined DEBUG_FR_VIEW
G4cerr << "***** G4VRML2View::SendViewParameters()\n";
G4cerr << "***** G4VRML2Viewer::SendViewParameters()\n";
#endif
// error recovery
if ( fsin_VHA < 1.0e-6 ) { return ; }
// camera distance
G4double extent_radius = fScene.GetSceneData().GetExtent().GetExtentRadius();
G4double extent_radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
G4double camera_distance = extent_radius / fsin_VHA ;
// camera position on Z axis