Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 2.2 1998/07/07 17:11:06 allison Exp $
|
||||
# $Id: GNUmakefile,v 1.2 1999/04/15 15:27:55 johna Exp $
|
||||
|
||||
name := G4FR
|
||||
|
||||
@@ -14,6 +14,7 @@ CPPFLAGS += -I$(G4BASE)/visualization/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/modeling/include
|
||||
CPPFLAGS += -I$(G4BASE)/global/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/graphics_reps/include
|
||||
CPPFLAGS += -I$(G4BASE)/intercoms/include
|
||||
CPPFLAGS += -I$(G4BASE)/global/HEPGeometry/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/solids/CSG/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/management/include
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILE.hh,v 2.1 1998/11/06 13:41:37 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4DAWNFILE.hh,v 1.4 1999/05/10 15:38:26 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE driver factory.
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
//----- prototype
|
||||
class G4VScene ;
|
||||
class G4VSceneHandler ;
|
||||
|
||||
//----------------------------//
|
||||
//----- class G4DAWNFILE -----//
|
||||
@@ -30,9 +30,9 @@ class G4DAWNFILE: public G4VGraphicsSystem {
|
||||
|
||||
public:
|
||||
G4DAWNFILE ();
|
||||
~G4DAWNFILE ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
virtual ~G4DAWNFILE ();
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& name = "");
|
||||
|
||||
private:
|
||||
|
||||
|
||||
+10
-10
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILEScene.hh,v 2.4 1998/12/04 07:31:03 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4DAWNFILESceneHandler.hh,v 1.2 1999/05/10 15:38:27 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
//=================//
|
||||
|
||||
|
||||
#ifndef G4DAWNFILE_SCENE_HH
|
||||
#define G4DAWNFILE_SCENE_HH
|
||||
#ifndef G4DAWNFILE_SCENE_HANDLER_HH
|
||||
#define G4DAWNFILE_SCENE_HANDLER_HH
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4VScene.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
#include "G4FRofstream.hh"
|
||||
#include "G4FRConst.hh"
|
||||
@@ -32,13 +32,13 @@ class G4DAWNFILE;
|
||||
|
||||
|
||||
//-----
|
||||
class G4DAWNFILEScene: public G4VScene {
|
||||
class G4DAWNFILESceneHandler: public G4VSceneHandler {
|
||||
|
||||
public:
|
||||
|
||||
//----- constructor and destructor
|
||||
G4DAWNFILEScene (G4DAWNFILE& system, const G4String& name = "");
|
||||
~G4DAWNFILEScene ();
|
||||
G4DAWNFILESceneHandler (G4DAWNFILE& system, const G4String& name = "");
|
||||
virtual ~G4DAWNFILESceneHandler ();
|
||||
|
||||
//----- overriding base class methods
|
||||
void AddPrimitive (const G4Polyline& line);
|
||||
@@ -48,10 +48,10 @@ public:
|
||||
void AddPrimitive (const G4Circle&);
|
||||
void AddPrimitive (const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
{ G4VSceneHandler::AddPrimitive (polymarker); }
|
||||
|
||||
virtual void BeginModeling () ;
|
||||
virtual void EndModeling () { G4VScene::EndModeling ();}
|
||||
virtual void EndModeling () { G4VSceneHandler::EndModeling ();}
|
||||
|
||||
virtual void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
virtual void EndPrimitives ();
|
||||
+11
-11
@@ -5,33 +5,33 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILEView.hh,v 2.1 1998/11/06 13:41:39 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4DAWNFILEViewer.hh,v 1.3 1999/05/10 15:38:28 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE view - opens window, hard copy, etc.
|
||||
// DAWNFILE viewer - opens window, hard copy, etc.
|
||||
|
||||
//=================//
|
||||
#ifdef G4VIS_BUILD_DAWNFILE_DRIVER
|
||||
//=================//
|
||||
|
||||
|
||||
#ifndef G4DAWNFILE_VIEW_HH
|
||||
#define G4DAWNFILE_VIEW_HH
|
||||
#ifndef G4DAWNFILE_VIEWER_HH
|
||||
#define G4DAWNFILE_VIEWER_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4DAWNFILEScene ;
|
||||
class G4DAWNFILESceneHandler ;
|
||||
|
||||
class G4DAWNFILEView: public G4VView {
|
||||
class G4DAWNFILEViewer: public G4VViewer {
|
||||
|
||||
enum FRDEV {FRDEV_PS=1, FRDEV_XWIN=2, FRDEV_PS2=3, FRDEV_XWIN2=4, FRDEV_OPEN_GL=5, FRDEV_DEVICE_END=6} ;
|
||||
|
||||
public:
|
||||
//----- constructor and destructor
|
||||
G4DAWNFILEView (G4DAWNFILEScene& scene, const G4String& name = "");
|
||||
~G4DAWNFILEView ();
|
||||
G4DAWNFILEViewer (G4DAWNFILESceneHandler& scene, const G4String& name = "");
|
||||
virtual ~G4DAWNFILEViewer ();
|
||||
|
||||
//----- overriding base class methods
|
||||
void SetView (); // Do nothing. SendViewParameters will do its job.
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
void SendDrawingStyleToDAWNGUI( ostream& out ) ;
|
||||
|
||||
private:
|
||||
G4DAWNFILEScene& fScene; // Reference to Graphics Scene for this view.
|
||||
G4DAWNFILESceneHandler& fSceneHandler; // Reference to Graphics Scene for this view.
|
||||
|
||||
char fG4PrimViewer [32] ;
|
||||
char fG4PrimViewerInvocation[64] ;
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRClientServer.hh,v 2.2 1998/07/13 17:10:54 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FRClientServer.hh,v 1.2 1999/01/09 16:11:40 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Wed Jul 3 14:13:52 JST 1996
|
||||
////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRConst.hh,v 2.0 1998/07/02 16:42:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FRConst.hh,v 1.2 1999/01/09 16:11:41 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Tue Jul 2 15:30:49 JST 1996
|
||||
///////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRFeatures.hh,v 2.2 1998/07/12 03:09:10 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FRFeatures.hh,v 1.2 1999/01/09 16:11:41 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
#if !defined G4_FR_FEATURES_HH
|
||||
#define G4_FR_FEATURES_HH
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRSocketConfig.hh,v 2.2 1998/12/03 22:07:21 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FRSocketConfig.hh,v 1.2 1999/01/09 16:11:42 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
////////////////////////////////
|
||||
///// G4FRSocketConfig.h /////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRSocketMacro.hh,v 2.0 1998/07/02 16:42:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FRSocketMacro.hh,v 1.2 1999/01/09 16:11:42 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
///////////////////////////////
|
||||
///// G4FRSocketMacro.hh /////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRofstream.hh,v 2.0 1998/07/02 16:42:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FRofstream.hh,v 1.2 1999/01/09 16:11:43 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
#include<fstream.h>
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRenderer.hh,v 2.1 1998/11/06 13:41:39 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FukuiRenderer.hh,v 1.4 1999/05/10 15:38:30 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "G4FRClientServer.hh"
|
||||
|
||||
//----- prototype
|
||||
class G4VScene ;
|
||||
class G4VSceneHandler ;
|
||||
|
||||
//---------------------------------//
|
||||
//----- class G4FukuiRenderer -----//
|
||||
@@ -32,9 +32,9 @@ class G4FukuiRenderer: public G4VGraphicsSystem {
|
||||
|
||||
public:
|
||||
G4FukuiRenderer ();
|
||||
~G4FukuiRenderer ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
virtual ~G4FukuiRenderer ();
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& name = "");
|
||||
|
||||
G4FRClientServer& GetPrimDest() { return fPrimDest ; }
|
||||
|
||||
|
||||
+14
-14
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRendererScene.hh,v 2.3 1998/11/06 13:41:40 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FukuiRendererSceneHandler.hh,v 1.2 1999/05/10 15:38:31 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 11:19:19 JST 1996
|
||||
@@ -17,12 +17,12 @@
|
||||
//=================//
|
||||
|
||||
|
||||
#ifndef G4FUKUI_RENDERER_SCENE_HH
|
||||
#define G4FUKUI_RENDERER_SCENE_HH
|
||||
#ifndef G4FUKUI_RENDERER_SCENE_HANDLER_HH
|
||||
#define G4FUKUI_RENDERER_SCENE_HANDLER_HH
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4VScene.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
#include "G4FRClientServer.hh"
|
||||
#include "G4FRConst.hh"
|
||||
@@ -76,7 +76,7 @@ class G4FukuiRenderer;
|
||||
// scene.PostAddThis ();
|
||||
// }
|
||||
//
|
||||
// where G4VSolid::DescribeYourselfTo ( G4VScene& ) calls
|
||||
// where G4VSolid::DescribeYourselfTo ( G4VSceneHandler& ) calls
|
||||
// a proper AddThis() function. See G4Box.cc, for example.
|
||||
//
|
||||
// For shapes for which AddThis() functions are not prepered explicitly,
|
||||
@@ -84,13 +84,13 @@ class G4FukuiRenderer;
|
||||
// Then the following chain of calling is Done:
|
||||
//
|
||||
// AddThis ( const G4VSolid& )
|
||||
// ==> G4VScene::AddThis ( const G4VSolid& )
|
||||
// ==> G4VScene::RequestPrimitives( const G4VSolid& )
|
||||
// ==> G4VSceneHandler::AddThis ( const G4VSolid& )
|
||||
// ==> G4VSceneHandler::RequestPrimitives( const G4VSolid& )
|
||||
// ==> AddPrimitive ( const G4Polyhedron& )
|
||||
//
|
||||
// Therefore, AddPrimitive( const G4Polyhedron& ) is used for
|
||||
// visualization finally. Note that G4Polyhedron is automatically
|
||||
// created in G4VScene::RequestPrimitives( const G4VSolid& ) and
|
||||
// created in G4VSceneHandler::RequestPrimitives( const G4VSolid& ) and
|
||||
// current visualization attributes are assigned there.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
@@ -98,13 +98,13 @@ class G4FukuiRenderer;
|
||||
|
||||
|
||||
//-----
|
||||
class G4FukuiRendererScene: public G4VScene {
|
||||
class G4FukuiRendererSceneHandler: public G4VSceneHandler {
|
||||
|
||||
public:
|
||||
|
||||
//----- constructor and destructor
|
||||
G4FukuiRendererScene (G4FukuiRenderer& system, const G4String& name = "");
|
||||
~G4FukuiRendererScene ();
|
||||
G4FukuiRendererSceneHandler (G4FukuiRenderer& system, const G4String& name = "");
|
||||
virtual ~G4FukuiRendererSceneHandler ();
|
||||
|
||||
//----- overriding base class methods
|
||||
void AddPrimitive (const G4Polyline& line);
|
||||
@@ -114,10 +114,10 @@ public:
|
||||
void AddPrimitive (const G4Circle&);
|
||||
void AddPrimitive (const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
{ G4VSceneHandler::AddPrimitive (polymarker); }
|
||||
|
||||
virtual void BeginModeling () ;
|
||||
virtual void EndModeling () { G4VScene::EndModeling ();}
|
||||
virtual void EndModeling () { G4VSceneHandler::EndModeling ();}
|
||||
|
||||
virtual void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
virtual void EndPrimitives ();
|
||||
+11
-11
@@ -5,34 +5,34 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRendererView.hh,v 2.1 1998/11/06 13:41:41 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FukuiRendererViewer.hh,v 1.3 1999/05/10 15:38:32 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 12:10:14 JST 1996
|
||||
// FukuiRenderer view - opens window, hard copy, etc.
|
||||
// FukuiRenderer viewer - opens window, hard copy, etc.
|
||||
|
||||
//=================//
|
||||
#ifdef G4VIS_BUILD_DAWN_DRIVER
|
||||
//=================//
|
||||
|
||||
|
||||
#ifndef G4FUKUI_RENDERER_VIEW_HH
|
||||
#define G4FUKUI_RENDERER_VIEW_HH
|
||||
#ifndef G4FUKUI_RENDERER_VIEWER_HH
|
||||
#define G4FUKUI_RENDERER_VIEWER_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4FukuiRendererScene ;
|
||||
class G4FukuiRendererSceneHandler ;
|
||||
|
||||
class G4FukuiRendererView: public G4VView {
|
||||
class G4FukuiRendererViewer: public G4VViewer {
|
||||
|
||||
enum FRDEV {FRDEV_PS=1, FRDEV_XWIN=2, FRDEV_PS2=3, FRDEV_XWIN2=4, FRDEV_OPEN_GL=5, FRDEV_DEVICE_END=6} ;
|
||||
|
||||
public:
|
||||
//----- constructor and destructor
|
||||
G4FukuiRendererView (G4FukuiRendererScene& scene, const G4String& name);
|
||||
~G4FukuiRendererView ();
|
||||
G4FukuiRendererViewer (G4FukuiRendererSceneHandler& scene, const G4String& name);
|
||||
virtual ~G4FukuiRendererViewer ();
|
||||
|
||||
//----- overriding base class methods
|
||||
void SetView (); // Do nothing. SendViewParameters will do its job.
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
private:
|
||||
void SendDevice( FRDEV dev );
|
||||
void SendDrawingStyle() ;
|
||||
G4FukuiRendererScene& fScene; // Reference to Graphics Scene for this view.
|
||||
G4FukuiRendererSceneHandler& fSceneHandler; // Reference to Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILE.cc,v 2.2 1998/11/06 13:41:44 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4DAWNFILE.cc,v 1.3 1999/01/11 00:47:20 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE factory.
|
||||
@@ -22,9 +22,9 @@
|
||||
|
||||
//#include "G4VisFeaturesOfDAWNFILE.hh"
|
||||
#include "G4FRFeatures.hh"
|
||||
#include "G4VScene.hh"
|
||||
#include "G4DAWNFILEScene.hh"
|
||||
#include "G4DAWNFILEView.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4DAWNFILESceneHandler.hh"
|
||||
#include "G4DAWNFILEViewer.hh"
|
||||
#include "G4FRConst.hh"
|
||||
|
||||
|
||||
@@ -41,22 +41,22 @@ G4DAWNFILE::~G4DAWNFILE ()
|
||||
{}
|
||||
|
||||
|
||||
//----- G4DAWNFILE::CreateScene (const G4String& name)
|
||||
G4VScene* G4DAWNFILE::CreateScene (const G4String& name)
|
||||
//----- G4DAWNFILE::CreateSceneHandler (const G4String& name)
|
||||
G4VSceneHandler* G4DAWNFILE::CreateSceneHandler (const G4String& name)
|
||||
{
|
||||
G4VScene* p = new G4DAWNFILEScene (*this, name);
|
||||
G4VSceneHandler* p = new G4DAWNFILESceneHandler (*this, name);
|
||||
|
||||
G4cout << G4DAWNFILEScene::GetSceneCount ()
|
||||
G4cout << G4DAWNFILESceneHandler::GetSceneCount ()
|
||||
<< ' ' << fName << " scenes extanct." << endl;
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
//----- G4DAWNFILE::CreateView ()
|
||||
G4VView* G4DAWNFILE::CreateView (G4VScene& scene, const G4String& name)
|
||||
//----- G4DAWNFILE::CreateViewer ()
|
||||
G4VViewer* G4DAWNFILE::CreateViewer (G4VSceneHandler& scene, const G4String& name)
|
||||
{
|
||||
G4VView* pView =
|
||||
new G4DAWNFILEView ((G4DAWNFILEScene&) scene, name);
|
||||
G4VViewer* pView =
|
||||
new G4DAWNFILEViewer ((G4DAWNFILESceneHandler&) scene, name);
|
||||
return pView;
|
||||
}
|
||||
|
||||
|
||||
+17
-17
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILEScene.cc,v 2.6 1998/12/04 07:31:12 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4DAWNFILESceneHandler.cc,v 1.1 1999/01/09 16:11:47 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE scene.
|
||||
@@ -28,8 +28,8 @@
|
||||
#include "globals.hh"
|
||||
#include "G4FRConst.hh"
|
||||
#include "G4DAWNFILE.hh"
|
||||
#include "G4DAWNFILEScene.hh"
|
||||
#include "G4DAWNFILEView.hh"
|
||||
#include "G4DAWNFILESceneHandler.hh"
|
||||
#include "G4DAWNFILEViewer.hh"
|
||||
#include "G4Point3D.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
@@ -56,10 +56,10 @@ const char DEFAULT_G4PRIM_FILE_NAME[] = "g4.prim";
|
||||
///////////////////////////
|
||||
|
||||
|
||||
//----- G4DAWNFILEScene, constructor
|
||||
G4DAWNFILEScene::G4DAWNFILEScene (G4DAWNFILE& system, const G4String& name):
|
||||
//----- G4DAWNFILESceneHandler, constructor
|
||||
G4DAWNFILESceneHandler::G4DAWNFILESceneHandler (G4DAWNFILE& system, const G4String& name):
|
||||
fSystem (system) ,
|
||||
G4VScene (system, fSceneIdCount++, name) ,
|
||||
G4VSceneHandler (system, fSceneIdCount++, name) ,
|
||||
fPrimDest () ,
|
||||
flag_in_modeling (false) ,
|
||||
flag_saving_g4_prim (false) ,
|
||||
@@ -91,18 +91,18 @@ COMMAND_BUF_SIZE (G4FRofstream::SEND_BUFMAX)
|
||||
}
|
||||
|
||||
|
||||
//----- G4DAWNFILEScene, destructor
|
||||
G4DAWNFILEScene::~G4DAWNFILEScene ()
|
||||
//----- G4DAWNFILESceneHandler, destructor
|
||||
G4DAWNFILESceneHandler::~G4DAWNFILESceneHandler ()
|
||||
{
|
||||
#if defined DEBUG_FR_SCENE
|
||||
G4cerr << "***** ~G4DAWNFILEScene" << endl;
|
||||
G4cerr << "***** ~G4DAWNFILESceneHandler" << endl;
|
||||
#endif
|
||||
fSceneCount--;
|
||||
ClearStore (); // clear current scene
|
||||
|
||||
}
|
||||
|
||||
void G4DAWNFILEScene::SetG4PrimFileName()
|
||||
void G4DAWNFILESceneHandler::SetG4PrimFileName()
|
||||
{
|
||||
// g4.prim, g4_1.prim, ..., g4_MAX_FILE_INDEX.prim
|
||||
const int MAX_FILE_INDEX = fMaxFileNum - 1 ;
|
||||
@@ -152,10 +152,10 @@ void G4DAWNFILEScene::SetG4PrimFileName()
|
||||
G4cerr << " (Customizable as: setenv G4DAWNFILE_MAX_FILE_NUM number) " << endl;
|
||||
G4cerr << "===========================================" << endl;
|
||||
|
||||
} // G4DAWNFILEScene::SetG4PrimFileName()
|
||||
} // G4DAWNFILESceneHandler::SetG4PrimFileName()
|
||||
|
||||
|
||||
void G4DAWNFILEScene::BeginSavingG4Prim( void )
|
||||
void G4DAWNFILESceneHandler::BeginSavingG4Prim( void )
|
||||
{
|
||||
if( !IsSavingG4Prim() )
|
||||
{
|
||||
@@ -167,7 +167,7 @@ void G4DAWNFILEScene::BeginSavingG4Prim( void )
|
||||
}
|
||||
}
|
||||
|
||||
void G4DAWNFILEScene::EndSavingG4Prim ( void )
|
||||
void G4DAWNFILESceneHandler::EndSavingG4Prim ( void )
|
||||
{
|
||||
if( IsSavingG4Prim() )
|
||||
{
|
||||
@@ -181,7 +181,7 @@ void G4DAWNFILEScene::EndSavingG4Prim ( void )
|
||||
// Common to DAWN and DAWNFILE drivers //
|
||||
/////////////////////////////////////////
|
||||
|
||||
#define G4FRSCENE G4DAWNFILEScene
|
||||
#define G4FRSCENE G4DAWNFILESceneHandler
|
||||
#include "G4FRSceneFunc.icc"
|
||||
#undef G4FRSCENE
|
||||
|
||||
@@ -190,9 +190,9 @@ void G4DAWNFILEScene::EndSavingG4Prim ( void )
|
||||
//////////////////////
|
||||
|
||||
//----- static variables
|
||||
G4int G4DAWNFILEScene::fSceneIdCount = 0;
|
||||
G4int G4DAWNFILESceneHandler::fSceneIdCount = 0;
|
||||
|
||||
G4int G4DAWNFILEScene::fSceneCount = 0;
|
||||
G4int G4DAWNFILESceneHandler::fSceneCount = 0;
|
||||
// num of existing instances
|
||||
|
||||
#endif // G4VIS_BUILD_DAWNFILE_DRIVER
|
||||
+53
-53
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DAWNFILEView.cc,v 2.5 1998/11/29 21:33:12 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4DAWNFILEViewer.cc,v 1.2 1999/01/11 00:47:21 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE view - opens window, hard copy, etc.
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "G4SceneData.hh"
|
||||
#include "G4Scene.hh"
|
||||
#include "G4Vector3D.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
@@ -34,18 +34,18 @@
|
||||
|
||||
#include "G4FRConst.hh"
|
||||
#include "G4DAWNFILE.hh"
|
||||
#include "G4DAWNFILEScene.hh"
|
||||
#include "G4DAWNFILEView.hh"
|
||||
#include "G4DAWNFILESceneHandler.hh"
|
||||
#include "G4DAWNFILEViewer.hh"
|
||||
|
||||
|
||||
|
||||
//----- constants
|
||||
const char FR_ENV_MULTI_WINDOW[] = "G4DAWN_MULTI_WINDOW" ;
|
||||
|
||||
//----- G4DAWNFILEView, constructor
|
||||
G4DAWNFILEView::G4DAWNFILEView (G4DAWNFILEScene& scene,
|
||||
//----- G4DAWNFILEViewer, constructor
|
||||
G4DAWNFILEViewer::G4DAWNFILEViewer (G4DAWNFILESceneHandler& scene,
|
||||
const G4String& name):
|
||||
G4VView (scene, scene.IncrementViewCount (), name), fScene (scene)
|
||||
G4VViewer (scene, scene.IncrementViewCount (), name), fSceneHandler (scene)
|
||||
{
|
||||
// Set a g4.prim-file viewer
|
||||
strcpy( fG4PrimViewer, "dawn" );
|
||||
@@ -61,7 +61,7 @@ G4DAWNFILEView::G4DAWNFILEView (G4DAWNFILEScene& scene,
|
||||
|
||||
strcpy( fG4PrimViewerInvocation, fG4PrimViewer );
|
||||
strcat( fG4PrimViewerInvocation, " ");
|
||||
strcat( fG4PrimViewerInvocation, fScene.GetG4PrimFileName() );
|
||||
strcat( fG4PrimViewerInvocation, fSceneHandler.GetG4PrimFileName() );
|
||||
}
|
||||
|
||||
// Set a PostScript Viewer
|
||||
@@ -72,46 +72,46 @@ G4DAWNFILEView::G4DAWNFILEView (G4DAWNFILEScene& scene,
|
||||
|
||||
}
|
||||
|
||||
//----- G4DAWNFILEView, destructor
|
||||
G4DAWNFILEView::~G4DAWNFILEView ()
|
||||
//----- G4DAWNFILEViewer, destructor
|
||||
G4DAWNFILEViewer::~G4DAWNFILEViewer ()
|
||||
{}
|
||||
|
||||
//----- G4DAWNFILEView::SetView ()
|
||||
void G4DAWNFILEView::SetView ()
|
||||
//----- G4DAWNFILEViewer::SetView ()
|
||||
void G4DAWNFILEViewer::SetView ()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4DAWNFILEView::SetView()\n";
|
||||
G4cerr << "***** G4DAWNFILEViewer::SetView()\n";
|
||||
#endif
|
||||
// Do nothing, since DAWN is running as a different process.
|
||||
// SendViewParameters () will do this job instead.
|
||||
}
|
||||
|
||||
|
||||
//----- G4DAWNFILEView::ClearView()
|
||||
//----- G4DAWNFILEViewer::ClearView()
|
||||
void
|
||||
G4DAWNFILEView::ClearView( void )
|
||||
G4DAWNFILEViewer::ClearView( void )
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4DAWNFILEView::ClearView () " << endl;
|
||||
G4cerr << "***** G4DAWNFILEViewer::ClearView () " << endl;
|
||||
#endif
|
||||
|
||||
//----- Begin saving data to g4.prim
|
||||
fScene.BeginSavingG4Prim();
|
||||
fSceneHandler.BeginSavingG4Prim();
|
||||
|
||||
//----- Clear old data
|
||||
fScene.SendStr( FR_CLEAR_DATA );
|
||||
fSceneHandler.SendStr( FR_CLEAR_DATA );
|
||||
|
||||
}
|
||||
|
||||
|
||||
//----- G4DAWNFILEView::DrawView ()
|
||||
void G4DAWNFILEView::DrawView ()
|
||||
//----- G4DAWNFILEViewer::DrawView ()
|
||||
void G4DAWNFILEViewer::DrawView ()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4DAWNFILEView::DrawView () " << endl;
|
||||
G4cerr << "***** G4DAWNFILEViewer::DrawView () " << endl;
|
||||
#endif
|
||||
//----- Error recovery
|
||||
if( fScene.IsInModeling() ) {
|
||||
if( fSceneHandler.IsInModeling() ) {
|
||||
G4cerr << "WARNING from DAWNFILE driver:" << endl;
|
||||
G4cerr << " You've invoked a drawing command before " << endl;
|
||||
G4cerr << " completing your previous visualization." << endl;
|
||||
@@ -122,7 +122,7 @@ void G4DAWNFILEView::DrawView ()
|
||||
}
|
||||
|
||||
//----- Begin Saving g4.prim file
|
||||
fScene.BeginSavingG4Prim();
|
||||
fSceneHandler.BeginSavingG4Prim();
|
||||
|
||||
//----- set view if necessary
|
||||
SendViewParameters();
|
||||
@@ -135,31 +135,31 @@ void G4DAWNFILEView::DrawView ()
|
||||
//----- Draw
|
||||
ProcessView () ;
|
||||
|
||||
} // G4DAWNFILEView::DrawView ()
|
||||
} // G4DAWNFILEViewer::DrawView ()
|
||||
|
||||
|
||||
|
||||
//----- G4DAWNFILEView::ShowView()
|
||||
void G4DAWNFILEView::ShowView( void )
|
||||
//----- G4DAWNFILEViewer::ShowView()
|
||||
void G4DAWNFILEViewer::ShowView( void )
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4DAWNFILEView::ShowView () " << endl;
|
||||
G4cerr << "***** G4DAWNFILEViewer::ShowView () " << endl;
|
||||
#endif
|
||||
|
||||
if( fScene.IsInModeling() ) // if( fScene.flag_in_modeling )
|
||||
if( fSceneHandler.IsInModeling() ) // if( fSceneHandler.flag_in_modeling )
|
||||
{
|
||||
|
||||
//----- End of Data
|
||||
fScene.FREndModeling();
|
||||
fSceneHandler.FREndModeling();
|
||||
|
||||
//----- Draw all
|
||||
fScene.SendStr( FR_DRAW_ALL );
|
||||
fSceneHandler.SendStr( FR_DRAW_ALL );
|
||||
|
||||
//----- Close device
|
||||
fScene.SendStr( FR_CLOSE_DEVICE );
|
||||
fSceneHandler.SendStr( FR_CLOSE_DEVICE );
|
||||
|
||||
//----- End saving data to g4.prim
|
||||
fScene.EndSavingG4Prim() ;
|
||||
fSceneHandler.EndSavingG4Prim() ;
|
||||
|
||||
|
||||
//----- string for viewer invocation
|
||||
@@ -170,39 +170,39 @@ void G4DAWNFILEView::ShowView( void )
|
||||
|
||||
strcpy( fG4PrimViewerInvocation, fG4PrimViewer );
|
||||
strcat( fG4PrimViewerInvocation, " ");
|
||||
strcat( fG4PrimViewerInvocation, fScene.GetG4PrimFileName() );
|
||||
strcat( fG4PrimViewerInvocation, fSceneHandler.GetG4PrimFileName() );
|
||||
}
|
||||
|
||||
|
||||
//----- Invoke DAWN
|
||||
if( false == G4FRofstream::DoesFileExist( fScene.GetG4PrimFileName() ) )
|
||||
if( false == G4FRofstream::DoesFileExist( fSceneHandler.GetG4PrimFileName() ) )
|
||||
{
|
||||
G4cout << "ERROR: Failed to generate file ";
|
||||
G4cout << fScene.GetG4PrimFileName() << endl;
|
||||
G4cout << fSceneHandler.GetG4PrimFileName() << endl;
|
||||
|
||||
} else if( strcmp( GetG4PrimViewerInvocation(), "" ) )
|
||||
{
|
||||
G4cout << "File " << fScene.GetG4PrimFileName() ;
|
||||
G4cout << "File " << fSceneHandler.GetG4PrimFileName() ;
|
||||
G4cout << " is generated." << endl;
|
||||
G4cout << GetG4PrimViewerInvocation() << endl;
|
||||
system( GetG4PrimViewerInvocation() );
|
||||
|
||||
} else { // no view, i.e., only file generation
|
||||
G4cout << "File " << fScene.GetG4PrimFileName() ;
|
||||
G4cout << "File " << fSceneHandler.GetG4PrimFileName() ;
|
||||
G4cout << " is generated." << endl;
|
||||
G4cout << "No viewer is invoked." << endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // G4DAWNFILEView::ShowView()
|
||||
} // G4DAWNFILEViewer::ShowView()
|
||||
|
||||
|
||||
//----- G4DAWNFILEView::FlushView()
|
||||
void G4DAWNFILEView::FlushView( void )
|
||||
//----- G4DAWNFILEViewer::FlushView()
|
||||
void G4DAWNFILEViewer::FlushView( void )
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4DAWNFILEView::Flush () " << endl;
|
||||
G4cerr << "***** G4DAWNFILEViewer::Flush () " << endl;
|
||||
#endif
|
||||
|
||||
ShowView();
|
||||
@@ -210,11 +210,11 @@ void G4DAWNFILEView::FlushView( void )
|
||||
|
||||
|
||||
|
||||
//----- G4DAWNFILEView::SendDrawingStyleToDAWNGUI( ostream& out )
|
||||
void G4DAWNFILEView::SendDrawingStyleToDAWNGUI( ostream& out )
|
||||
//----- G4DAWNFILEViewer::SendDrawingStyleToDAWNGUI( ostream& out )
|
||||
void G4DAWNFILEViewer::SendDrawingStyleToDAWNGUI( ostream& out )
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4DAWNFILEView::SendDrawingStyle() " << endl;
|
||||
G4cerr << "***** G4DAWNFILEViewer::SendDrawingStyle() " << endl;
|
||||
#endif
|
||||
|
||||
G4int style = fVP.GetDrawingStyle();
|
||||
@@ -239,19 +239,19 @@ void G4DAWNFILEView::SendDrawingStyleToDAWNGUI( ostream& out )
|
||||
break;
|
||||
}
|
||||
|
||||
} // G4DAWNFILEView::SendDrawingStyle()
|
||||
} // G4DAWNFILEViewer::SendDrawingStyle()
|
||||
|
||||
|
||||
|
||||
//----- G4DAWNFILEView::SendViewParameters ()
|
||||
void G4DAWNFILEView::SendViewParameters ()
|
||||
//----- G4DAWNFILEViewer::SendViewParameters ()
|
||||
void G4DAWNFILEViewer::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 << "***** G4DAWNFILEView::SendViewParameters()\n";
|
||||
G4cerr << "***** G4DAWNFILEViewer::SendViewParameters()\n";
|
||||
#endif
|
||||
|
||||
//----- Magic number to decide camera distance automatically
|
||||
@@ -260,12 +260,12 @@ void G4DAWNFILEView::SendViewParameters ()
|
||||
const G4double MAX_HALF_ANGLE = 0.499 * M_PI ;
|
||||
|
||||
//----- Send Bounding Box
|
||||
fScene.SendBoundingBox();
|
||||
fSceneHandler.SendBoundingBox();
|
||||
|
||||
//----- CALC camera distance
|
||||
//..... Note: Camera cannot enter inside object
|
||||
G4double camera_distance ;
|
||||
G4double radius = fScene.GetSceneData().GetExtent().GetExtentRadius();
|
||||
G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
|
||||
|
||||
G4double half_view_angle = fabs ( fVP.GetFieldHalfAngle () ) ;
|
||||
if( half_view_angle > MAX_HALF_ANGLE ) {
|
||||
@@ -372,10 +372,10 @@ void G4DAWNFILEView::SendViewParameters ()
|
||||
|
||||
|
||||
//----- SET CAMERA
|
||||
fScene.SendStr( FR_SET_CAMERA );
|
||||
fSceneHandler.SendStr( FR_SET_CAMERA );
|
||||
|
||||
|
||||
} // G4DAWNFILEView::SendViewParameters ()
|
||||
} // G4DAWNFILEViewer::SendViewParameters ()
|
||||
|
||||
|
||||
#endif // G4VIS_BUILD_DAWNFILE_DRIVER
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRClientServer.cc,v 2.1 1998/07/13 17:11:01 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FRClientServer.cc,v 1.2 1999/01/09 16:11:49 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Wed Jul 3 14:14:29 JST 1996
|
||||
////////////////////////////////
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FRSceneFunc.icc,v 2.3 1998/07/21 09:44:57 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FRSceneFunc.icc,v 1.3 1999/01/11 00:47:22 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ void G4FRSCENE::AddPrimitive (const G4Polyline& polyline)
|
||||
G4int nPoints = polyline.entries ();
|
||||
G4int i ;
|
||||
const G4VisAttributes* pVA =
|
||||
fpView->GetApplicableVisAttributes ( polyline.GetVisAttributes() );
|
||||
fpViewer->GetApplicableVisAttributes ( polyline.GetVisAttributes() );
|
||||
|
||||
//----- skip drawing invisible primitive
|
||||
if( pVA ){
|
||||
@@ -243,7 +243,7 @@ void G4FRSCENE::AddPrimitive ( const G4Polyhedron& polyhedron )
|
||||
InitializeFR();
|
||||
|
||||
//----- Attributes
|
||||
if(!SendVisAttributes( fpView->GetApplicableVisAttributes
|
||||
if(!SendVisAttributes( fpViewer->GetApplicableVisAttributes
|
||||
(polyhedron.GetVisAttributes() ) ) ) {
|
||||
SendStr( FR_COLOR_RGB_RED ); // color
|
||||
}
|
||||
@@ -298,7 +298,7 @@ void G4FRSCENE::AddPrimitive ( const G4Polyhedron& polyhedron )
|
||||
void G4FRSCENE::BeginModeling ()
|
||||
{
|
||||
|
||||
G4VScene::BeginModeling ();
|
||||
G4VSceneHandler::BeginModeling ();
|
||||
|
||||
//-----
|
||||
#if defined DEBUG_FR_SCENE
|
||||
@@ -342,7 +342,7 @@ void G4FRSCENE::BeginPrimitives (const G4Transform3D& objectTransformation)
|
||||
G4cerr << "***** BeginPrimitives \n";
|
||||
#endif
|
||||
|
||||
G4VScene::BeginPrimitives (objectTransformation);
|
||||
G4VSceneHandler::BeginPrimitives (objectTransformation);
|
||||
fpObjectTransformation = &objectTransformation;
|
||||
|
||||
#if defined DEBUG_FR_SCENE
|
||||
@@ -357,7 +357,7 @@ void G4FRSCENE::EndPrimitives ()
|
||||
#if defined DEBUG_FR_SCENE
|
||||
G4cerr << "***** EndPrimitives \n";
|
||||
#endif
|
||||
G4VScene::EndPrimitives ();
|
||||
G4VSceneHandler::EndPrimitives ();
|
||||
}
|
||||
|
||||
//----- G4FRSCENE::GetSceneCount ()
|
||||
@@ -385,7 +385,7 @@ void G4FRSCENE::AddThis( const G4Box& box )
|
||||
|
||||
//----- Attributes
|
||||
if(!SendVisAttributes
|
||||
( fpView->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
( fpViewer->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
SendStr( FR_COLOR_RGB_GREEN ); // color
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ G4FRSCENE::AddThis( const G4Tubs& tubes )
|
||||
|
||||
//----- Attributes
|
||||
if(!SendVisAttributes
|
||||
( fpView->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
( fpViewer->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
SendStr( FR_COLOR_RGB_BLUE ); // color
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ G4FRSCENE::AddThis( const G4Cons& cons )
|
||||
|
||||
//----- Attributes
|
||||
if(!SendVisAttributes
|
||||
( fpView->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
( fpViewer->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
SendStr( FR_COLOR_RGB_CYAN ); // color
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ void G4FRSCENE::AddThis ( const G4Trd& trd )
|
||||
|
||||
//----- Attributes
|
||||
if(!SendVisAttributes
|
||||
( fpView->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
( fpViewer->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
SendStr( FR_COLOR_RGB_MAGENTA ); // color
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ void G4FRSCENE::AddThis ( const G4Sphere& sphere )
|
||||
|
||||
//----- Attributes
|
||||
if(!SendVisAttributes
|
||||
( fpView->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
( fpViewer->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
SendStr( FR_COLOR_RGB_YELLOW ); // color
|
||||
}
|
||||
|
||||
@@ -565,7 +565,7 @@ void G4FRSCENE::AddThis ( const G4Sphere& sphere )
|
||||
//...... G4Polyhedron is used for visualization.
|
||||
//...... Visualization attributes and
|
||||
//...... local coordinates are resent and overwritten.
|
||||
G4VScene::AddThis( sphere ) ;
|
||||
G4VSceneHandler::AddThis( sphere ) ;
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// //----- sphere segment
|
||||
@@ -595,7 +595,7 @@ void G4FRSCENE::AddThis (const G4Para& para)
|
||||
|
||||
//----- Attributes
|
||||
if(!SendVisAttributes
|
||||
( fpView->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
( fpViewer->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
SendStr( FR_COLOR_RGB_RED ); // color
|
||||
}
|
||||
|
||||
@@ -648,7 +648,7 @@ void G4FRSCENE::AddThis (const G4Trap& trap)
|
||||
|
||||
//----- Attributes
|
||||
if(!SendVisAttributes
|
||||
( fpView->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
( fpViewer->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
SendStr( FR_COLOR_RGB_GREEN ); // color
|
||||
}
|
||||
|
||||
@@ -719,7 +719,7 @@ G4FRSCENE::AddThis( const G4Torus& torus )
|
||||
|
||||
//----- Attributes
|
||||
if(!SendVisAttributes
|
||||
( fpView->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
( fpViewer->GetApplicableVisAttributes( fpVisAttribs ) ) ) {
|
||||
SendStr( FR_COLOR_RGB_BLUE ); // color
|
||||
}
|
||||
|
||||
@@ -754,7 +754,7 @@ void G4FRSCENE::AddThis ( const G4VSolid& solid )
|
||||
|
||||
|
||||
//----- Send a primitive
|
||||
G4VScene::AddThis( solid ) ;
|
||||
G4VSceneHandler::AddThis( solid ) ;
|
||||
|
||||
} //G4FRSCENE::AddThis ( const G4VSolid& )
|
||||
|
||||
@@ -764,7 +764,7 @@ G4bool
|
||||
G4FRSCENE::SendVisAttributes ( const G4VisAttributes* pAV )
|
||||
{
|
||||
|
||||
// Have a look at G4VScene::GetDrawingStyle (const G4Visible&). (John)
|
||||
// Have a look at G4VSceneHandler::GetDrawingStyle (const G4Visible&). (John)
|
||||
|
||||
G4bool status = true ; // initialization
|
||||
const G4double ALPHA_MIN = 0.001 ; // min of alpha factor of color
|
||||
@@ -803,7 +803,7 @@ G4bool G4FRSCENE::IsVisible()
|
||||
G4bool visibility = true ;
|
||||
|
||||
const G4VisAttributes* pVisAttribs =
|
||||
fpView->GetApplicableVisAttributes( fpVisAttribs );
|
||||
fpViewer->GetApplicableVisAttributes( fpVisAttribs );
|
||||
|
||||
//-----
|
||||
if( ( getenv( FR_ENV_CULL_INVISIBLE_OBJECTS ) != NULL ) && \
|
||||
@@ -822,7 +822,7 @@ G4bool G4FRSCENE::IsVisible()
|
||||
void G4FRSCENE::SendBoundingBox( void )
|
||||
{
|
||||
//----- (1A) CALC bounding box of the bounding sphere
|
||||
const G4VisExtent& extent = GetSceneData().GetExtent();
|
||||
const G4VisExtent& extent = GetScene()->GetExtent();
|
||||
const G4Point3D& center = extent.GetExtentCenter();
|
||||
const G4double radius = extent.GetExtentRadius();
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRenderer.cc,v 2.3 1998/11/06 13:41:46 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FukuiRenderer.cc,v 1.3 1999/01/11 00:47:23 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
@@ -24,9 +24,9 @@
|
||||
#define __G_ANSI_C__
|
||||
|
||||
//#include "G4VisFeaturesOfFukuiRenderer.hh"
|
||||
#include "G4VScene.hh"
|
||||
#include "G4FukuiRendererScene.hh"
|
||||
#include "G4FukuiRendererView.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4FukuiRendererSceneHandler.hh"
|
||||
#include "G4FukuiRendererViewer.hh"
|
||||
#include "G4FRClientServer.hh"
|
||||
#include "G4FRConst.hh"
|
||||
#include "G4FRFeatures.hh"
|
||||
@@ -69,25 +69,25 @@ G4FukuiRenderer::~G4FukuiRenderer ()
|
||||
}
|
||||
}
|
||||
|
||||
//----- G4FukuiRenderer::CreateScene ()
|
||||
G4VScene* G4FukuiRenderer::CreateScene (const G4String& name)
|
||||
//----- G4FukuiRenderer::CreateSceneHandler ()
|
||||
G4VSceneHandler* G4FukuiRenderer::CreateSceneHandler (const G4String& name)
|
||||
{
|
||||
G4VScene* p = new G4FukuiRendererScene (*this, name);
|
||||
G4VSceneHandler* p = new G4FukuiRendererSceneHandler (*this, name);
|
||||
|
||||
if(!flag_connected) { delete p ; p = NULL ; }
|
||||
|
||||
G4cout << G4FukuiRendererScene::GetSceneCount ()
|
||||
G4cout << G4FukuiRendererSceneHandler::GetSceneCount ()
|
||||
<< ' ' << fName << " scenes extanct." << endl;
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
//----- G4FukuiRenderer::CreateView ()
|
||||
G4VView* G4FukuiRenderer::CreateView (G4VScene& scene, const G4String& name)
|
||||
//----- G4FukuiRenderer::CreateViewer ()
|
||||
G4VViewer* G4FukuiRenderer::CreateViewer (G4VSceneHandler& scene, const G4String& name)
|
||||
{
|
||||
if(!flag_connected) return NULL;
|
||||
G4VView* pView =
|
||||
new G4FukuiRendererView ((G4FukuiRendererScene&) scene, name);
|
||||
G4VViewer* pView =
|
||||
new G4FukuiRendererViewer ((G4FukuiRendererSceneHandler&) scene, name);
|
||||
return pView;
|
||||
}
|
||||
|
||||
|
||||
+14
-14
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRendererScene.cc,v 2.3 1998/11/06 13:41:47 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FukuiRendererSceneHandler.cc,v 1.1 1999/01/09 16:11:52 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 11:34:24 JST 1996
|
||||
@@ -29,8 +29,8 @@
|
||||
#include "globals.hh"
|
||||
#include "G4FRConst.hh"
|
||||
#include "G4FukuiRenderer.hh"
|
||||
#include "G4FukuiRendererScene.hh"
|
||||
#include "G4FukuiRendererView.hh"
|
||||
#include "G4FukuiRendererSceneHandler.hh"
|
||||
#include "G4FukuiRendererViewer.hh"
|
||||
#include "G4Point3D.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
@@ -55,11 +55,11 @@ const char FR_ENV_CULL_INVISIBLE_OBJECTS [] = "G4DAWN_CULL_INVISIBLE_OBJECTS";
|
||||
///////////////////////////
|
||||
|
||||
|
||||
//----- G4FukuiRendererScene, constructor
|
||||
G4FukuiRendererScene::G4FukuiRendererScene (G4FukuiRenderer& system,
|
||||
//----- G4FukuiRendererSceneHandler, constructor
|
||||
G4FukuiRendererSceneHandler::G4FukuiRendererSceneHandler (G4FukuiRenderer& system,
|
||||
const G4String& name):
|
||||
fSystem (system) ,
|
||||
G4VScene (system, fSceneIdCount++, name) ,
|
||||
G4VSceneHandler (system, fSceneIdCount++, name) ,
|
||||
fPrimDest (system.GetPrimDest() ) ,
|
||||
flag_in_modeling (false) ,
|
||||
flag_saving_g4_prim (false) ,
|
||||
@@ -89,14 +89,14 @@ COMMAND_BUF_SIZE (G4FRClientServer::SEND_BUFMAX)
|
||||
//----- count instantiated scenes
|
||||
fSceneCount++;
|
||||
|
||||
} // G4FukuiRendererScene, constructor
|
||||
} // G4FukuiRendererSceneHandler, constructor
|
||||
|
||||
|
||||
//----- G4FukuiRendererScene, destructor
|
||||
G4FukuiRendererScene::~G4FukuiRendererScene ()
|
||||
//----- G4FukuiRendererSceneHandler, destructor
|
||||
G4FukuiRendererSceneHandler::~G4FukuiRendererSceneHandler ()
|
||||
{
|
||||
#if defined DEBUG_FR_SCENE
|
||||
G4cerr << "***** ~G4FukuiRendererScene" << endl;
|
||||
G4cerr << "***** ~G4FukuiRendererSceneHandler" << endl;
|
||||
#endif
|
||||
fSceneCount--;
|
||||
ClearStore (); // clear current scene
|
||||
@@ -108,7 +108,7 @@ G4FukuiRendererScene::~G4FukuiRendererScene ()
|
||||
// Common to DAWN and DAWNFILE drivers //
|
||||
/////////////////////////////////////////
|
||||
|
||||
#define G4FRSCENE G4FukuiRendererScene
|
||||
#define G4FRSCENE G4FukuiRendererSceneHandler
|
||||
#include "G4FRSceneFunc.icc"
|
||||
#undef G4FRSCENE
|
||||
|
||||
@@ -117,9 +117,9 @@ G4FukuiRendererScene::~G4FukuiRendererScene ()
|
||||
//////////////////////
|
||||
|
||||
//----- static variables
|
||||
G4int G4FukuiRendererScene::fSceneIdCount = 0;
|
||||
G4int G4FukuiRendererSceneHandler::fSceneIdCount = 0;
|
||||
|
||||
G4int G4FukuiRendererScene::fSceneCount = 0;
|
||||
G4int G4FukuiRendererSceneHandler::fSceneCount = 0;
|
||||
// num of existing instances
|
||||
|
||||
#endif // G4VIS_BUILD_DAWN_DRIVER
|
||||
+75
-75
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FukuiRendererView.cc,v 2.4 1998/11/06 13:41:48 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FukuiRendererViewer.cc,v 1.2 1999/01/11 00:47:24 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 12:09:11 JST 1996
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "G4SceneData.hh"
|
||||
#include "G4Scene.hh"
|
||||
#include "G4Vector3D.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
@@ -35,28 +35,28 @@
|
||||
|
||||
#include "G4FRConst.hh"
|
||||
#include "G4FukuiRenderer.hh"
|
||||
#include "G4FukuiRendererScene.hh"
|
||||
#include "G4FukuiRendererView.hh"
|
||||
#include "G4FukuiRendererSceneHandler.hh"
|
||||
#include "G4FukuiRendererViewer.hh"
|
||||
|
||||
|
||||
//----- constants
|
||||
const char FR_ENV_MULTI_WINDOW[] = "G4DAWN_MULTI_WINDOW" ;
|
||||
|
||||
//----- G4FukuiRendererView, constructor
|
||||
G4FukuiRendererView::G4FukuiRendererView (G4FukuiRendererScene& scene,
|
||||
//----- G4FukuiRendererViewer, constructor
|
||||
G4FukuiRendererViewer::G4FukuiRendererViewer (G4FukuiRendererSceneHandler& scene,
|
||||
const G4String& name):
|
||||
G4VView (scene, scene.IncrementViewCount (), name), fScene (scene)
|
||||
G4VViewer (scene, scene.IncrementViewCount (), name), fSceneHandler (scene)
|
||||
{}
|
||||
|
||||
//----- G4FukuiRendererView, destructor
|
||||
G4FukuiRendererView::~G4FukuiRendererView ()
|
||||
//----- G4FukuiRendererViewer, destructor
|
||||
G4FukuiRendererViewer::~G4FukuiRendererViewer ()
|
||||
{}
|
||||
|
||||
//----- G4FukuiRendererView::SetView ()
|
||||
void G4FukuiRendererView::SetView ()
|
||||
//----- G4FukuiRendererViewer::SetView ()
|
||||
void G4FukuiRendererViewer::SetView ()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4FukuiRendererView::SetView()\n";
|
||||
G4cerr << "***** G4FukuiRendererViewer::SetView()\n";
|
||||
#endif
|
||||
// Do nothing, since DAWN is running as a different process.
|
||||
// SendViewParameters () will do this job instead.
|
||||
@@ -65,31 +65,31 @@ void G4FukuiRendererView::SetView ()
|
||||
|
||||
|
||||
|
||||
//----- G4FukuiRendererView::ClearView()
|
||||
//----- G4FukuiRendererViewer::ClearView()
|
||||
void
|
||||
G4FukuiRendererView::ClearView( void )
|
||||
G4FukuiRendererViewer::ClearView( void )
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4FukuiRendererView::ClearView () " << endl;
|
||||
G4cerr << "***** G4FukuiRendererViewer::ClearView () " << endl;
|
||||
#endif
|
||||
|
||||
//----- Begin saving data to g4.prim
|
||||
fScene.BeginSavingG4Prim();
|
||||
fSceneHandler.BeginSavingG4Prim();
|
||||
|
||||
//----- Clear old data
|
||||
fScene.SendStr( FR_CLEAR_DATA );
|
||||
fSceneHandler.SendStr( FR_CLEAR_DATA );
|
||||
|
||||
}
|
||||
|
||||
|
||||
//----- G4FukuiRendererView::DrawView ()
|
||||
void G4FukuiRendererView::DrawView ()
|
||||
//----- G4FukuiRendererViewer::DrawView ()
|
||||
void G4FukuiRendererViewer::DrawView ()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4FukuiRendererView::DrawView () " << endl;
|
||||
G4cerr << "***** G4FukuiRendererViewer::DrawView () " << endl;
|
||||
#endif
|
||||
//----- Error recovery
|
||||
if( fScene.IsInModeling() ) {
|
||||
if( fSceneHandler.IsInModeling() ) {
|
||||
G4cerr << "WARNING from FukuiRenderer (DAWN) driver:" << endl;
|
||||
G4cerr << " You've invoked a drawing command before " << endl;
|
||||
G4cerr << " completing your previous visualization." << endl;
|
||||
@@ -100,7 +100,7 @@ void G4FukuiRendererView::DrawView ()
|
||||
}
|
||||
|
||||
//----- Begin Saving g4.prim file
|
||||
fScene.BeginSavingG4Prim();
|
||||
fSceneHandler.BeginSavingG4Prim();
|
||||
|
||||
//----- drawing device
|
||||
if( ( getenv( FR_ENV_MULTI_WINDOW ) != NULL ) && \
|
||||
@@ -125,105 +125,105 @@ void G4FukuiRendererView::DrawView ()
|
||||
//----- Draw
|
||||
ProcessView () ;
|
||||
|
||||
} // G4FukuiRendererView::DrawView ()
|
||||
} // G4FukuiRendererViewer::DrawView ()
|
||||
|
||||
|
||||
|
||||
//----- G4FukuiRendererView::ShowView()
|
||||
void G4FukuiRendererView::ShowView( void )
|
||||
//----- G4FukuiRendererViewer::ShowView()
|
||||
void G4FukuiRendererViewer::ShowView( void )
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4FukuiRendererView::ShowView () " << endl;
|
||||
G4cerr << "***** G4FukuiRendererViewer::ShowView () " << endl;
|
||||
#endif
|
||||
|
||||
if( fScene.IsInModeling() ) // if( fScene.flag_in_modeling )
|
||||
if( fSceneHandler.IsInModeling() ) // if( fSceneHandler.flag_in_modeling )
|
||||
{
|
||||
|
||||
//----- End of Data
|
||||
fScene.FREndModeling();
|
||||
fSceneHandler.FREndModeling();
|
||||
|
||||
//----- Draw all
|
||||
fScene.SendStr( FR_DRAW_ALL );
|
||||
fSceneHandler.SendStr( FR_DRAW_ALL );
|
||||
|
||||
//----- Close device
|
||||
fScene.SendStr( FR_CLOSE_DEVICE );
|
||||
fSceneHandler.SendStr( FR_CLOSE_DEVICE );
|
||||
|
||||
//----- End saving data to g4.prim
|
||||
fScene.EndSavingG4Prim() ;
|
||||
fSceneHandler.EndSavingG4Prim() ;
|
||||
|
||||
//----- Wait user clicks drawing Area
|
||||
this->Wait();
|
||||
}
|
||||
|
||||
} // G4FukuiRendererView::ShowView()
|
||||
} // G4FukuiRendererViewer::ShowView()
|
||||
|
||||
|
||||
//----- G4FukuiRendererView::FlushView()
|
||||
void G4FukuiRendererView::FlushView( void )
|
||||
//----- G4FukuiRendererViewer::FlushView()
|
||||
void G4FukuiRendererViewer::FlushView( void )
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4FukuiRendererView::Flush () " << endl;
|
||||
G4cerr << "***** G4FukuiRendererViewer::Flush () " << endl;
|
||||
#endif
|
||||
|
||||
if( fScene.IsInModeling() ) // if( fScene.flag_in_modeling )
|
||||
if( fSceneHandler.IsInModeling() ) // if( fSceneHandler.flag_in_modeling )
|
||||
{
|
||||
|
||||
//----- End of Data
|
||||
fScene.FREndModeling();
|
||||
fSceneHandler.FREndModeling();
|
||||
|
||||
//----- Draw all
|
||||
fScene.SendStr( FR_DRAW_ALL );
|
||||
fSceneHandler.SendStr( FR_DRAW_ALL );
|
||||
|
||||
//----- Close device
|
||||
fScene.SendStr( FR_CLOSE_DEVICE );
|
||||
fSceneHandler.SendStr( FR_CLOSE_DEVICE );
|
||||
|
||||
//----- End saving data to g4.prim
|
||||
fScene.EndSavingG4Prim() ;
|
||||
fSceneHandler.EndSavingG4Prim() ;
|
||||
|
||||
}
|
||||
|
||||
} // G4FukuiRendererView::FlushView()
|
||||
} // G4FukuiRendererViewer::FlushView()
|
||||
|
||||
|
||||
|
||||
//----- G4FukuiRendererView::Wait()
|
||||
//----- G4FukuiRendererViewer::Wait()
|
||||
void
|
||||
G4FukuiRendererView::Wait()
|
||||
G4FukuiRendererViewer::Wait()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4FukuiRendererView::Wait () " << endl;
|
||||
G4cerr << "***** G4FukuiRendererViewer::Wait () " << endl;
|
||||
#endif
|
||||
fScene.SendStr ( FR_WAIT );
|
||||
fScene.GetPrimDest().WaitSendBack( FR_WAIT );
|
||||
fSceneHandler.SendStr ( FR_WAIT );
|
||||
fSceneHandler.GetPrimDest().WaitSendBack( FR_WAIT );
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4FukuiRendererView::Wait () : end" << endl;
|
||||
G4cerr << "***** G4FukuiRendererViewer::Wait () : end" << endl;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
//----- G4FukuiRendererView::SendDevice()
|
||||
//----- G4FukuiRendererViewer::SendDevice()
|
||||
void
|
||||
G4FukuiRendererView::SendDevice( FRDEV dev )
|
||||
G4FukuiRendererViewer::SendDevice( FRDEV dev )
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4FukuiRendererView::SendDevice() " << endl;
|
||||
G4cerr << "***** G4FukuiRendererViewer::SendDevice() " << endl;
|
||||
#endif
|
||||
|
||||
|
||||
// enum {PS=1, XWIN=2, PS2=3, XWIN2=4, OPEN_GL=5, DEVICE_END=6};
|
||||
|
||||
if( dev >= FRDEV_PS || dev < FRDEV_DEVICE_END ) {
|
||||
fScene.SendStrInt ( FR_DEVICE, dev );
|
||||
fSceneHandler.SendStrInt ( FR_DEVICE, dev );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//----- G4FukuiRendererView::SendDrawingStyle()
|
||||
void G4FukuiRendererView::SendDrawingStyle()
|
||||
//----- G4FukuiRendererViewer::SendDrawingStyle()
|
||||
void G4FukuiRendererViewer::SendDrawingStyle()
|
||||
{
|
||||
#if defined DEBUG_FR_VIEW
|
||||
G4cerr << "***** G4FukuiRendererView::SendDrawingStyle() " << endl;
|
||||
G4cerr << "***** G4FukuiRendererViewer::SendDrawingStyle() " << endl;
|
||||
#endif
|
||||
|
||||
G4int style = fVP.GetDrawingStyle();
|
||||
@@ -231,33 +231,33 @@ void G4FukuiRendererView::SendDrawingStyle()
|
||||
switch( style )
|
||||
{
|
||||
case G4ViewParameters::wireframe:
|
||||
fScene.SendStr( FR_WIREFRAME );
|
||||
fSceneHandler.SendStr( FR_WIREFRAME );
|
||||
break;
|
||||
case G4ViewParameters::hlr:
|
||||
fScene.SendStr( FR_LINES );
|
||||
fSceneHandler.SendStr( FR_LINES );
|
||||
break;
|
||||
case G4ViewParameters::hsr:
|
||||
case G4ViewParameters::hlhsr:
|
||||
fScene.SendStr( FR_SURFACE );
|
||||
fSceneHandler.SendStr( FR_SURFACE );
|
||||
break;
|
||||
default:
|
||||
fScene.SendStr( FR_WIREFRAME );
|
||||
fSceneHandler.SendStr( FR_WIREFRAME );
|
||||
break;
|
||||
}
|
||||
|
||||
} // G4FukuiRendererView::SendDrawingStyle()
|
||||
} // G4FukuiRendererViewer::SendDrawingStyle()
|
||||
|
||||
|
||||
|
||||
//----- G4FukuiRendererView::SendViewParameters ()
|
||||
void G4FukuiRendererView::SendViewParameters ()
|
||||
//----- G4FukuiRendererViewer::SendViewParameters ()
|
||||
void G4FukuiRendererViewer::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 << "***** G4FukuiRendererView::SendViewParameters()\n";
|
||||
G4cerr << "***** G4FukuiRendererViewer::SendViewParameters()\n";
|
||||
#endif
|
||||
|
||||
//----- Magic number to decide camera distance automatically
|
||||
@@ -266,12 +266,12 @@ void G4FukuiRendererView::SendViewParameters ()
|
||||
const G4double MAX_HALF_ANGLE = 0.499 * M_PI ;
|
||||
|
||||
//----- Send Bounding Box
|
||||
fScene.SendBoundingBox();
|
||||
fSceneHandler.SendBoundingBox();
|
||||
|
||||
//----- (2A) CALC camera distance
|
||||
//..... Note: Camera cannot enter inside object
|
||||
G4double camera_distance ;
|
||||
G4double radius = fScene.GetSceneData().GetExtent().GetExtentRadius();
|
||||
G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
|
||||
|
||||
G4double half_view_angle = fabs ( fVP.GetFieldHalfAngle () ) ;
|
||||
if( half_view_angle > MAX_HALF_ANGLE ) {
|
||||
@@ -300,7 +300,7 @@ void G4FukuiRendererView::SendViewParameters ()
|
||||
const G4double h_angle = (180.0 / M_PI) * camera_direction.phi () ;
|
||||
|
||||
//----- (2B), (3B) SEND camera position
|
||||
fScene.SendStrDouble3( FR_CAMERA_POSITION,
|
||||
fSceneHandler.SendStrDouble3( FR_CAMERA_POSITION,
|
||||
camera_distance,
|
||||
v_angle,
|
||||
h_angle );
|
||||
@@ -309,7 +309,7 @@ void G4FukuiRendererView::SendViewParameters ()
|
||||
const G4Point3D& target_point = fVP.GetCurrentTargetPoint();
|
||||
|
||||
//----- (4B) SEND target point
|
||||
fScene.SendStrDouble3( FR_TARGET_POINT,
|
||||
fSceneHandler.SendStrDouble3( FR_TARGET_POINT,
|
||||
target_point.x(),
|
||||
target_point.y(),
|
||||
target_point.z() );
|
||||
@@ -321,9 +321,9 @@ void G4FukuiRendererView::SendViewParameters ()
|
||||
if( half_view_angle < MIN_HALF_ANGLE ) {
|
||||
|
||||
const G4Point3D& std_target_point \
|
||||
= fScene.GetSceneData().GetStandardTargetPoint();
|
||||
= fSceneHandler.GetScene()->GetStandardTargetPoint();
|
||||
|
||||
fScene.SendStrDouble4( FR_ZOOM_FACTOR,
|
||||
fSceneHandler.SendStrDouble4( FR_ZOOM_FACTOR,
|
||||
zoom_factor ,
|
||||
std_target_point.x(),
|
||||
std_target_point.y(),
|
||||
@@ -337,23 +337,23 @@ void G4FukuiRendererView::SendViewParameters ()
|
||||
G4double focal_distance \
|
||||
= FR_HALF_SCREEN_SIZE / tan( half_view_angle );
|
||||
focal_distance *= zoom_factor ;
|
||||
fScene.SendStrDouble ( FR_FOCAL_DISTANCE, focal_distance );
|
||||
fSceneHandler.SendStrDouble ( FR_FOCAL_DISTANCE, focal_distance );
|
||||
}
|
||||
|
||||
//----- INVOKE GUI: not executed in the default setting
|
||||
if( fScene.GetSystem().IsGUIMode() ) {
|
||||
if( fSceneHandler.GetSystem().IsGUIMode() ) {
|
||||
//----- send GUI command
|
||||
fScene.SendStr( FR_GUI );
|
||||
fSceneHandler.SendStr( FR_GUI );
|
||||
|
||||
//----- wait the same command is sent back:
|
||||
//..... This avoids to send many data before
|
||||
//..... GUI session is over.
|
||||
fScene.GetPrimDest().WaitSendBack( FR_GUI );
|
||||
fSceneHandler.GetPrimDest().WaitSendBack( FR_GUI );
|
||||
}
|
||||
|
||||
//----- SET CAMERA
|
||||
fScene.SendStr( FR_SET_CAMERA );
|
||||
fSceneHandler.SendStr( FR_SET_CAMERA );
|
||||
|
||||
} // G4FukuiRendererView::SendViewParameters ()
|
||||
} // G4FukuiRendererViewer::SendViewParameters ()
|
||||
|
||||
#endif // G4VIS_BUILD_DAWN_DRIVER
|
||||
Reference in New Issue
Block a user