Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 2.3 1998/07/07 17:11:18 allison Exp $
|
||||
# $Id: GNUmakefile,v 1.2 1999/04/15 15:28:00 johna Exp $
|
||||
|
||||
# lib name
|
||||
name := G4VRML
|
||||
@@ -17,6 +17,7 @@ CPPFLAGS += -I$(G4BASE)/global/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/global/HEPGeometry/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/solids/CSG/include
|
||||
CPPFLAGS += -I$(G4BASE)/graphics_reps/include
|
||||
CPPFLAGS += -I$(G4BASE)/intercoms/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/volumes/include
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/VRML/include
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: g4mini.java,v 2.0 1998/07/02 16:47:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: g4mini.java,v 1.1 1999/01/07 16:15:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: g4vrmlview.java,v 2.1 1998/11/29 22:00:10 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: g4vrmlview.java,v 1.1 1999/01/07 16:15:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: FRClient.h,v 2.0 1998/07/02 16:48:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: FRClient.h,v 1.1 1999/01/07 16:15:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// FRClient.h
|
||||
// FukuiRenderer Client
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRClient.hh,v 2.0 1998/07/02 16:47:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FRClient.hh,v 1.2 1999/01/09 16:27:29 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4FRClient.hh
|
||||
// Yasuhide Sawada and Satoshi Tanaka
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1.hh,v 2.3 1998/11/09 19:30:45 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML1.hh,v 1.5 1999/05/10 15:39:03 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML1.hh
|
||||
// Yasuhide Sawada and Satoshi Tanaka
|
||||
|
||||
#if defined (G4VIS_BUILD_VRML_DRIVER) || (G4VIS_USE_VRML)
|
||||
#if defined (G4VIS_BUILD_VRML_DRIVER) || defined (G4VIS_USE_VRML)
|
||||
|
||||
#ifndef G4VRML1_HH
|
||||
#define G4VRML1_HH
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
#include "FRClient.h"
|
||||
|
||||
class G4VScene;
|
||||
class G4VSceneHandler;
|
||||
|
||||
//#define FR_VRML_DEFAULT_PORT 40801
|
||||
//#define FR_VRML_PORT_ENV "FR_VRML_PORT"
|
||||
@@ -30,9 +30,9 @@ class G4VScene;
|
||||
class G4VRML1: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4VRML1();
|
||||
~G4VRML1();
|
||||
G4VScene* CreateScene(const G4String& name = "");
|
||||
G4VView* CreateView(G4VScene&, const G4String& name = "");
|
||||
virtual ~G4VRML1();
|
||||
G4VSceneHandler* CreateSceneHandler(const G4String& name = "");
|
||||
G4VViewer* CreateViewer(G4VSceneHandler&, const G4String& name = "");
|
||||
|
||||
public:
|
||||
const G4String& getHostName() { return fHostName; }
|
||||
|
||||
@@ -5,27 +5,27 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1File.hh,v 2.3 1998/11/09 19:32:48 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML1File.hh,v 1.5 1999/05/10 15:39:05 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML1File.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#if defined (G4VIS_BUILD_VRMLFILE_DRIVER) || (G4VIS_USE_VRMLFILE)
|
||||
#if defined (G4VIS_BUILD_VRMLFILE_DRIVER) || defined (G4VIS_USE_VRMLFILE)
|
||||
|
||||
#ifndef G4VRML1FILE_HH
|
||||
#define G4VRML1FILE_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4VScene;
|
||||
class G4VSceneHandler;
|
||||
|
||||
class G4VRML1File: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4VRML1File();
|
||||
~G4VRML1File();
|
||||
G4VScene* CreateScene(const G4String& name = "");
|
||||
G4VView* CreateView(G4VScene&, const G4String& name = "");
|
||||
virtual ~G4VRML1File();
|
||||
G4VSceneHandler* CreateSceneHandler(const G4String& name = "");
|
||||
G4VViewer* CreateViewer(G4VSceneHandler&, const G4String& name = "");
|
||||
|
||||
};
|
||||
|
||||
|
||||
+10
-10
@@ -5,35 +5,35 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1FileScene.hh,v 2.6 1998/12/04 09:10:54 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML1FileSceneHandler.hh,v 1.2 1999/05/10 15:39:06 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML1FileScene.hh
|
||||
// G4VRML1FileSceneHandler.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
|
||||
#ifndef G4VRML1FILE_SCENE_HH
|
||||
#define G4VRML1FILE_SCENE_HH
|
||||
#ifndef G4VRML1FILE_SCENE_HANDLER_HH
|
||||
#define G4VRML1FILE_SCENE_HANDLER_HH
|
||||
|
||||
#include <rw/tvhdict.h>
|
||||
#include <fstream.h>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VScene.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
|
||||
class G4VRML1File;
|
||||
class G4VisAttributes;
|
||||
|
||||
class G4VRML1FileScene: public G4VScene {
|
||||
class G4VRML1FileSceneHandler: public G4VSceneHandler {
|
||||
|
||||
|
||||
// methods (public)
|
||||
public:
|
||||
G4VRML1FileScene(G4VRML1File& system, const G4String& name = "");
|
||||
~G4VRML1FileScene();
|
||||
G4VRML1FileSceneHandler(G4VRML1File& system, const G4String& name = "");
|
||||
virtual ~G4VRML1FileSceneHandler();
|
||||
void AddThis(const G4Box&);
|
||||
void AddThis(const G4Cons&);
|
||||
void AddThis(const G4Tubs&);
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
void AddPrimitive(const G4Circle&);
|
||||
void AddPrimitive(const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
{ G4VSceneHandler::AddPrimitive (polymarker); }
|
||||
|
||||
void ClearStore();
|
||||
|
||||
+11
-11
@@ -5,26 +5,26 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1FileView.hh,v 2.3 1998/11/09 19:32:52 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML1FileViewer.hh,v 1.3 1999/05/10 15:39:07 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML1FileView.hh
|
||||
// G4VRML1FileViewer.hh
|
||||
// Satoshi Tanaka and Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
|
||||
#ifndef G4VRML1FILE_VIEW_HH
|
||||
#define G4VRML1FILE_VIEW_HH
|
||||
#ifndef G4VRML1FILE_VIEWER_HH
|
||||
#define G4VRML1FILE_VIEWER_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VRML1FileScene;
|
||||
class G4VRML1FileSceneHandler;
|
||||
|
||||
class G4VRML1FileView: public G4VView {
|
||||
class G4VRML1FileViewer: public G4VViewer {
|
||||
public:
|
||||
G4VRML1FileView(G4VRML1FileScene& scene, const G4String& name = "");
|
||||
~G4VRML1FileView();
|
||||
G4VRML1FileViewer(G4VRML1FileSceneHandler& scene, const G4String& name = "");
|
||||
virtual ~G4VRML1FileViewer();
|
||||
void ClearView();
|
||||
void DrawView();
|
||||
void ShowView();
|
||||
@@ -33,7 +33,7 @@ private:
|
||||
void SetView();
|
||||
|
||||
private:
|
||||
G4VRML1FileScene& fScene; // Reference to Graphics Scene for this view.
|
||||
G4VRML1FileSceneHandler& fSceneHandler; // Reference to Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif //G4VRML1File_VIEW_HH
|
||||
+10
-10
@@ -5,36 +5,36 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1Scene.hh,v 2.4 1998/11/09 19:32:58 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML1SceneHandler.hh,v 1.2 1999/05/10 15:39:08 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML1Scene.hh
|
||||
// G4VRML1SceneHandler.hh
|
||||
// Yasuhide Sawada & Satoshi Tanaka
|
||||
|
||||
#ifdef G4VIS_BUILD_VRML_DRIVER
|
||||
|
||||
#ifndef G4VRML1_SCENE_HH
|
||||
#define G4VRML1_SCENE_HH
|
||||
#ifndef G4VRML1_SCENE_HANDLER_HH
|
||||
#define G4VRML1_SCENE_HANDLER_HH
|
||||
|
||||
#include <rw/tvhdict.h>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VScene.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
#include "G4FRClient.hh"
|
||||
|
||||
class G4VRML1;
|
||||
class G4VisAttributes;
|
||||
|
||||
class G4VRML1Scene: public G4VScene {
|
||||
class G4VRML1SceneHandler: public G4VSceneHandler {
|
||||
|
||||
enum { MAX_CONNECTION_TRIAL = 10 } ;
|
||||
|
||||
// methods (public)
|
||||
public:
|
||||
G4VRML1Scene(G4VRML1& system, const G4String& name = "");
|
||||
~G4VRML1Scene();
|
||||
G4VRML1SceneHandler(G4VRML1& system, const G4String& name = "");
|
||||
virtual ~G4VRML1SceneHandler();
|
||||
void AddThis(const G4Box&);
|
||||
void AddThis(const G4Cons&);
|
||||
void AddThis(const G4Tubs&);
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
void AddPrimitive(const G4Circle&);
|
||||
void AddPrimitive(const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
{ G4VSceneHandler::AddPrimitive (polymarker); }
|
||||
|
||||
void ClearStore();
|
||||
|
||||
+11
-11
@@ -5,26 +5,26 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML1View.hh,v 2.3 1998/11/09 19:32:59 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML1Viewer.hh,v 1.3 1999/05/10 15:39:09 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML1View.hh
|
||||
// G4VRML1Viewer.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRML_DRIVER
|
||||
|
||||
#ifndef G4VRML1_VIEW_HH
|
||||
#define G4VRML1_VIEW_HH
|
||||
#ifndef G4VRML1_VIEWER_HH
|
||||
#define G4VRML1_VIEWER_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VRML1Scene;
|
||||
class G4VRML1SceneHandler;
|
||||
|
||||
class G4VRML1View: public G4VView {
|
||||
class G4VRML1Viewer: public G4VViewer {
|
||||
public:
|
||||
G4VRML1View(G4VRML1Scene& scene, const G4String& name = "");
|
||||
~G4VRML1View();
|
||||
G4VRML1Viewer(G4VRML1SceneHandler& scene, const G4String& name = "");
|
||||
virtual ~G4VRML1Viewer();
|
||||
void ClearView();
|
||||
void DrawView();
|
||||
void ShowView();
|
||||
@@ -33,7 +33,7 @@ private:
|
||||
void SetView();
|
||||
|
||||
private:
|
||||
G4VRML1Scene& fScene; // Reference to Graphics Scene for this view.
|
||||
G4VRML1SceneHandler& fSceneHandler; // Reference to Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif //G4VRML1_VIEW_HH
|
||||
@@ -5,13 +5,13 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2.hh,v 2.2 1998/11/09 19:33:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML2.hh,v 1.5 1999/05/10 15:39:10 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML2.hh
|
||||
// Satoshi Tanaka and Yasuhide Sawada
|
||||
|
||||
#if defined (G4VIS_BUILD_VRML_DRIVER) || (G4VIS_USE_VRML)
|
||||
#if defined (G4VIS_BUILD_VRML_DRIVER) || defined (G4VIS_USE_VRML)
|
||||
|
||||
#ifndef G4VRML2_HH
|
||||
#define G4VRML2_HH
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
#include "FRClient.h"
|
||||
|
||||
class G4VScene;
|
||||
class G4VSceneHandler;
|
||||
|
||||
#include "G4VRMLNetConfig.hh"
|
||||
//#define FR_VRML_DEFAULT_PORT 40801
|
||||
@@ -29,9 +29,9 @@ class G4VScene;
|
||||
class G4VRML2: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4VRML2();
|
||||
~G4VRML2();
|
||||
G4VScene* CreateScene(const G4String& name = "");
|
||||
G4VView* CreateView(G4VScene&, const G4String& name = "");
|
||||
virtual ~G4VRML2();
|
||||
G4VSceneHandler* CreateSceneHandler(const G4String& name = "");
|
||||
G4VViewer* CreateViewer(G4VSceneHandler&, const G4String& name = "");
|
||||
|
||||
public:
|
||||
const G4String& getHostName() { return fHostName; }
|
||||
|
||||
@@ -5,27 +5,27 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2File.hh,v 2.2 1998/11/09 19:33:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML2File.hh,v 1.5 1999/05/10 15:39:11 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML2File.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#if defined (G4VIS_BUILD_VRMLFILE_DRIVER) || (G4VIS_USE_VRMLFILE)
|
||||
#if defined (G4VIS_BUILD_VRMLFILE_DRIVER) || defined (G4VIS_USE_VRMLFILE)
|
||||
|
||||
#ifndef G4VRML2FILE_HH
|
||||
#define G4VRML2FILE_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4VScene;
|
||||
class G4VSceneHandler;
|
||||
|
||||
class G4VRML2File: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4VRML2File();
|
||||
~G4VRML2File();
|
||||
G4VScene* CreateScene(const G4String& name = "");
|
||||
G4VView* CreateView(G4VScene&, const G4String& name = "");
|
||||
virtual ~G4VRML2File();
|
||||
G4VSceneHandler* CreateSceneHandler(const G4String& name = "");
|
||||
G4VViewer* CreateViewer(G4VSceneHandler&, const G4String& name = "");
|
||||
|
||||
};
|
||||
|
||||
|
||||
+10
-10
@@ -5,34 +5,34 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2FileScene.hh,v 2.6 1998/12/04 09:10:54 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML2FileSceneHandler.hh,v 1.2 1999/05/10 15:39:13 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML2FileScene.hh
|
||||
// G4VRML2FileSceneHandler.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
|
||||
#ifndef G4VRML2FILE_SCENE_HH
|
||||
#define G4VRML2FILE_SCENE_HH
|
||||
#ifndef G4VRML2FILE_SCENE_HANDLER_HH
|
||||
#define G4VRML2FILE_SCENE_HANDLER_HH
|
||||
|
||||
#include <fstream.h>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VScene.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
|
||||
class G4VRML2File;
|
||||
class G4VisAttributes;
|
||||
|
||||
class G4VRML2FileScene: public G4VScene {
|
||||
class G4VRML2FileSceneHandler: public G4VSceneHandler {
|
||||
|
||||
|
||||
// methods (public)
|
||||
public:
|
||||
G4VRML2FileScene(G4VRML2File& system, const G4String& name = "");
|
||||
~G4VRML2FileScene();
|
||||
G4VRML2FileSceneHandler(G4VRML2File& system, const G4String& name = "");
|
||||
virtual ~G4VRML2FileSceneHandler();
|
||||
void AddThis(const G4Box&);
|
||||
void AddThis(const G4Cons&);
|
||||
void AddThis(const G4Tubs&);
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
void AddPrimitive(const G4Circle&);
|
||||
void AddPrimitive(const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
{ G4VSceneHandler::AddPrimitive (polymarker); }
|
||||
|
||||
void ClearStore();
|
||||
|
||||
+11
-11
@@ -5,27 +5,27 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2FileView.hh,v 2.2 1998/11/09 19:33:06 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML2FileViewer.hh,v 1.3 1999/05/10 15:39:14 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML2FileView.hh
|
||||
// G4VRML2FileViewer.hh
|
||||
// Satoshi Tanaka and Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
|
||||
#ifndef G4VRML2FILE_VIEW_HH
|
||||
#define G4VRML2FILE_VIEW_HH
|
||||
#ifndef G4VRML2FILE_VIEWER_HH
|
||||
#define G4VRML2FILE_VIEWER_HH
|
||||
|
||||
#include <fstream.h>
|
||||
#include "G4VView.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VRML2FileScene;
|
||||
class G4VRML2FileSceneHandler;
|
||||
|
||||
class G4VRML2FileView: public G4VView {
|
||||
class G4VRML2FileViewer: public G4VViewer {
|
||||
public:
|
||||
G4VRML2FileView(G4VRML2FileScene& scene, const G4String& name = "");
|
||||
~G4VRML2FileView();
|
||||
G4VRML2FileViewer(G4VRML2FileSceneHandler& scene, const G4String& name = "");
|
||||
virtual ~G4VRML2FileViewer();
|
||||
void ClearView();
|
||||
void DrawView();
|
||||
void ShowView();
|
||||
@@ -35,7 +35,7 @@ private:
|
||||
void SendViewParameters () ;
|
||||
|
||||
private:
|
||||
G4VRML2FileScene& fScene; // Reference to Graphics Scene for this view.
|
||||
G4VRML2FileSceneHandler& fSceneHandler; // Reference to Graphics Scene for this view.
|
||||
ofstream& fDest ;
|
||||
|
||||
G4double fViewHalfAngle ;
|
||||
+10
-10
@@ -5,34 +5,34 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2Scene.hh,v 2.5 1998/12/03 09:28:24 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML2SceneHandler.hh,v 1.2 1999/05/10 15:39:15 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML2Scene.hh
|
||||
// G4VRML2SceneHandler.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRML_DRIVER
|
||||
|
||||
#ifndef G4VRML2_SCENE_HH
|
||||
#define G4VRML2_SCENE_HH
|
||||
#ifndef G4VRML2_SCENE_HANDLER_HH
|
||||
#define G4VRML2_SCENE_HANDLER_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VScene.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
#include "G4FRClient.hh"
|
||||
|
||||
class G4VRML2;
|
||||
class G4VisAttributes;
|
||||
|
||||
class G4VRML2Scene: public G4VScene {
|
||||
class G4VRML2SceneHandler: public G4VSceneHandler {
|
||||
|
||||
enum { MAX_CONNECTION_TRIAL = 10 } ;
|
||||
|
||||
// methods (public)
|
||||
public:
|
||||
G4VRML2Scene(G4VRML2& system, const G4String& name = "");
|
||||
~G4VRML2Scene();
|
||||
G4VRML2SceneHandler(G4VRML2& system, const G4String& name = "");
|
||||
virtual ~G4VRML2SceneHandler();
|
||||
void AddThis(const G4Box&);
|
||||
void AddThis(const G4Cons&);
|
||||
void AddThis(const G4Tubs&);
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
void AddPrimitive(const G4Circle&);
|
||||
void AddPrimitive(const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
{ G4VSceneHandler::AddPrimitive (polymarker); }
|
||||
|
||||
void ClearStore();
|
||||
|
||||
+11
-11
@@ -5,28 +5,28 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRML2View.hh,v 2.2 1998/11/09 19:33:10 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRML2Viewer.hh,v 1.3 1999/05/10 15:39:16 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRML2View.hh
|
||||
// G4VRML2Viewer.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRML_DRIVER
|
||||
|
||||
#ifndef G4VRML2_VIEW_HH
|
||||
#define G4VRML2_VIEW_HH
|
||||
#ifndef G4VRML2_VIEWER_HH
|
||||
#define G4VRML2_VIEWER_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4FRClient.hh"
|
||||
|
||||
class G4VRML2Scene;
|
||||
class G4VRML2SceneHandler;
|
||||
|
||||
class G4VRML2View: public G4VView {
|
||||
class G4VRML2Viewer: public G4VViewer {
|
||||
public:
|
||||
G4VRML2View(G4VRML2Scene& scene, const G4String& name = "");
|
||||
~G4VRML2View();
|
||||
G4VRML2Viewer(G4VRML2SceneHandler& scene, const G4String& name = "");
|
||||
virtual ~G4VRML2Viewer();
|
||||
void ClearView();
|
||||
void DrawView();
|
||||
void ShowView();
|
||||
@@ -36,7 +36,7 @@ private:
|
||||
void SendViewParameters () ;
|
||||
|
||||
private:
|
||||
G4VRML2Scene& fScene; // Reference to Graphics Scene for this view.
|
||||
G4VRML2SceneHandler& fSceneHandler; // Reference to Graphics Scene for this view.
|
||||
G4FRClient& fDest ;
|
||||
|
||||
G4double fViewHalfAngle ;
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VRMLNetConfig.hh,v 2.0 1998/07/02 16:48:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4VRMLNetConfig.hh,v 1.2 1999/01/09 16:27:41 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// G4VRMLNetConfig.hh
|
||||
// Satoshi Tanaka
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+15
-15
@@ -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
|
||||
+15
-15
@@ -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
|
||||
+12
-12
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+15
-15
@@ -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
|
||||
+26
-26
@@ -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
|
||||
+15
-15
@@ -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
|
||||
+22
-22
@@ -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 ;
|
||||
+29
-29
@@ -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
|
||||
Reference in New Issue
Block a user