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
|
||||
@@ -1,37 +0,0 @@
|
||||
# $Id: GNUmakefile,v 2.4 1998/11/25 16:19:32 allison Exp $
|
||||
|
||||
name := G4Ray
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../..
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
include $(G4INSTALL)/config/G4VIS_BUILD.gmk
|
||||
include $(G4INSTALL)/config/interactivity.gmk
|
||||
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/modeling/include
|
||||
CPPFLAGS += -I$(G4BASE)/global/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/global/HEPRandom/include
|
||||
CPPFLAGS += -I$(G4BASE)/global/HEPGeometry/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/volumes/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/solids/CSG/include
|
||||
CPPFLAGS += -I$(G4BASE)/event/include
|
||||
CPPFLAGS += -I$(G4BASE)/processes/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/processes/electromagnetic/utils/include
|
||||
CPPFLAGS += -I$(G4BASE)/materials/include
|
||||
CPPFLAGS += -I$(G4BASE)/particles/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/graphics_reps/include
|
||||
CPPFLAGS += -I$(G4BASE)/intercoms/include
|
||||
CPPFLAGS += -I$(G4BASE)/tracking/include
|
||||
CPPFLAGS += -I$(G4BASE)/track/include
|
||||
CPPFLAGS += -I$(G4BASE)/digits+hits/detector/include
|
||||
CPPFLAGS += -I$(G4BASE)/digits+hits/hits/include
|
||||
CPPFLAGS += -I$(G4BASE)/digits+hits/digits/include
|
||||
CPPFLAGS += -I$(G4BASE)/run/include
|
||||
|
||||
CPPFLAGS += $(X11FLAGS)
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
@@ -1,72 +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: G4OwnColormapXView.hh,v 2.1 1998/10/23 17:58:21 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 1st June 1997
|
||||
// Loosely based on G4OpenGLXView by Andrew Walkden 7th February 1997
|
||||
// G4OwnColormapXView : Class to provide X Windows with its own colormap
|
||||
// for a GEANT4 view. The derived view must define the colormap.
|
||||
|
||||
#ifdef G4VIS_BUILD_RAYX_DRIVER
|
||||
|
||||
#ifndef G4OWNCOLORMAPXVIEW_HH
|
||||
#define G4OWNCOLORMAPXVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
class G4VScene;
|
||||
|
||||
class G4OwnColormapXView: virtual public G4VView {
|
||||
|
||||
public:
|
||||
G4OwnColormapXView (G4VScene& scene);
|
||||
~G4OwnColormapXView ();
|
||||
void ClearView ();
|
||||
void FinishView ();
|
||||
|
||||
protected:
|
||||
char* fcharViewName;
|
||||
Display* fpDisplay;
|
||||
int fScreen;
|
||||
int fDepth;
|
||||
G4String fVisualName;
|
||||
G4bool fTrueColor;
|
||||
Visual* fpVisual;
|
||||
int fMapEntries;
|
||||
Window fRootW;
|
||||
int fRedShift;
|
||||
int fGreenShift;
|
||||
int fBlueShift;
|
||||
float fRedMax;
|
||||
float fGreenMax;
|
||||
float fBlueMax;
|
||||
Colormap fColormap;
|
||||
XWindowAttributes fRootWA;
|
||||
GC fGC;
|
||||
XSetWindowAttributes fSWA;
|
||||
Window fWindow;
|
||||
XTextProperty fWindowName;
|
||||
XTextProperty fIconName;
|
||||
XSizeHints* fSize_hints;
|
||||
XWMHints* fWM_hints;
|
||||
XClassHint* fClass_hints;
|
||||
XWindowAttributes fWA;
|
||||
int fWidth;
|
||||
int fHeight;
|
||||
Pixmap fIcon_pixmap;
|
||||
XEvent fEvent;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,43 +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: G4RayMessenger.hh,v 2.2 1998/07/12 03:44:31 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Ray tracing Messenger - John Allison 5th June 1997
|
||||
|
||||
#ifndef G4RAYMESSENGER_HH
|
||||
#define G4RAYMESSENGER_HH
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4RayX;
|
||||
class G4RayScene;
|
||||
class G4RayView;
|
||||
|
||||
class G4UIcommand;
|
||||
|
||||
class G4RayMessenger: public G4UImessenger {
|
||||
public:
|
||||
G4RayMessenger ();
|
||||
~G4RayMessenger ();
|
||||
void SetNewValue (G4UIcommand* command, G4String newValues);
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void RegisterScene (G4RayScene* pScene);
|
||||
void RegisterView (G4RayView* pView);
|
||||
private:
|
||||
G4RayScene* fpScene;
|
||||
G4RayView* fpView;
|
||||
G4UIcommand* fpVisRayCommandDirectory;
|
||||
G4UIcommand* fpResolutionCommand;
|
||||
};
|
||||
|
||||
#include "G4RayMessenger.icc"
|
||||
|
||||
#endif
|
||||
@@ -1,20 +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: G4RayMessenger.icc,v 2.0 1998/07/02 16:42:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Ray tracing Messenger - John Allison 5th June 1997
|
||||
|
||||
inline void G4RayMessenger::RegisterScene (G4RayScene* pScene) {
|
||||
fpScene = pScene;
|
||||
}
|
||||
|
||||
inline void G4RayMessenger::RegisterView (G4RayView* pView) {
|
||||
fpView = pView;
|
||||
}
|
||||
@@ -1,36 +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: G4RayPrimaryGeneratorAction.hh,v 2.1 1998/07/12 03:09:19 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4RayPrimaryGeneratorAction_h
|
||||
#define G4RayPrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
class G4ParticleGun;
|
||||
class G4Event;
|
||||
|
||||
class G4RayPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
G4RayPrimaryGeneratorAction();
|
||||
~G4RayPrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
G4ParticleGun* GetParticleGun();
|
||||
|
||||
private:
|
||||
G4ParticleGun* particleGun;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,52 +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: G4RayScene.hh,v 2.2 1998/11/06 13:41:50 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Nikos Savvas 1st June 1997
|
||||
// GEANT4 Ray Tracing scene.
|
||||
|
||||
#ifndef G4RAYSCENE_HH
|
||||
#define G4RAYSCENE_HH
|
||||
|
||||
#include "G4VScene.hh"
|
||||
|
||||
class G4RayScene: public G4VScene {
|
||||
|
||||
public:
|
||||
G4RayScene (G4VGraphicsSystem& system, const G4String& name = "");
|
||||
~G4RayScene ();
|
||||
static G4int GetSceneCount ();
|
||||
|
||||
// The following functions don't make sense for G4Ray...
|
||||
void AddPrimitive (const G4Polyline&);
|
||||
void AddPrimitive (const G4Text&);
|
||||
void AddPrimitive (const G4Circle&);
|
||||
void AddPrimitive (const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker&);
|
||||
void AddPrimitive (const G4Polyhedron&);
|
||||
void AddPrimitive (const G4NURBS&);
|
||||
void AddThis (const G4Box&);
|
||||
void AddThis (const G4Cons&);
|
||||
void AddThis (const G4Tubs&);
|
||||
void AddThis (const G4Trd&);
|
||||
void AddThis (const G4Trap&);
|
||||
void AddThis (const G4Sphere&);
|
||||
void AddThis (const G4Para&);
|
||||
void AddThis (const G4Torus&);
|
||||
void AddThis (const G4VSolid&);
|
||||
|
||||
private:
|
||||
static G4int fSceneIdCount; // static counter for Ray scenes.
|
||||
static G4int fSceneCount; // No. of extanct scenes.
|
||||
};
|
||||
|
||||
#include "G4RayScene.icc"
|
||||
|
||||
#endif
|
||||
@@ -1,53 +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: G4RayScene.icc,v 2.1 1998/08/07 08:17:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Nikos Savvas 1st June 1997
|
||||
// GEANT4 Ray Tracing scene.
|
||||
|
||||
inline void G4RayScene::AddThis (const G4Box& box) {
|
||||
G4VScene::AddThis (box);
|
||||
}
|
||||
|
||||
inline void G4RayScene::AddThis (const G4Cons& cons) {
|
||||
G4VScene::AddThis (cons);
|
||||
}
|
||||
|
||||
inline void G4RayScene::AddThis (const G4Tubs& tubs) {
|
||||
G4VScene::AddThis (tubs);
|
||||
}
|
||||
|
||||
inline void G4RayScene::AddThis (const G4Trd& trd) {
|
||||
G4VScene::AddThis (trd);
|
||||
}
|
||||
|
||||
inline void G4RayScene::AddThis (const G4Trap& trap) {
|
||||
G4VScene::AddThis (trap);
|
||||
}
|
||||
|
||||
inline void G4RayScene::AddThis (const G4Sphere& sphere) {
|
||||
G4VScene::AddThis (sphere);
|
||||
}
|
||||
|
||||
inline void G4RayScene::AddThis (const G4Para& para) {
|
||||
G4VScene::AddThis (para);
|
||||
}
|
||||
|
||||
inline void G4RayScene::AddThis (const G4Torus& torus) {
|
||||
G4VScene::AddThis (torus);
|
||||
}
|
||||
|
||||
inline void G4RayScene::AddThis (const G4VSolid& vsolid) {
|
||||
G4VScene::AddThis (vsolid);
|
||||
}
|
||||
|
||||
inline void G4RayScene::AddPrimitive (const G4Polymarker& polymarker) {
|
||||
G4VScene::AddPrimitive (polymarker);
|
||||
}
|
||||
@@ -1,40 +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: G4RaySteppingAction.hh,v 2.0 1998/07/02 16:42:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// 16/Apr/1997 J. Allison: For visualization/test/test19.
|
||||
// moved here and renamed 14/April/1997
|
||||
|
||||
#ifndef MYSTEPPINGACTION_HH
|
||||
#define MYSTEPPINGACTION_HH
|
||||
|
||||
#include "G4UserSteppingAction.hh"
|
||||
#include "G4Normal3D.hh"
|
||||
|
||||
class G4RaySteppingAction: public G4UserSteppingAction {
|
||||
public:
|
||||
G4RaySteppingAction();
|
||||
void UserSteppingAction();
|
||||
G4bool WeHaveContact () const {return weHaveContact;}
|
||||
G4Normal3D GetSurfaceNormal () const {return normal;}
|
||||
const G4VisAttributes* GetVisAttributes () const {return pVisAttribs;}
|
||||
G4VPhysicalVolume* GetPhysicalVolume () const {return pVPV;}
|
||||
G4LogicalVolume* GetLogicalVolume () const {return pLV;}
|
||||
G4VSolid* GetSolid () const {return pSol;}
|
||||
private:
|
||||
G4bool weHaveContact;
|
||||
G4Normal3D normal;
|
||||
const G4VisAttributes* pVisAttribs;
|
||||
G4VPhysicalVolume* pVPV;
|
||||
G4LogicalVolume* pLV;
|
||||
G4VSolid* pSol;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,168 +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: G4RayView.hh,v 2.2 1998/11/06 13:41:51 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Nikos Savvas 1st June 1997
|
||||
// GEANT4 Ray Tracing view.
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4RaySteppingAction.hh"
|
||||
#include "G4RayPrimaryGeneratorAction.hh"
|
||||
|
||||
|
||||
#ifndef G4RAYVIEW_HH
|
||||
#define G4RAYVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
#include <rw/tvordvec.h>
|
||||
#include <rw/tvhdict.h>
|
||||
|
||||
class G4RayScene;
|
||||
class G4RaySteppingAction;
|
||||
|
||||
class G4RayColourCell {
|
||||
public:
|
||||
G4RayColourCell (): red (0), green (0), blue (0), nHits (0) {}
|
||||
G4RayColourCell (float rr, float gg, float bb, G4int ii):
|
||||
red (rr), green (gg), blue (bb), nHits (ii) {}
|
||||
float red, green, blue;
|
||||
G4int nHits; // No. of ray hits using this colour.
|
||||
G4bool operator == (const G4RayColourCell& h) const {
|
||||
return this == &h;
|
||||
}
|
||||
};
|
||||
|
||||
class G4RayCoordinate {
|
||||
public:
|
||||
G4RayCoordinate (): coord (0) {}
|
||||
G4RayCoordinate (G4double x, G4double y):
|
||||
coord (((unsigned int) (0x7fff * (x + 1.0))) |
|
||||
((unsigned int) (0x7fff * (1.0 - y)) << 16)) {}
|
||||
// Assumes -1.0 <= x, y <= 1.0. Assigns 16 bits each.
|
||||
unsigned int coord;
|
||||
G4bool operator == (const G4RayCoordinate& c) const {
|
||||
return coord == c.coord;
|
||||
}
|
||||
};
|
||||
|
||||
class G4RayHitColour {
|
||||
public:
|
||||
G4RayHitColour (): colour (0) {}
|
||||
G4RayHitColour (float r, float g, float b):
|
||||
colour ((((unsigned int) (0x3ff * r)) << 20) |
|
||||
(((unsigned int) (0x3ff * g)) << 10) |
|
||||
((unsigned int) (0x3ff * b))) {}
|
||||
// Assumes 0.0 <= r, g, b <= 1.0. Assigns 10 bits each.
|
||||
unsigned int colour;
|
||||
G4bool operator == (const G4RayHitColour& h) const {
|
||||
return colour == h.colour;
|
||||
}
|
||||
float GetRed () {return (float ((colour >> 20) )) / 0x3ff;}
|
||||
float GetGreen () {return (float ((colour >> 10) & 0x3ff)) / 0x3ff;}
|
||||
float GetBlue () {return (float ((colour ) & 0x3ff)) / 0x3ff;}
|
||||
};
|
||||
|
||||
class G4RayView: virtual public G4VView {
|
||||
|
||||
public:
|
||||
|
||||
G4RayView (G4RayScene& scene, const G4String& name = "");
|
||||
|
||||
~G4RayView();
|
||||
|
||||
G4double GetResolution () const;
|
||||
|
||||
void SetResolution (G4double resolution);
|
||||
|
||||
protected:
|
||||
|
||||
void SetView ();
|
||||
|
||||
void InitialiseImage ();
|
||||
|
||||
void TriggerRedraw ();
|
||||
|
||||
G4bool Scan (int& i, int& j, int& k,
|
||||
float& red, float& green, float& blue,
|
||||
int& iPixVal);
|
||||
// Iterate over window, return false when finished. Return i, j,
|
||||
// and k which define a coloured Square of side k whose upper left
|
||||
// corner is (i, j). Note origin is at upper left corner of window
|
||||
// - X and PostScript convention. iPixVal is the pixel value for
|
||||
// this colour, i.e., the key in fRayHitColourIndex.
|
||||
|
||||
// The following static members define an image. They are static so
|
||||
// that (a) there is only ever one of them (they can take a lot of
|
||||
// memory) and (b) any object of the class or its descendants can
|
||||
// access it. It is *not* cleared by ClearView (). It is only
|
||||
// cleared by a change of view parameters and some other crucial
|
||||
// parameters. It can be progressively refined by multiple calls to
|
||||
// DrawView.
|
||||
static G4ViewParameters fImageViewParameters;
|
||||
static G4double fInitialResolution;
|
||||
static G4double fRequestedResolution;
|
||||
static G4double fCurrentResolution;
|
||||
static G4float fMaxMinColourSeparation;
|
||||
static G4int fImageWidth, fImageHeight;
|
||||
static G4int fMaxImageMapEntries;
|
||||
static G4bool fImageMapRejigged;
|
||||
static G4bool fTriggerRescan;
|
||||
static G4int fWaitLimit; // Waits between refresh.
|
||||
static G4int fWaitCount;
|
||||
static RWTValOrderedVector <G4RayColourCell> fRayHitColourMap;
|
||||
static RWTValHashDictionary <G4RayCoordinate, G4RayHitColour> fRayHits;
|
||||
static unsigned int RayCoordHash (const G4RayCoordinate& rayCoord);
|
||||
static RWTValHashDictionary <G4RayHitColour, G4int> fRayHitColourIndex;
|
||||
static unsigned int RayColourHash (const G4RayHitColour& rayColour);
|
||||
|
||||
private:
|
||||
void Trace (G4double x, G4double y, float& red, float& green, float& blue);
|
||||
// Trace the ray from (x, y) in screen coordinates (-1 <= x,y <= 1)
|
||||
// and fill colour.
|
||||
|
||||
void CompactColour (G4bool Print);
|
||||
|
||||
float ColourSeparation (float ri, float gi, float bi,
|
||||
float rj, float gj, float bj);
|
||||
|
||||
static void ChangePixVals (const G4RayHitColour& colour,
|
||||
G4int& index, void* ij);
|
||||
|
||||
static void DecrementPixVals (const G4RayHitColour& colour,
|
||||
G4int& index, void* ij);
|
||||
|
||||
static void PrintPixVals (const G4RayHitColour& colour,
|
||||
G4int& index, void* ij);
|
||||
|
||||
G4RayScene& fScene; // Graphics Scene for this view.
|
||||
|
||||
G4Vector3D fXprime;
|
||||
G4Vector3D fYprime;
|
||||
|
||||
G4Point3D fCenterofscreen;
|
||||
G4Point3D fCamerapoint;
|
||||
|
||||
G4RunManager* fG4RayRunManager ;
|
||||
G4RaySteppingAction* fG4RaySteppingAction;
|
||||
G4RayPrimaryGeneratorAction* fG4RayGenerator;
|
||||
|
||||
G4ParticleGun * fG4RayGun ;
|
||||
|
||||
G4VPhysicalVolume * fpWorld;
|
||||
|
||||
};
|
||||
|
||||
#include "G4RayView.icc"
|
||||
|
||||
#endif
|
||||
@@ -1,31 +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: G4RayView.icc,v 2.0 1998/07/02 16:42:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Nikos Savvas 1st June 1997
|
||||
// GEANT4 Ray Tracing view.
|
||||
|
||||
inline G4double G4RayView::GetResolution () const {
|
||||
return fRequestedResolution;
|
||||
}
|
||||
|
||||
inline void G4RayView::SetResolution (G4double resolution) {
|
||||
fRequestedResolution = resolution;
|
||||
}
|
||||
|
||||
inline unsigned int G4RayView::RayCoordHash
|
||||
(const G4RayCoordinate& rayCoord) {
|
||||
return rayCoord.coord;
|
||||
}
|
||||
|
||||
inline unsigned int G4RayView::RayColourHash
|
||||
(const G4RayHitColour& rayColour) {
|
||||
return rayColour.colour;
|
||||
}
|
||||
@@ -1,37 +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: G4RayX.hh,v 2.1 1998/11/06 13:41:52 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Nikos Savvas 1st June 1997
|
||||
// GEANT4 Ray Tracing graphics system factory.
|
||||
|
||||
#if defined (G4VIS_BUILD_RAYX_DRIVER) || defined (G4VIS_USE_RAYX)
|
||||
|
||||
#ifndef G4RAYX_HH
|
||||
#define G4RAYX_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4RayXMessenger;
|
||||
|
||||
class G4RayX: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4RayX ();
|
||||
~G4RayX ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
private:
|
||||
static G4int fInstances;
|
||||
G4RayXMessenger* fpMessenger; // Pointer to messenger.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,36 +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: G4RayXMessenger.hh,v 2.2 1998/07/12 03:44:33 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Ray tracing for X windows Messenger - John Allison 5th June 1997
|
||||
|
||||
#ifdef G4VIS_BUILD_RAYX_DRIVER
|
||||
|
||||
#ifndef G4RAYXMESSENGER_HH
|
||||
#define G4RAYXMESSENGER_HH
|
||||
|
||||
#include "G4RayMessenger.hh"
|
||||
|
||||
class G4RayX;
|
||||
class G4UIcommand;
|
||||
|
||||
class G4RayXMessenger: public G4RayMessenger {
|
||||
public:
|
||||
G4RayXMessenger (G4RayX* pRayX);
|
||||
~G4RayXMessenger ();
|
||||
void SetNewValue (G4UIcommand* command, G4String newValues);
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
private:
|
||||
G4RayX* fpRayX;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,46 +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: G4RayXView.hh,v 2.1 1998/11/06 13:41:53 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Nikos Savvas 1st June 1997
|
||||
// GEANT4 Ray Tracing X window view.
|
||||
|
||||
#ifdef G4VIS_BUILD_RAYX_DRIVER
|
||||
|
||||
#ifndef G4RAYXVIEW_HH
|
||||
#define G4RAYXVIEW_HH
|
||||
|
||||
#include "G4RayView.hh"
|
||||
#include "G4OwnColormapXView.hh"
|
||||
|
||||
class G4RayScene;
|
||||
|
||||
class G4RayXView: public G4RayView, public G4OwnColormapXView {
|
||||
|
||||
public:
|
||||
G4RayXView (G4RayScene& scene, const G4String& name = "");
|
||||
void DrawView ();
|
||||
|
||||
private:
|
||||
int ncells;
|
||||
/*****************************
|
||||
// An RGB map for now
|
||||
int red_max;
|
||||
int green_max;
|
||||
int blue_max;
|
||||
int red_mult;
|
||||
int green_mult;
|
||||
int blue_mult;
|
||||
********************************/
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,245 +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: G4OwnColormapXView.cc,v 2.4 1998/10/23 17:58:22 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// John Allison 1st June 1997
|
||||
// Loosely based on G4OpenGLXView by Andrew Walkden 7th February 1997
|
||||
// G4OwnColormapXView : Class to provide X Windows with its own colormap
|
||||
// for a GEANT4 view. The derived view must define the colormap.
|
||||
|
||||
#ifdef G4VIS_BUILD_RAYX_DRIVER
|
||||
|
||||
#include "G4OwnColormapXView.hh"
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <iomanip.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define NewString(str) \
|
||||
((str) != NULL ? (strcpy((char*)malloc((unsigned)strlen(str) + 1), str)) : (char*)NULL)
|
||||
|
||||
static Bool WaitForNotify (Display* d, XEvent* e, char* arg) {
|
||||
return (e->type == MapNotify) && (e->xmap.window == (Window) arg);
|
||||
}
|
||||
|
||||
G4OwnColormapXView::G4OwnColormapXView (G4VScene& scene):
|
||||
G4VView (scene, -1),
|
||||
fRedShift (0),
|
||||
fGreenShift (0),
|
||||
fBlueShift (0),
|
||||
fRedMax (1),
|
||||
fGreenMax (1),
|
||||
fBlueMax (1)
|
||||
{
|
||||
fpDisplay = XOpenDisplay (0);
|
||||
if (!fpDisplay) {
|
||||
G4cerr << "G4OwnColormapXView::G4OwnColormapXView couldn't open display." << endl;
|
||||
fViewId = -1; // This flags an error.
|
||||
return;
|
||||
}
|
||||
|
||||
fScreen = XDefaultScreen (fpDisplay);
|
||||
|
||||
fDepth = XDefaultDepth (fpDisplay, fScreen);
|
||||
if (fDepth < 8) {
|
||||
G4cerr << "G4OwnColormapXView::G4OwnColormapXView: too few pixel"
|
||||
"\nplanes - need at least 8 for own colormap." << endl;
|
||||
fViewId = -1; // This flags an error.
|
||||
return;
|
||||
}
|
||||
|
||||
XVisualInfo vinfo;
|
||||
if (XMatchVisualInfo (fpDisplay, fScreen, fDepth, PseudoColor, &vinfo)) {
|
||||
G4cout << "G4OwnColormapXView::G4OwnColormapXView: PseudoColor." << endl;
|
||||
fVisualName = "PseudoColor";
|
||||
fTrueColor = false;
|
||||
}
|
||||
else if
|
||||
(XMatchVisualInfo (fpDisplay, fScreen, fDepth, DirectColor, &vinfo)) {
|
||||
G4cout << "G4OwnColormapXView::G4OwnColormapXView: DirectColor." << endl;
|
||||
fVisualName = "DirectColor";
|
||||
fTrueColor = false;
|
||||
}
|
||||
else if
|
||||
(XMatchVisualInfo (fpDisplay, fScreen, fDepth, TrueColor, &vinfo)) {
|
||||
G4cout << "G4OwnColormapXView::G4OwnColormapXView: TrueColor." << endl;
|
||||
fVisualName = "TrueColor";
|
||||
fTrueColor = true;
|
||||
}
|
||||
else {
|
||||
G4cerr << "G4OwnColormapXView::G4OwnColormapXView: neither a PseudoColor nor"
|
||||
"\na DirectColor nor a TrueColor visual - needs to be one of these"
|
||||
"\nfor own colormap."
|
||||
<< endl;
|
||||
fViewId = -1; // This flags an error.
|
||||
return;
|
||||
}
|
||||
|
||||
fpVisual = vinfo.visual;
|
||||
if (!fpVisual) {
|
||||
G4cerr << "G4OwnColormapXView::G4OwnColormapXView couldn't get a visual."
|
||||
<< endl;
|
||||
fViewId = -1; // This flags an error.
|
||||
return;
|
||||
}
|
||||
|
||||
fMapEntries = fpVisual -> map_entries;
|
||||
|
||||
fRootW = XRootWindow (fpDisplay, fScreen);
|
||||
|
||||
if (fTrueColor) {
|
||||
// Set up parameters for masks etc.
|
||||
unsigned long oneBit;
|
||||
oneBit = 1;
|
||||
while (!(fpVisual->red_mask & oneBit)) {oneBit <<= 1; fRedShift++;}
|
||||
while (fpVisual->red_mask & oneBit) {oneBit <<= 1; fRedMax *= 2.;}
|
||||
fRedMax -= 1.;
|
||||
oneBit = 1;
|
||||
while (!(fpVisual->green_mask & oneBit)) {oneBit <<= 1; fGreenShift++;}
|
||||
while (fpVisual->green_mask & oneBit) {oneBit <<= 1; fGreenMax *= 2.;}
|
||||
fGreenMax -= 1.;
|
||||
oneBit = 1;
|
||||
while (!(fpVisual->blue_mask & oneBit)) {oneBit <<= 1; fBlueShift++;}
|
||||
while (fpVisual->blue_mask & oneBit) {oneBit <<= 1; fBlueMax *= 2.;}
|
||||
fBlueMax -= 1.;
|
||||
}
|
||||
else {
|
||||
// Own colour map.
|
||||
fColormap = XCreateColormap (fpDisplay, fRootW, fpVisual, AllocAll);
|
||||
if (!fColormap || fColormap == XDefaultColormap (fpDisplay, fScreen)) {
|
||||
G4cerr << "G4OwnColormapXView::G4OwnColormapXView failed to create"
|
||||
"\na own Colormap." << endl;
|
||||
fViewId = -1; // This flags an error.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fGC = XDefaultGC (fpDisplay, fScreen); // Graphics Context for XDraw...
|
||||
|
||||
XGetWindowAttributes (fpDisplay, fRootW, &fRootWA); // Get root window atts.
|
||||
|
||||
//Choose a preferred window size.
|
||||
G4int requestWinSize_x;
|
||||
G4int requestWinSize_y;
|
||||
if (fRootWA.width > fRootWA.height) {
|
||||
requestWinSize_x = (fRootWA.height)/2;
|
||||
requestWinSize_y = (fRootWA.height)/2;
|
||||
}
|
||||
else {
|
||||
requestWinSize_x = (fRootWA.width)/2;
|
||||
requestWinSize_y = (fRootWA.width)/2;
|
||||
}
|
||||
if (requestWinSize_x < fVP.GetWindowSizeHintX ())
|
||||
requestWinSize_x = fVP.GetWindowSizeHintX ();
|
||||
if (requestWinSize_y < fVP.GetWindowSizeHintY ())
|
||||
requestWinSize_y = fVP.GetWindowSizeHintY ();
|
||||
|
||||
// Choose an origin (the window manager will ignore it!)
|
||||
G4int x_origin;
|
||||
G4int y_origin;
|
||||
x_origin = fRootWA.x;
|
||||
y_origin = fRootWA.y;
|
||||
|
||||
if (!fTrueColor) {
|
||||
fSWA.colormap = fColormap;
|
||||
}
|
||||
fSWA.background_pixel = 0;
|
||||
fSWA.border_pixel = 0;
|
||||
fSWA.event_mask = ExposureMask | ButtonPressMask | StructureNotifyMask;
|
||||
fSWA.backing_store = WhenMapped;
|
||||
unsigned int mask = CWBackPixel | CWBorderPixel |
|
||||
CWEventMask | CWBackingStore;
|
||||
if (!fTrueColor) mask = mask | CWColormap;
|
||||
fWindow = XCreateWindow (fpDisplay, fRootW, x_origin,
|
||||
y_origin, requestWinSize_x, requestWinSize_y, 0,
|
||||
fDepth, InputOutput, fpVisual,
|
||||
mask,
|
||||
&fSWA);
|
||||
|
||||
G4cout << "Window name: " << fName << endl;
|
||||
fcharViewName = new char [100];
|
||||
strncpy (fcharViewName, fName, 100);
|
||||
XStringListToTextProperty (&fcharViewName, 1, &fWindowName);
|
||||
XStringListToTextProperty (&fcharViewName, 1, &fIconName);
|
||||
|
||||
fSize_hints = XAllocSizeHints();
|
||||
fSize_hints -> flags = PPosition | PSize | PMinSize;
|
||||
fSize_hints -> min_width = 300;
|
||||
fSize_hints -> min_height = 300;
|
||||
|
||||
fWM_hints = XAllocWMHints();
|
||||
fWM_hints -> initial_state = NormalState;
|
||||
fWM_hints -> input = True;
|
||||
fWM_hints -> icon_pixmap = fIcon_pixmap;
|
||||
fWM_hints -> flags = StateHint | IconPixmapHint | InputHint;
|
||||
|
||||
fClass_hints = XAllocClassHint();
|
||||
fClass_hints -> res_name = NewString("G4SimpleX");
|
||||
fClass_hints -> res_class = NewString("G4SimpleX");
|
||||
|
||||
XSetWMProperties (fpDisplay, fWindow, &fWindowName, &fIconName, 0, 0,
|
||||
fSize_hints, fWM_hints, fClass_hints);
|
||||
|
||||
// request X to Draw window on screen.
|
||||
XMapWindow (fpDisplay, fWindow);
|
||||
|
||||
// Wait for window to appear (wait for an "expose" event).
|
||||
XIfEvent (fpDisplay, &fEvent, WaitForNotify, (char*) fWindow);
|
||||
|
||||
XGetWindowAttributes (fpDisplay, fWindow, &fWA);
|
||||
fWidth = fWA.width;
|
||||
fHeight = fWA.height;
|
||||
G4cout << "G4OwnColormapXView instantiated."
|
||||
"\n A simple X window of visual type "
|
||||
<< fVisualName
|
||||
<< ",\n size " << fWidth << 'x' << fHeight << ", depth " << fDepth;
|
||||
if (fTrueColor) {
|
||||
G4cout << "\nRed shift : " << setw(2) << fRedShift
|
||||
<< ", red max : " << fRedMax;
|
||||
G4cout << "\nGreen shift: " << setw(2) << fGreenShift
|
||||
<< ", green max: " << fGreenMax;
|
||||
G4cout << "\nBlue shift : " << setw(2) << fBlueShift
|
||||
<< ", blue max : " << fBlueMax;
|
||||
}
|
||||
else {
|
||||
G4cout << ",\n with " << fMapEntries << " colormap entries";
|
||||
}
|
||||
G4cout << ", has been opened." << endl;
|
||||
}
|
||||
|
||||
G4OwnColormapXView::~G4OwnColormapXView () {
|
||||
if (fViewId >= 0) {
|
||||
XFree (fSize_hints);
|
||||
XFree (fWM_hints);
|
||||
if(fClass_hints -> res_name!=NULL) free(fClass_hints -> res_name);
|
||||
if(fClass_hints -> res_class!=NULL) free(fClass_hints -> res_class);
|
||||
XFree (fClass_hints);
|
||||
//Close a window from here
|
||||
XUnmapWindow (fpDisplay, fWindow);
|
||||
XDestroyWindow (fpDisplay, fWindow);
|
||||
}
|
||||
if (fpDisplay) {
|
||||
XFlush (fpDisplay);
|
||||
XCloseDisplay (fpDisplay);
|
||||
}
|
||||
}
|
||||
|
||||
void G4OwnColormapXView::ClearView () {
|
||||
XClearWindow (fpDisplay, fWindow);
|
||||
}
|
||||
|
||||
void G4OwnColormapXView::FinishView () {
|
||||
XFlush (fpDisplay);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,85 +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: G4RayMessenger.cc,v 2.4 1998/07/13 17:11:10 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Ray tracing for X windows Messenger - John Allison 5th June 1997
|
||||
|
||||
#include "G4RayMessenger.hh"
|
||||
|
||||
#include "G4RayScene.hh"
|
||||
#include "G4RayView.hh"
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIparameter.hh"
|
||||
|
||||
G4RayMessenger::G4RayMessenger ():
|
||||
fpScene (0),
|
||||
fpView (0)
|
||||
{
|
||||
G4UIcommand* command;
|
||||
G4UIparameter* param;
|
||||
|
||||
///////////////////////////////////////////////// /vis~/ray/... ////
|
||||
//vis \hline
|
||||
//vis /vis~/ray/ &&
|
||||
//vis ...menu of ray tracing commands. \\%
|
||||
command = new G4UIcommand ("/vis~/ray/", this);
|
||||
command -> SetGuidance ("GEANT4 Ray Tracing");
|
||||
fpVisRayCommandDirectory = command;
|
||||
|
||||
///////////////////////////////////////////////// /vis~/ray/resolution ////
|
||||
//vis \hline
|
||||
//vis /vis~/ray/resolution/ & resolution &
|
||||
//vis Set resolution in pixels. A resolution less than 1 causes
|
||||
//vis over-sampling which improves the appearance and avoids random
|
||||
//vis spots and staircase effects (aliasing). \\%
|
||||
command = new G4UIcommand ("/vis~/ray/resolution", this);
|
||||
command -> SetGuidance
|
||||
("Set resolution in pixels. A resolution less than 1 causes"
|
||||
"\nover-sampling which improves the appearance and avoids random"
|
||||
"\nspots and staircase effects (aliasing)."
|
||||
);
|
||||
param = new G4UIparameter ("resolution", 'd', true);
|
||||
param -> SetDefaultValue (-1);
|
||||
command -> SetParameter (param);
|
||||
fpResolutionCommand = command;
|
||||
}
|
||||
|
||||
G4RayMessenger::~G4RayMessenger () {
|
||||
delete fpResolutionCommand;
|
||||
delete fpVisRayCommandDirectory;
|
||||
}
|
||||
|
||||
void G4RayMessenger::SetNewValue (G4UIcommand* command, G4String newValues)
|
||||
{
|
||||
///////////////////////////////////////////////// /vis~/ray/resolution ////
|
||||
if (command == fpResolutionCommand) {
|
||||
G4double resolution;
|
||||
const char* t = newValues;
|
||||
istrstream is ((char*)t); is >> resolution;
|
||||
if (resolution < 0) {
|
||||
G4cout << "Resolution is currently "
|
||||
<< fpView -> GetResolution ()
|
||||
<< "\nSupply required resolution as argument."
|
||||
<< endl;
|
||||
}
|
||||
else {
|
||||
fpView -> SetResolution (resolution);
|
||||
G4cout << "Resolution is now "
|
||||
<< fpView -> GetResolution ()
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G4String G4RayMessenger::GetCurrentValue (G4UIcommand* command) {
|
||||
return "";
|
||||
}
|
||||
@@ -1,60 +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: G4RayPrimaryGeneratorAction.cc,v 2.2 1998/08/05 12:53:43 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#include "G4RayPrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
G4RayPrimaryGeneratorAction::G4RayPrimaryGeneratorAction()
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
particleGun = new G4ParticleGun(n_particle);
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String particleName;
|
||||
G4ParticleDefinition* particle
|
||||
= particleTable->FindParticle(particleName="geantino");
|
||||
particleGun->SetParticleDefinition(particle);
|
||||
|
||||
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.,1.,0.));
|
||||
particleGun->SetParticleEnergy(100.*GeV);
|
||||
particleGun->SetParticlePosition(G4ThreeVector(0.*cm,-300.*cm,0.*cm));
|
||||
}
|
||||
|
||||
G4RayPrimaryGeneratorAction::~G4RayPrimaryGeneratorAction()
|
||||
{
|
||||
delete particleGun;
|
||||
}
|
||||
|
||||
void G4RayPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
/***************************** Moved to constructor.
|
||||
*************************** Change with ParticleGunMessenger.
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String particleName;
|
||||
G4ParticleDefinition* particle
|
||||
= particleTable->FindParticle(particleName="geantino");
|
||||
particleGun->SetParticleDefinition(particle);
|
||||
|
||||
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.,1.,0.));
|
||||
particleGun->SetParticleEnergy(100.*GeV);
|
||||
particleGun->SetParticlePosition(G4ThreeVector(0.*cm,-300.*cm,0.*cm));
|
||||
********************************/
|
||||
particleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
|
||||
G4ParticleGun* G4RayPrimaryGeneratorAction::GetParticleGun()
|
||||
{
|
||||
return particleGun;
|
||||
}
|
||||
@@ -1,101 +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: G4RayScene.cc,v 2.3 1998/11/06 13:41:55 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Nikos Savvas 1st June 1997
|
||||
// GEANT4 Ray Tracing scene.
|
||||
|
||||
#include "G4RayScene.hh"
|
||||
|
||||
G4RayScene::G4RayScene (G4VGraphicsSystem& system,
|
||||
const G4String& name):
|
||||
G4VScene (system, fSceneIdCount++, name)
|
||||
{
|
||||
fSceneCount++;
|
||||
}
|
||||
|
||||
G4RayScene::~G4RayScene ()
|
||||
{
|
||||
fSceneCount--;
|
||||
}
|
||||
|
||||
G4int G4RayScene::GetSceneCount () {
|
||||
return fSceneCount;
|
||||
}
|
||||
|
||||
void G4RayScene::AddPrimitive (const G4Polyline&) {
|
||||
static G4bool warned = false;
|
||||
if (!warned) {
|
||||
warned = true;
|
||||
G4cout << "***WARNING***" << endl;
|
||||
G4cout << " void G4RayScene::AddPrimitive (const G4Polyline&) called."
|
||||
<< " \nG4Ray cannot handle polylines."
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4RayScene::AddPrimitive (const G4Text&) {
|
||||
static G4bool warned = false;
|
||||
if (!warned) {
|
||||
warned = true;
|
||||
G4cout << "***WARNING***" << endl;
|
||||
G4cout << " void G4RayScene::AddPrimitive (const G4Text&) called."
|
||||
<< " \nG4Ray cannot handle text."
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4RayScene::AddPrimitive (const G4Circle&) {
|
||||
static G4bool warned = false;
|
||||
if (!warned) {
|
||||
warned = true;
|
||||
G4cout << "***WARNING***" << endl;
|
||||
G4cout << " void G4RayScene::AddPrimitive (const G4Circle&) called."
|
||||
<< " \nG4Ray cannot handle markers."
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4RayScene::AddPrimitive (const G4Square&) {
|
||||
static G4bool warned = false;
|
||||
if (!warned) {
|
||||
warned = true;
|
||||
G4cout << "***WARNING***" << endl;
|
||||
G4cout << " void G4RayScene::AddPrimitive (const G4Square&) called."
|
||||
<< " \nG4Ray cannot handle markers."
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4RayScene::AddPrimitive (const G4Polyhedron&) {
|
||||
static G4bool warned = false;
|
||||
if (!warned) {
|
||||
warned = true;
|
||||
G4cout << "***WARNING***" << endl;
|
||||
G4cout << "void G4RayScene::AddPrimitive (const G4Polyhedron&) called."
|
||||
<< " \nG4Ray cannot handle polyhedra."
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
void G4RayScene::AddPrimitive (const G4NURBS&) {
|
||||
static G4bool warned = false;
|
||||
if (!warned) {
|
||||
warned = true;
|
||||
G4cout << "***WARNING***" << endl;
|
||||
G4cout << "void G4RayScene::AddPrimitive (const G4NURBS&) called."
|
||||
<< " \nG4Ray cannot handle NURBS."
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
G4int G4RayScene::fSceneIdCount = 0;
|
||||
|
||||
G4int G4RayScene::fSceneCount = 0;
|
||||
@@ -1,109 +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: G4RaySteppingAction.cc,v 2.1 1998/07/13 17:11:12 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// 16/Apr/1997 J. Allison: For visualization/test/test19.
|
||||
|
||||
#include "G4RaySteppingAction.hh"
|
||||
|
||||
#include "G4SteppingManager.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4Polyline.hh"
|
||||
#include "G4Point3D.hh"
|
||||
#include "G4Vector3D.hh"
|
||||
|
||||
G4RaySteppingAction::G4RaySteppingAction() : weHaveContact(false), pVisAttribs(0){}
|
||||
|
||||
void G4RaySteppingAction::UserSteppingAction() {
|
||||
|
||||
G4Step* piStep = GetSteppingManager () -> GetStep ();
|
||||
// G4cout <<"G4Step* piStep: "<< (void *) piStep << endl;
|
||||
|
||||
G4Track* pTrack = piStep -> GetTrack();
|
||||
//G4cout << "G4Track* pTrack: "<<(void *) pTrack << endl;
|
||||
|
||||
pVPV = pTrack -> GetNextVolume();
|
||||
//G4cout << "G4VPhysicalVolume* pVPV: "<<(void *) pVPV << endl;
|
||||
|
||||
if (pVPV) {
|
||||
|
||||
weHaveContact = true;
|
||||
|
||||
pLV = pVPV -> GetLogicalVolume();
|
||||
//G4cout <<"G4LogicalVolume* pLV: "<< (void *) pLV << endl;
|
||||
|
||||
pSol = pLV -> GetSolid();
|
||||
//G4cout <<"G4VSolid* pSol: "<< (void *) pSol << endl;
|
||||
|
||||
G4Point3D point = piStep -> GetPostStepPoint () -> GetPosition ();
|
||||
//G4cout << "Point: " << point << endl;
|
||||
|
||||
G4Vector3D translation = pVPV -> GetTranslation();
|
||||
G4RotationMatrix* rotation = pVPV -> GetRotation();
|
||||
if (rotation) {
|
||||
point.transform(G4Transform3D(*rotation, -translation));
|
||||
}
|
||||
else {
|
||||
point.transform(G4Translate3D(-translation));
|
||||
}
|
||||
//G4cout << "Point after transformation: " << point << endl;
|
||||
|
||||
normal = pSol -> SurfaceNormal(point);
|
||||
//G4cout << "normal: " << normal << endl;
|
||||
|
||||
pVisAttribs = pLV -> GetVisAttributes ();
|
||||
//G4cout << "Vis attributes: " << *pVisAttribs << endl;
|
||||
}
|
||||
else {
|
||||
weHaveContact = false;
|
||||
}
|
||||
|
||||
pTrack -> SetTrackStatus(fStopAndKill);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,783 +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: G4RayView.cc,v 2.9 1998/11/06 13:41:56 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Nikos Savvas 1st June 1997
|
||||
// GEANT4 Ray Tracing view.
|
||||
|
||||
#include "G4RayView.hh"
|
||||
|
||||
#include "G4RayScene.hh"
|
||||
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "geomdefs.hh"
|
||||
|
||||
#include "G4VSolid.hh"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#ifdef GNU_GCC
|
||||
template class RWTValHashDictionary <G4RayCoordinate, G4RayHitColour>;
|
||||
template class RWTValHashDictionary <G4RayHitColour, G4int>;
|
||||
#endif
|
||||
|
||||
G4RayView::G4RayView (G4RayScene& scene, const G4String& name):
|
||||
G4VView (scene, -1, name),
|
||||
fScene (scene),
|
||||
fpWorld (0)
|
||||
{
|
||||
//RUN MANAGER
|
||||
fG4RayRunManager = new G4RunManager;
|
||||
|
||||
//G4RaySteppingAction
|
||||
fG4RaySteppingAction = new G4RaySteppingAction;
|
||||
|
||||
//Gun
|
||||
fG4RayGenerator = new G4RayPrimaryGeneratorAction;
|
||||
|
||||
fG4RayRunManager -> SetUserAction ( fG4RayGenerator );
|
||||
fG4RayRunManager -> SetUserAction ( fG4RaySteppingAction);
|
||||
|
||||
fG4RayGun = fG4RayGenerator -> GetParticleGun();
|
||||
}
|
||||
|
||||
G4RayView::~G4RayView(){
|
||||
|
||||
delete fG4RayRunManager;
|
||||
// Note: G4RunManager deletes userPrimaryGeneratorAction, what we
|
||||
// have called fG4RayGenerator). And G4SteppingManager deletes
|
||||
// fUserSteppingAction, what we have called fG4RaySteppingAction
|
||||
|
||||
}
|
||||
|
||||
void G4RayView::SetView () {
|
||||
|
||||
fpWorld = G4TransportationManager::GetTransportationManager ()
|
||||
-> GetNavigatorForTracking () -> GetWorldVolume ();
|
||||
|
||||
// We need to know the world so we can be sure to start traceing inside.
|
||||
|
||||
if (!fpWorld) {
|
||||
G4Exception ("G4RayView::SetView: no world established yet!");
|
||||
}
|
||||
|
||||
// VECTORS
|
||||
|
||||
const G4Vector3D& viewvector = fVP.GetViewpointDirection().unit();
|
||||
// view vector on the line from the target point to the eye-- view
|
||||
// point direction
|
||||
|
||||
const G4Vector3D& upvector = fVP.GetUpVector().unit(); // the up vector of the volume
|
||||
|
||||
const G4Vector3D& lightDirection = fVP.GetActualLightpointDirection().unit();
|
||||
// vector of incident light
|
||||
|
||||
|
||||
// DOUBLES
|
||||
G4double radius = fScene.GetSceneData ().GetExtent ().GetExtentRadius ();
|
||||
//radius of the bounding sphere.
|
||||
|
||||
G4double cameradistance = fVP.GetCameraDistance (radius);
|
||||
// from the center of the bounding sphere to the camera.
|
||||
|
||||
G4double johnsneardistance = fVP.GetNearDistance (cameradistance, radius);
|
||||
|
||||
G4double halfheight = fVP.GetFrontHalfHeight (johnsneardistance, radius);
|
||||
// half the size of the front view plane (screen)
|
||||
|
||||
// xprime ,yprime, zprime define the screen coordinate system.
|
||||
G4Vector3D zprime = viewvector.unit();
|
||||
G4Vector3D xprime = (upvector.cross(viewvector)).unit();
|
||||
G4Vector3D yprime = (zprime.cross(xprime)).unit();
|
||||
// Make xprime and yprime have lengths equal to halfheight so that
|
||||
// they can be multplied by a screen coordinate in the range -1 to
|
||||
// +1.
|
||||
fXprime = halfheight * xprime;
|
||||
fYprime = halfheight * yprime;
|
||||
|
||||
|
||||
// POINTS
|
||||
const G4Point3D& centeroftarget = fVP.GetCurrentTargetPoint ();// the center of target
|
||||
|
||||
|
||||
//fCenterofscreen = centeroftarget + radius * viewvector.unit();
|
||||
fCamerapoint = centeroftarget + cameradistance * viewvector.unit();
|
||||
fCenterofscreen = fCamerapoint - johnsneardistance * viewvector.unit();
|
||||
|
||||
G4cout << " The viewvector is : " << viewvector<<endl;
|
||||
G4cout << " The lightDirection is : " << lightDirection << endl;
|
||||
G4cout << " The cameraDistance is: " << cameradistance << endl;
|
||||
G4cout << " fCamerapoint is : " << fCamerapoint << endl;
|
||||
G4cout << " fCenterofscreen is : " << fCenterofscreen << endl;
|
||||
G4cout << " centeroftarget is : " << centeroftarget << endl;
|
||||
|
||||
}
|
||||
|
||||
G4ViewParameters G4RayView::fImageViewParameters;
|
||||
G4double G4RayView::fInitialResolution = 27.;
|
||||
G4double G4RayView::fRequestedResolution = 27.;
|
||||
G4double G4RayView::fCurrentResolution = 27.;
|
||||
G4float G4RayView::fMaxMinColourSeparation = 0.;
|
||||
G4int G4RayView::fImageWidth = 0;
|
||||
G4int G4RayView::fImageHeight = 0;
|
||||
G4int G4RayView::fMaxImageMapEntries = 0;
|
||||
G4bool G4RayView::fImageMapRejigged = true;
|
||||
G4bool G4RayView::fTriggerRescan = true;
|
||||
G4int G4RayView::fWaitLimit = 200;
|
||||
G4int G4RayView::fWaitCount = 200;
|
||||
|
||||
RWTValOrderedVector <G4RayColourCell>
|
||||
G4RayView::fRayHitColourMap (256);
|
||||
|
||||
RWTValHashDictionary <G4RayCoordinate, G4RayHitColour>
|
||||
G4RayView::fRayHits (G4RayView::RayCoordHash, 1000);
|
||||
|
||||
RWTValHashDictionary <G4RayHitColour, G4int>
|
||||
G4RayView::fRayHitColourIndex (G4RayView::RayColourHash, 1000);
|
||||
|
||||
void G4RayView::InitialiseImage () {
|
||||
fRayHitColourMap.clear ();
|
||||
fRayHits.clear ();
|
||||
fMaxMinColourSeparation = 0.;
|
||||
fInitialResolution = 27;
|
||||
fCurrentResolution = fInitialResolution;
|
||||
fRequestedResolution = fInitialResolution;
|
||||
G4cout << "Requested resolution reset to " << fRequestedResolution << endl;
|
||||
fWaitLimit = 200;
|
||||
G4cout << "Wait limit reset to: " << fWaitLimit
|
||||
<< "\n(e.g, display refreshed every this many rays traced.)"
|
||||
<< endl;
|
||||
TriggerRedraw ();
|
||||
}
|
||||
|
||||
void G4RayView::TriggerRedraw () {
|
||||
fImageMapRejigged = true;
|
||||
fTriggerRescan = true;
|
||||
fWaitCount = fWaitLimit;
|
||||
}
|
||||
|
||||
G4bool G4RayView::Scan (int& i, int& j, int& k,
|
||||
float& red, float& green, float& blue,
|
||||
int& iPixVal) {
|
||||
|
||||
static G4bool Done = true;
|
||||
static G4bool nearlyDone;
|
||||
static G4double cellSize;
|
||||
static G4int requestedNoOfRays;
|
||||
static G4int doneCount;
|
||||
static G4int u, v;
|
||||
|
||||
|
||||
if (Done) { // Assume called anew.
|
||||
if (fRequestedResolution < 1.0) {
|
||||
G4cout <<
|
||||
"Over-sampling not implemented - resetting requested resolution to 1."
|
||||
<< endl;
|
||||
fRequestedResolution = 1.;
|
||||
}
|
||||
Done = false;
|
||||
nearlyDone = false;
|
||||
requestedNoOfRays = (int)
|
||||
((((fImageWidth - 1) / fRequestedResolution) + 1) *
|
||||
(((fImageHeight - 1) / fRequestedResolution) + 1));
|
||||
doneCount = 1;
|
||||
cellSize = fInitialResolution;
|
||||
u = v = 0;
|
||||
if (fCurrentResolution >= 3 * fRequestedResolution) {
|
||||
G4cout << "Resizing Ray Hits Dictionaries - " << requestedNoOfRays
|
||||
<< " buckets." << endl;
|
||||
fRayHits.resize (requestedNoOfRays);
|
||||
fRayHitColourIndex.resize (requestedNoOfRays);
|
||||
G4cout << "Continuing..." << endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (fTriggerRescan) {
|
||||
fTriggerRescan = false;
|
||||
cellSize = 3 * cellSize;
|
||||
u = v = 0;
|
||||
}
|
||||
|
||||
if (fRayHitColourMap.entries () >= fMaxImageMapEntries) {
|
||||
static int count = 0;
|
||||
if (count++ < 10 || count % 10 == 0) {
|
||||
G4cout << "G4RayView::Scan: compacting colour map - count = "
|
||||
<< count << endl;
|
||||
}
|
||||
CompactColour (false);
|
||||
if (fRayHitColourMap.entries () >= fMaxImageMapEntries) {
|
||||
G4Exception ("G4RayView::Scan: compaction failure!");
|
||||
}
|
||||
fImageMapRejigged = true;
|
||||
}
|
||||
|
||||
i = u;
|
||||
j = v;
|
||||
k = int (cellSize);
|
||||
|
||||
G4double x = 2. * (G4double (i + cellSize / 2) / fImageWidth - 0.5);
|
||||
G4double y = 2. * (0.5 - G4double (j + cellSize / 2) / fImageHeight);
|
||||
if (x > 1.0) x = 1.0;
|
||||
if (y < -1.0) y = -1.0;
|
||||
|
||||
G4RayCoordinate rayCoord (x, y);
|
||||
G4RayHitColour rayHitColour;
|
||||
if (fRayHits.findValue (rayCoord, rayHitColour)) {
|
||||
iPixVal = fRayHitColourIndex [rayHitColour]; // Old pixval.
|
||||
red = rayHitColour.GetRed ();
|
||||
green = rayHitColour.GetGreen ();
|
||||
blue = rayHitColour.GetBlue ();
|
||||
//G4cout << "G4RayView::Scan: " << x << ", " << y << " already traced."
|
||||
// " Pixval = " << iPixVal
|
||||
// << endl;
|
||||
}
|
||||
else {
|
||||
// Initiate a new ray.
|
||||
Trace (x, y, red, green, blue);
|
||||
doneCount++;
|
||||
int ii;
|
||||
for (ii = 0; ii < fRayHitColourMap.entries (); ii++) {
|
||||
G4RayColourCell& colourCell = fRayHitColourMap [ii];
|
||||
if (ColourSeparation
|
||||
(red, green, blue,
|
||||
colourCell.red, colourCell.green, colourCell.blue) < 0.01) {
|
||||
break; // ...if there's a close-match.
|
||||
}
|
||||
}
|
||||
iPixVal = ii; // If no close-match found, ii = no. of entries, which
|
||||
// will be no. of entries - 1 after append.
|
||||
if (iPixVal == fRayHitColourMap.entries ())
|
||||
fRayHitColourMap.append (G4RayColourCell (red, green, blue, 1));
|
||||
rayHitColour = G4RayHitColour (red, green, blue);
|
||||
fRayHits.insertKeyAndValue (rayCoord, rayHitColour);
|
||||
fRayHitColourIndex.insertKeyAndValue (rayHitColour, iPixVal);
|
||||
}
|
||||
|
||||
//G4cout << "G4RayView::Scan: Draw x,y,r,g,b,i,j,k,iPixVal: "
|
||||
// << x << ' ' << y << ' ' << red << ' ' << green << ' ' << blue << ' '
|
||||
// << i << ' ' << j << ' ' << k << ' ' << iPixVal
|
||||
// << endl;
|
||||
|
||||
if (!(doneCount % fWaitLimit) && !nearlyDone) {
|
||||
doneCount = 1;
|
||||
G4cout << "G4RayView::Scan: "
|
||||
<< (int) ((100. * (fImageWidth * v + u)) /
|
||||
(fImageWidth * fImageHeight))
|
||||
<< "% Done at cell-size "
|
||||
<< cellSize
|
||||
<< endl;
|
||||
}
|
||||
|
||||
u += int (cellSize);
|
||||
|
||||
if (u >= fImageWidth) {
|
||||
u = 0;
|
||||
v += int (cellSize);
|
||||
}
|
||||
|
||||
if (v >= fImageHeight) {
|
||||
u = v = 0;
|
||||
cellSize = cellSize / 3; // Next size down.
|
||||
}
|
||||
|
||||
if ((cellSize < fRequestedResolution
|
||||
|| 3 * cellSize < 1.)
|
||||
// The above line can be removed when over-sampling implemented.
|
||||
&& !nearlyDone
|
||||
) {
|
||||
G4cout << "G4RayView::Scan: final redraw." << endl;
|
||||
nearlyDone = true;
|
||||
cellSize = 3 * cellSize;
|
||||
u = v = 0;
|
||||
TriggerRedraw ();
|
||||
}
|
||||
|
||||
if ((cellSize < fRequestedResolution
|
||||
|| 3 * cellSize < 1.)
|
||||
// The above line can be removed when over-sampling implemented.
|
||||
&& nearlyDone
|
||||
) {
|
||||
fCurrentResolution = 3 * cellSize;
|
||||
G4cout << "G4RayView::Scan: requested resolution = "
|
||||
<< fRequestedResolution
|
||||
<< ", achieved\nresolution = "
|
||||
<< fCurrentResolution << " (always a Power of 3).";
|
||||
G4cout << "\nNo. of ray hits = " << fRayHits.entries ();
|
||||
G4cout << "\nNo. of ray Hit colours = " << fRayHitColourIndex.entries ();
|
||||
G4cout << "\nNo. of colourmap entries = " << fRayHitColourMap.entries ();
|
||||
fWaitLimit = 3 * fWaitLimit;
|
||||
G4cout << "\nWait limit increased to: " << fWaitLimit
|
||||
<< "\n(e.g, display refreshed every this many rays traced.)";
|
||||
if (fRequestedResolution < 1.) {
|
||||
G4cout << "\nOver-sampling (resolution < 1.) not implemented.";
|
||||
}
|
||||
G4cout << "\nYou can continue as follows:"
|
||||
"\n/vis~/ray/resolution " << cellSize
|
||||
<< "\n/vis~/draw/current"
|
||||
"\n(It may take some time - 10 Times longer than so far!!!"
|
||||
"\nMoreover, it will use about another "
|
||||
<< 30 * (((fImageWidth - 1) / cellSize) + 1) *
|
||||
(((fImageHeight - 1) / cellSize) + 1) * 1.e-6
|
||||
<< " MB of memory to Store the image.)";
|
||||
G4cout << endl;
|
||||
Done = true;
|
||||
}
|
||||
|
||||
return !Done;
|
||||
}
|
||||
|
||||
void G4RayView::CompactColour (G4bool Print) {
|
||||
|
||||
G4int i;
|
||||
G4int j;
|
||||
|
||||
RWTValOrderedVector <G4RayColourCell>& cmap = fRayHitColourMap;
|
||||
|
||||
G4double minColourSeparation = 2.;
|
||||
// i.e, bigger than possible in the colour cube.
|
||||
for (i = 0; i < cmap.entries (); i++) {
|
||||
G4RayColourCell& celli = fRayHitColourMap [i];
|
||||
for (j = i + 1; j < cmap.entries (); j++) {
|
||||
G4RayColourCell& cellj = fRayHitColourMap [j];
|
||||
float colourSeparation = ColourSeparation
|
||||
(celli.red, celli.green, celli.blue,
|
||||
cellj.red, cellj.green, cellj.blue);
|
||||
if (minColourSeparation > colourSeparation) {
|
||||
minColourSeparation = colourSeparation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fMaxMinColourSeparation < minColourSeparation) {
|
||||
fMaxMinColourSeparation = minColourSeparation;
|
||||
G4cout << "G4RayView::CompactColour: minColourSeparation has peaked at "
|
||||
<< minColourSeparation << endl;
|
||||
}
|
||||
|
||||
if (minColourSeparation > 0.125) {
|
||||
G4cerr << "G4RayView::CompactColour: WARNING: minimum colour separation"
|
||||
"\nis greater than 0.125, the separation of R/G/B 3/3/2!" << endl;
|
||||
}
|
||||
|
||||
G4int foundi;
|
||||
G4int foundij [2];
|
||||
RWTValOrderedVector <G4int> foundjs;
|
||||
G4int jj;
|
||||
|
||||
// Process all pairs with colour separation < compaction * minimum.
|
||||
const float compaction = 1.5;
|
||||
do {
|
||||
foundi = -1;
|
||||
for (i = 0; i < cmap.entries (); i++) {
|
||||
G4RayColourCell& celli = fRayHitColourMap [i];
|
||||
for (j = i + 1; j < cmap.entries (); j++) {
|
||||
G4RayColourCell& cellj = fRayHitColourMap [j];
|
||||
float colourSeparation = ColourSeparation
|
||||
(celli.red, celli.green, celli.blue,
|
||||
cellj.red, cellj.green, cellj.blue);
|
||||
if (colourSeparation < compaction * minColourSeparation) {
|
||||
if (foundi < 0) {
|
||||
foundi = i;
|
||||
foundjs.clear ();
|
||||
foundjs.append (i); // First entry is the i value.
|
||||
}
|
||||
foundjs.append (j);
|
||||
}
|
||||
}
|
||||
if (foundi >= 0) break;
|
||||
}
|
||||
|
||||
if (foundi >= 0) {
|
||||
|
||||
if (Print) {
|
||||
G4cout << "G4RayView::CompactColour: foundjs:";
|
||||
for (jj = 0; jj < foundjs.entries (); jj++) {
|
||||
G4cout << ' ' << foundjs [jj];
|
||||
}
|
||||
G4int iii = 0;
|
||||
G4cout << "\nG4RayView::CompactColour: (colour, index) before:";
|
||||
fRayHitColourIndex.applyToKeyAndValue (PrintPixVals, (void *) &iii);
|
||||
}
|
||||
|
||||
// Change all ray hits with pix val j to pix val i.
|
||||
fRayHitColourIndex.applyToKeyAndValue (ChangePixVals, (void *) &foundjs);
|
||||
// Decrement pix vals of all ray hits with pix val j + 1 and and above.
|
||||
for (jj = foundjs.entries (); jj-- > 1;) { // ...in reverse order so
|
||||
// that decrements are applied in the correct order.
|
||||
G4int jjj = foundjs [jj];
|
||||
fRayHitColourIndex.applyToKeyAndValue
|
||||
(DecrementPixVals, (void *) &jjj);
|
||||
}
|
||||
|
||||
// Recalculate colour map and remove redundant entries.
|
||||
G4RayColourCell& celli = fRayHitColourMap [foundi];
|
||||
for (jj = foundjs.entries (); jj-- > 1;) { // ...in reverse order so
|
||||
// that we can safely remove colour cells.
|
||||
G4int jjj = foundjs [jj];
|
||||
G4RayColourCell& cellj = fRayHitColourMap [jjj];
|
||||
// Recompute colour of cell.
|
||||
G4int N = (celli.nHits + cellj.nHits);
|
||||
celli.red = (celli.nHits * celli.red
|
||||
+ cellj.nHits * cellj.red) / N;
|
||||
celli.green = (celli.nHits * celli.green
|
||||
+ cellj.nHits * cellj.green) / N;
|
||||
celli.blue = (celli.nHits * celli.blue
|
||||
+ cellj.nHits * cellj.blue) / N;
|
||||
celli.nHits = N;
|
||||
// Finally, remove the redundant cells.
|
||||
if (Print) G4cout << "Removing " << jjj << endl;
|
||||
fRayHitColourMap.removeAt (jjj);
|
||||
}
|
||||
|
||||
if (Print) {
|
||||
G4int iii = 0;
|
||||
G4cout << "\nG4RayView::CompactColour: (colour, index) after:";
|
||||
fRayHitColourIndex.applyToKeyAndValue (PrintPixVals, (void *) &iii);
|
||||
G4cout << endl;
|
||||
}
|
||||
|
||||
}
|
||||
} while (foundi >=0);
|
||||
|
||||
if (Print) {
|
||||
G4cout << "G4RayView::CompactColour: map compressed to "
|
||||
<< fRayHitColourMap.entries ()
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
float G4RayView::ColourSeparation (float ri, float gi, float bi,
|
||||
float rj, float gj, float bj) {
|
||||
float sep = abs (rj -ri);
|
||||
float sepg = abs (gj - gi);
|
||||
if (sep < sepg) sep = sepg;
|
||||
float sepb = abs (bj - bi) / 2.;
|
||||
if (sep < sepb) sep = sepb;
|
||||
return sep;
|
||||
}
|
||||
|
||||
void G4RayView::ChangePixVals (const G4RayHitColour& colour,
|
||||
G4int& index, void* pfjs) {
|
||||
|
||||
RWTValOrderedVector <G4int>* pfoundjs = (RWTValOrderedVector <G4int>*) pfjs;
|
||||
G4int i = (*pfoundjs) [0];
|
||||
|
||||
// Change all ray Hit colours with index j to index i.
|
||||
for (int jj = 1; jj < (*pfoundjs).entries (); jj++) {
|
||||
G4int j = (*pfoundjs) [jj];
|
||||
if (index == j) {
|
||||
//G4cout << "G4RayView::ChangePixVal: ray Hit colour index changed from "
|
||||
// << index;
|
||||
index = i;
|
||||
//G4cout << " to " << index << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void G4RayView::DecrementPixVals (const G4RayHitColour& colour,
|
||||
G4int& index, void* pjjj) {
|
||||
G4int jjj = * (G4int*) pjjj;
|
||||
// Decrement indices all ray Hit colours with index jjj + 1 and above.
|
||||
if (index > jjj) {
|
||||
//G4cout << index << " decremented." << endl;
|
||||
index--;
|
||||
}
|
||||
}
|
||||
|
||||
void G4RayView::PrintPixVals (const G4RayHitColour& colour,
|
||||
G4int& index, void* pjjj) {
|
||||
G4cout << ' '
|
||||
//<< '(' << colour.colour << ','
|
||||
<< index
|
||||
//<< ')'
|
||||
;
|
||||
}
|
||||
|
||||
void G4RayView::Trace (G4double x, G4double y,
|
||||
float& red, float& green, float& blue) {
|
||||
|
||||
// Colour
|
||||
G4Colour colour; // The colour of the object
|
||||
G4double Ip = 0.6 ; // incident light intensity
|
||||
G4double Id = 0.9 ; // reflected light intensity
|
||||
G4double Ia = 0.2; // ambient light intensity
|
||||
G4double I; // total intensity
|
||||
G4double intrinsicred; // intrinsic colour of the object
|
||||
G4double intrinsicgreen; // given in red green
|
||||
G4double intrinsicblue; // and blue
|
||||
G4double outsideDistance;
|
||||
|
||||
|
||||
G4Point3D newPoint;
|
||||
|
||||
G4double Dot; // Dot product of the normal vector of surface
|
||||
// with the normalized vector of incident light
|
||||
G4double reflectionDot; // Dot product of the normal vector of reflection
|
||||
// with the normal vector of angle of viewing
|
||||
G4Vector3D rayDirection; //unit vector, the ray direction.
|
||||
G4Point3D rayPosition; // position of ray on the front view plane
|
||||
|
||||
G4Vector3D roughrayDirection; // the vector from camera to
|
||||
//the point on screen
|
||||
G4Vector3D reflightDirection; // vector of reflection light
|
||||
G4Vector3D screenvector; // vector on the front view plane pointing from
|
||||
// the center of screen to a given point on screen
|
||||
|
||||
const G4Vector3D& viewvector = fVP.GetViewpointDirection().unit();
|
||||
// view vector on the line from the target point to the eye-- view
|
||||
// point direction
|
||||
|
||||
const G4Vector3D& lightDirection = fVP.GetActualLightpointDirection().unit();
|
||||
// vector of incident light
|
||||
|
||||
|
||||
|
||||
EInside whereisit;
|
||||
|
||||
screenvector = fXprime * x + fYprime * y;
|
||||
rayPosition = fCenterofscreen + screenvector;
|
||||
|
||||
if (fVP.GetFieldHalfAngle() == 0 ) {
|
||||
rayDirection = - viewvector.unit();
|
||||
}
|
||||
else {
|
||||
roughrayDirection = rayPosition - fCamerapoint;
|
||||
rayDirection = roughrayDirection.unit();
|
||||
}
|
||||
|
||||
// Default - black.
|
||||
I = 0;
|
||||
|
||||
// Check if rayPosition is in the world.
|
||||
outsideDistance = kInfinity;
|
||||
whereisit = fpWorld -> GetLogicalVolume() -> GetSolid()->Inside(rayPosition);
|
||||
if (whereisit == kInside) {
|
||||
outsideDistance = 0.;
|
||||
}
|
||||
else { // It's outside the world, so move it inside.
|
||||
outsideDistance = fpWorld -> GetLogicalVolume() ->
|
||||
GetSolid()-> DistanceToIn(rayPosition,rayDirection);
|
||||
if ( outsideDistance != kInfinity) {
|
||||
rayPosition = rayPosition + outsideDistance * rayDirection;
|
||||
}
|
||||
}
|
||||
|
||||
if (outsideDistance != kInfinity) {
|
||||
|
||||
fG4RayGun -> SetParticlePosition(rayPosition);
|
||||
fG4RayGun -> SetParticleMomentumDirection(rayDirection);
|
||||
|
||||
fG4RayRunManager -> BeamOn(1);
|
||||
|
||||
if (fG4RaySteppingAction -> WeHaveContact ()) {
|
||||
|
||||
// Store these in the scene so we can use culling algorithms.
|
||||
// Not figured out how to do this yet.
|
||||
// Certainly we don't need to Store these in the scene now
|
||||
// culling is Done in the modeling category.
|
||||
// Rethink this.
|
||||
//fScene.SetWorkingPhysicalVolume
|
||||
//(fG4RaySteppingAction -> GetPhysicalVolume ());
|
||||
//fScene.SetWorkingLogicalVolume
|
||||
//(fG4RaySteppingAction -> GetLogicalVolume ());
|
||||
//fScene.SetWorkingSolid (fG4RaySteppingAction -> GetSolid ());
|
||||
const G4VisAttributes* pVA =
|
||||
fG4RaySteppingAction -> GetVisAttributes();
|
||||
pVA = GetApplicableVisAttributes (pVA);
|
||||
//fScene.SetWorkingVisAttributes (pVA);
|
||||
|
||||
/**** if (!fScene.IsThisCulled ()) ****/ {
|
||||
|
||||
G4Normal3D normal = fG4RaySteppingAction -> GetSurfaceNormal ();
|
||||
|
||||
// Return colour of the object
|
||||
colour = pVA -> GetColour();
|
||||
intrinsicred = colour.GetRed();
|
||||
intrinsicgreen = colour.GetGreen();
|
||||
intrinsicblue = colour.GetBlue();
|
||||
|
||||
//G4cout << "The intrnsic red colour is: " << red << endl;
|
||||
//G4cout << "The intrinsic green colour is: " << green << endl;
|
||||
//G4cout << "The intrinsic blue colour is: " << blue << endl;
|
||||
|
||||
// Calculate Intencity.
|
||||
Dot = normal.unit() * lightDirection.unit();
|
||||
reflightDirection = 2.0 * Dot * normal.unit() - lightDirection.unit();
|
||||
reflectionDot = viewvector.unit() * reflightDirection.unit();
|
||||
|
||||
if (Dot < 0) Dot = 0;
|
||||
if (reflectionDot < 0) reflectionDot = 0;
|
||||
I = Ia + Ip * Dot ; //+ Id * pow(reflectionDot,90);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
/*************
|
||||
else {
|
||||
|
||||
outsideDistance = fpWorld -> GetLogicalVolume() -> GetSolid()-> DistanceToIn(rayPosition,rayDirection);
|
||||
if ( outsideDistance == kInfinity) {I=0;}
|
||||
|
||||
else{
|
||||
newPoint = rayPosition + outsideDistance * rayDirection;
|
||||
|
||||
fG4RayGun -> SetParticlePosition(newPoint);
|
||||
fG4RayGun -> SetParticleMomentumDirection(rayDirection);
|
||||
|
||||
fG4RayRunManager -> BeamOn(1);
|
||||
|
||||
if (fG4RaySteppingAction -> WeHaveContact ()) {
|
||||
|
||||
// Store these in the scene so we can use culling algorithms.
|
||||
fScene.SetWorkingPhysicalVolume
|
||||
(fG4RaySteppingAction -> GetPhysicalVolume ());
|
||||
fScene.SetWorkingLogicalVolume
|
||||
(fG4RaySteppingAction -> GetLogicalVolume ());
|
||||
fScene.SetWorkingSolid (fG4RaySteppingAction -> GetSolid ());
|
||||
const G4VisAttributes* pVA =
|
||||
fG4RaySteppingAction -> GetVisAttributes();
|
||||
pVA = GetApplicableVisAttributes (pVA);
|
||||
fScene.SetWorkingVisAttributes (pVA);
|
||||
|
||||
if (!fScene.IsThisCulled ()) {
|
||||
|
||||
G4Normal3D normal = fG4RaySteppingAction -> GetSurfaceNormal ();
|
||||
|
||||
// Return colour of the object
|
||||
colour = pVA -> GetColour();
|
||||
intrinsicred = colour.GetRed();
|
||||
intrinsicgreen = colour.GetGreen();
|
||||
intrinsicblue = colour.GetBlue();
|
||||
|
||||
//G4cout << "The intrnsic red colour is: " << red << endl;
|
||||
//G4cout << "The intrinsic green colour is: " << green << endl;
|
||||
//G4cout << "The intrinsic blue colour is: " << blue << endl;
|
||||
|
||||
// Calculate Intencity.
|
||||
Dot = normal.unit() * lightDirection.unit();
|
||||
reflightDirection =
|
||||
2.0 * Dot * normal.unit() - lightDirection.unit();
|
||||
reflectionDot = viewvector.unit() * reflightDirection.unit();
|
||||
|
||||
if (Dot < 0) Dot = 0;
|
||||
if (reflectionDot < 0) reflectionDot = 0;
|
||||
I = Ia + Ip * Dot ; //+ Id * pow(reflectionDot,90);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
**********************/
|
||||
|
||||
// G4cout << " Intensity : " << I << endl;
|
||||
|
||||
red = intrinsicred * I ;
|
||||
green = intrinsicgreen * I ;
|
||||
blue = intrinsicblue * I;
|
||||
if (I > 0.) {
|
||||
G4double specular = Id * pow(reflectionDot,10);
|
||||
red += specular;
|
||||
green += specular;
|
||||
blue += specular;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// A very testing pallette...
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
if (x < -0.8) {
|
||||
red = (y + 1.) / 2.;
|
||||
green = 0;
|
||||
blue = 0;
|
||||
}
|
||||
else if (x < -0.6) {
|
||||
red = 0;
|
||||
green = (y + 1.) / 2.;
|
||||
blue = 0;
|
||||
}
|
||||
else if (x < -0.4) {
|
||||
red = 0;
|
||||
green = 0;
|
||||
blue = (y + 1.) / 2.;
|
||||
}
|
||||
else if (x < -0.2) {
|
||||
red = 0;
|
||||
green = (y + 1.) / 2.;
|
||||
blue = (y + 1.) / 2.;
|
||||
}
|
||||
else if (x < 0.) {
|
||||
red = (y + 1.) / 2.;
|
||||
green = 0;
|
||||
blue = (y + 1.) / 2.;
|
||||
}
|
||||
else if (x < 0.2) {
|
||||
red = (y + 1.) / 2.;
|
||||
green = (y + 1.) / 2.;
|
||||
blue = 0.;
|
||||
}
|
||||
else if (x < 0.4) {
|
||||
red = (y + 1.) / 2.;
|
||||
green = (y + 1.) / 2.;
|
||||
blue = (y + 1.) / 2.;
|
||||
}
|
||||
else {
|
||||
red = pow (sin (y), 2);
|
||||
green = pow (cos (y), 2);
|
||||
blue = x * x;
|
||||
}
|
||||
|
||||
***********************************/
|
||||
/**********************************
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// A shiny red sphere...
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
const G4double size (0.5);
|
||||
const G4Point3D centre;
|
||||
const G4double ambient (0.2);
|
||||
const G4Vector3D viewpointDirection (0.0, 0.0, 1.0);
|
||||
const G4Vector3D lightpointDirection = G4Vector3D (1.0, 1.0, 1.0).unit ();
|
||||
G4double p = sqrt (pow (x - centre.x (), 2) + pow (y - centre.y (), 2));
|
||||
if (p > 0.5) {
|
||||
red = green = blue = 0.;
|
||||
}
|
||||
else {
|
||||
G4double z = sqrt (pow (size,2) - pow (p, 2));
|
||||
G4Vector3D radiusVector (x, y, z);
|
||||
G4double brightness = radiusVector.unit () * lightpointDirection;
|
||||
if (brightness < 0.0) brightness = 0.0;
|
||||
G4Vector3D reflightDirection =
|
||||
2.0 * brightness * radiusVector.unit () - lightpointDirection;
|
||||
G4double reflectionDot =
|
||||
viewpointDirection.unit() * reflightDirection.unit();
|
||||
if (reflectionDot < 0) reflectionDot = 0;
|
||||
G4double specular = pow (reflectionDot, 10);
|
||||
red = ambient + (1.0 - ambient) * brightness;
|
||||
red += specular;
|
||||
green += specular;
|
||||
blue += specular;
|
||||
}
|
||||
|
||||
**************************/
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// Always check...
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
if (red < 0.) red = 0.;
|
||||
if (green < 0.) green = 0.;
|
||||
if (blue < 0.) blue = 0.;
|
||||
if (red > 1.) red = 1.;
|
||||
if (green > 1.) green = 1.;
|
||||
if (blue > 1.) blue = 1.;
|
||||
}
|
||||
@@ -1,72 +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: G4RayX.cc,v 2.2 1998/11/06 13:41:57 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Nikos Savvas 1st June 1997
|
||||
// GEANT4 Ray Tracing graphics system factory.
|
||||
|
||||
#ifdef G4VIS_BUILD_RAYX_DRIVER
|
||||
|
||||
#include "G4RayX.hh"
|
||||
|
||||
#include "G4VisFeaturesOfRay.hh"
|
||||
#include "G4RayXMessenger.hh"
|
||||
#include "G4RayScene.hh"
|
||||
#include "G4RayXView.hh"
|
||||
|
||||
G4RayX::G4RayX ():
|
||||
G4VGraphicsSystem ("G4RayX",
|
||||
"RayX",
|
||||
G4VisFeaturesOfRayX (),
|
||||
G4VGraphicsSystem::twoD) {
|
||||
if (fInstances >= 1) {
|
||||
G4Exception ("An attempt to instantiate a second G4RayX object.");
|
||||
}
|
||||
fInstances++;
|
||||
// Instantiate my messenger.
|
||||
fpMessenger = new G4RayXMessenger (this);
|
||||
}
|
||||
|
||||
G4RayX::~G4RayX () {
|
||||
delete fpMessenger;
|
||||
fInstances--;
|
||||
}
|
||||
|
||||
G4VScene* G4RayX::CreateScene (const G4String& name) {
|
||||
G4RayScene* pRayScene = new G4RayScene (*this, name);
|
||||
G4VScene* pScene = pRayScene;
|
||||
G4cout << G4RayScene::GetSceneCount ()
|
||||
<< ' ' << fName << " scenes extanct." << endl;
|
||||
fpMessenger -> RegisterScene ((G4RayScene*) pScene);
|
||||
return pScene;
|
||||
}
|
||||
|
||||
G4VView* G4RayX::CreateView (G4VScene& scene, const G4String& name) {
|
||||
G4RayView* pRayXView = new G4RayXView ((G4RayScene&) scene, name);
|
||||
G4VView* pView = pRayXView;
|
||||
if (pView) {
|
||||
if (pView -> GetViewId () < 0) {
|
||||
G4cerr << "Error flagged by negative view id in G4RayXView creation."
|
||||
"\nDestroying view and returning null pointer."
|
||||
<<endl;
|
||||
delete pView;
|
||||
pView = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
G4cerr << "Null pointer on new G4RayXView." << endl;
|
||||
}
|
||||
fpMessenger -> RegisterView (pRayXView);
|
||||
return pView;
|
||||
}
|
||||
|
||||
G4int G4RayX::fInstances = 0;
|
||||
|
||||
#endif
|
||||
@@ -1,49 +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: G4RayXMessenger.cc,v 2.4 1998/07/16 01:57:32 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Ray tracing for X windows Messenger - John Allison 5th June 1997
|
||||
|
||||
#ifdef G4VIS_BUILD_RAYX_DRIVER
|
||||
|
||||
#include "G4RayXMessenger.hh"
|
||||
|
||||
#include "G4RayX.hh"
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIparameter.hh"
|
||||
|
||||
G4RayXMessenger::G4RayXMessenger (G4RayX* pRayX):
|
||||
fpRayX (pRayX)
|
||||
{
|
||||
G4UIcommand* command;
|
||||
G4UIparameter* param;
|
||||
|
||||
///////////////////////////////////////////////// /vis~/ray/X... ////
|
||||
//vis \hline
|
||||
//vis /vis~/ray/X... &&
|
||||
//vis ...any X-special commands for ray tracing... \\%
|
||||
//command = new G4UIcommand ("/vis~/ray/X...", this);
|
||||
//command -> SetGuidance ("...any X-special commands for ray tracing...");
|
||||
}
|
||||
|
||||
G4RayXMessenger::~G4RayXMessenger () {}
|
||||
|
||||
void G4RayXMessenger::SetNewValue (G4UIcommand* command, G4String newValues)
|
||||
{
|
||||
G4RayMessenger::SetNewValue (command, newValues);
|
||||
}
|
||||
|
||||
G4String G4RayXMessenger::GetCurrentValue (G4UIcommand* command) {
|
||||
return "";
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,196 +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: G4RayXView.cc,v 2.2 1998/11/06 13:41:58 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Nikos Savvas 1st June 1997
|
||||
// GEANT4 Ray Tracing view.
|
||||
|
||||
#ifdef G4VIS_BUILD_RAYX_DRIVER
|
||||
|
||||
#include "G4RayXView.hh"
|
||||
|
||||
#include "G4RayScene.hh"
|
||||
|
||||
G4RayXView::G4RayXView (G4RayScene& scene, const G4String& name):
|
||||
G4RayView (scene),
|
||||
G4OwnColormapXView (scene),
|
||||
G4VView (scene, scene.IncrementViewCount (), name) {
|
||||
|
||||
if (fViewId < 0) return; // Traps possible error in base class creation.
|
||||
|
||||
if (fTrueColor) {
|
||||
fMaxImageMapEntries = 256; // make a 256 colour map anyway.
|
||||
}
|
||||
|
||||
if (fMapEntries != 256 ) {
|
||||
G4cerr << "G4RayXView::G4RayXView: no of colormap entries is " << ncells
|
||||
<< "\nWe cannot deal with this case for ray tracing yet."
|
||||
<< endl;
|
||||
fViewId = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
/************************************
|
||||
// Fill 3x3x2 colormap.
|
||||
// (In future, I'll write something to evolve the colormap on the fly.
|
||||
if (fMapEntries != 256 ) {
|
||||
G4cerr << "G4RayXView::G4RayXView: no of colormap entries is " << ncells
|
||||
<< "\nWe cannot deal with this case for ray tracing yet."
|
||||
<< endl;
|
||||
fViewId = -1;
|
||||
return;
|
||||
}
|
||||
XColor* cells = new XColor [fMapEntries];
|
||||
red_max = 7;
|
||||
green_max = 7;
|
||||
blue_max = 4;
|
||||
int red_max_1 = red_max + 1;
|
||||
int green_max_1 = green_max + 1;
|
||||
int blue_max_1 = blue_max + 1;
|
||||
float red_scale = 65535 * (float (red_max_1) / red_max);
|
||||
float green_scale = 65535 * (float (green_max_1) / green_max);
|
||||
float blue_scale = 65535 * (float (blue_max_1) / blue_max);
|
||||
red_mult = 32;
|
||||
green_mult = 4;
|
||||
blue_mult = 1;
|
||||
for (int iPixel = 0; iPixel < ncells; iPixel++) {
|
||||
cells [iPixel].pixel = iPixel;
|
||||
cells [iPixel].red = (short unsigned int)
|
||||
(red_scale * ((iPixel / red_mult) % red_max_1));
|
||||
cells [iPixel].green = (short unsigned int)
|
||||
(green_scale * ((iPixel / green_mult) % green_max_1));
|
||||
cells [iPixel].blue = (short unsigned int)
|
||||
(blue_scale * ((iPixel / blue_mult) % blue_max_1));
|
||||
cells [iPixel].flags = DoRed | DoGreen | DoBlue;
|
||||
}
|
||||
XStoreColors (fpDisplay, fColormap, cells, ncells);
|
||||
************************************/
|
||||
}
|
||||
|
||||
void G4RayXView::DrawView () {
|
||||
|
||||
// If view parameters have changed, start again from scratch.
|
||||
// But if not, be smart, and start from private map, depending on
|
||||
// the value of resolution.
|
||||
|
||||
SetView ();
|
||||
|
||||
// Decide whether to initialise image...
|
||||
if (fImageViewParameters != fVP ||
|
||||
fMaxImageMapEntries != fMapEntries ||
|
||||
fImageWidth != fWidth ||
|
||||
fImageHeight != fHeight) { // Clear and reset image stores.
|
||||
G4cout
|
||||
<< "G4RayXView::DrawView: image re-initialised because...\n ";
|
||||
if (fImageViewParameters != fVP)
|
||||
G4cout << "view parameters, ";
|
||||
if (fMaxImageMapEntries != fMapEntries)
|
||||
G4cout << "no. of entries in colormap, ";
|
||||
if (fImageWidth != fWidth)
|
||||
G4cout << "width, ";
|
||||
if (fImageHeight != fHeight)
|
||||
G4cout << " height, ";
|
||||
G4cout << "changed." << endl;
|
||||
// Reset above parameters...
|
||||
fImageViewParameters = fVP;
|
||||
fMaxImageMapEntries = fMapEntries;
|
||||
fImageWidth = fWidth;
|
||||
fImageHeight = fHeight;
|
||||
// Now things that need initialising...
|
||||
InitialiseImage ();
|
||||
}
|
||||
// Now things that need resetting for every Draw.
|
||||
TriggerRedraw ();
|
||||
|
||||
XGCValues xgcValues;
|
||||
XColor cell;
|
||||
XColor* cells = new XColor [fMapEntries];
|
||||
|
||||
int i, j, k, iPixVal;
|
||||
float red, green, blue;
|
||||
// Square of side k whose upper left corner is (i, j). The above
|
||||
// are set by the function Scan, inherited from G4RayView. You
|
||||
// don't have to use it - you can call Trace, also inherited from
|
||||
// G4RayView, directly. iPixVal is the pixel value for this colour,
|
||||
// i.e., the key in fRayHitColourIndex.
|
||||
while (Scan (i, j, k, red, green, blue, iPixVal)) {
|
||||
|
||||
if(fTrueColor) {
|
||||
unsigned long int trueColorPixval =
|
||||
((unsigned long int) (red * fRedMax)) << fRedShift |
|
||||
((unsigned long int) (green * fGreenMax)) << fGreenShift |
|
||||
((unsigned long int) (blue * fBlueMax)) << fBlueShift;
|
||||
xgcValues.foreground = trueColorPixval;
|
||||
XChangeGC (fpDisplay, fGC, GCForeground, &xgcValues);
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
G4int nCells = fRayHitColourMap.entries ();
|
||||
if (nCells > fMapEntries) {
|
||||
G4Exception ("G4RayXView::DrawView: fRayHitColourMap overflow!!!");
|
||||
}
|
||||
|
||||
if (fImageMapRejigged && ++fWaitCount > fWaitLimit) {
|
||||
// Note: ++fWaitCount only executed if fImageMapRejigged is true.
|
||||
fWaitCount = 0;
|
||||
fImageMapRejigged = false;
|
||||
fTriggerRescan = true;
|
||||
//G4cout << "G4RayXView::DrawView: remaking whole colormap." << endl;
|
||||
for (int iCells = 0; iCells < nCells; iCells++) {
|
||||
cells [iCells].pixel = iCells;
|
||||
cells [iCells].red = (short unsigned int)
|
||||
(65535 * fRayHitColourMap (iCells).red);
|
||||
cells [iCells].green = (short unsigned int)
|
||||
(65535 * fRayHitColourMap (iCells).green);
|
||||
cells [iCells].blue = (short unsigned int)
|
||||
(65535 * fRayHitColourMap (iCells).blue);
|
||||
cells [iCells].flags = DoRed | DoGreen | DoBlue;
|
||||
}
|
||||
XStoreColors (fpDisplay, fColormap, cells, nCells);
|
||||
}
|
||||
else {
|
||||
if (iPixVal == nCells - 1) {
|
||||
// Just do the last one, the latest addition.
|
||||
cell.pixel = iPixVal;
|
||||
cell.red = (short unsigned int)
|
||||
(65535 * fRayHitColourMap (iPixVal).red);
|
||||
cell.green = (short unsigned int)
|
||||
(65535 * fRayHitColourMap (iPixVal).green);
|
||||
cell.blue = (short unsigned int)
|
||||
(65535 * fRayHitColourMap (iPixVal).blue);
|
||||
cell.flags = DoRed | DoGreen | DoBlue;
|
||||
XStoreColor (fpDisplay, fColormap, &cell);
|
||||
}
|
||||
// (Otherwise assume an old pixel value is being used,
|
||||
// i.e., do nothing.)
|
||||
}
|
||||
|
||||
XSetForeground (fpDisplay, fGC, iPixVal);
|
||||
}
|
||||
|
||||
if (k <= 1) {
|
||||
XDrawPoint (fpDisplay, fWindow, fGC, i, j);
|
||||
}
|
||||
else {
|
||||
XFillRectangle (fpDisplay, fWindow, fGC, i, j, k, k);
|
||||
}
|
||||
|
||||
XFlush (fpDisplay);
|
||||
|
||||
//for (int ii = 0; ii < 1000000; ii++); //?? 1000000 = about 0.5 secs!!
|
||||
}
|
||||
|
||||
delete cells;
|
||||
|
||||
FinishView ();
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 2.4 1998/07/07 16:25:07 allison Exp $
|
||||
# $Id: GNUmakefile,v 1.2 1999/06/19 16:29:35 johna Exp $
|
||||
# -----------------------------------------------------------------------
|
||||
# GNUmakefile for visualization and modeling. John Allison, 5/7/95.
|
||||
# Modeling is always made. Others by environment. John Allison 4/7/98.
|
||||
@@ -52,10 +52,6 @@ ifdef G4VIS_BUILD_OI_DRIVER
|
||||
SUBDIRS += OpenInventor
|
||||
SUBLIBS += G4OpenInventor
|
||||
endif
|
||||
ifdef G4VIS_BUILD_RAYX_DRIVER
|
||||
SUBDIRS += G4Ray
|
||||
SUBLIBS += G4Ray
|
||||
endif
|
||||
|
||||
# For VRML and VRMLFILE drivers
|
||||
ifdef G4VIS_BUILD_VRML_DRIVER
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 2.55 1998/12/16 20:25:27 allison Exp $
|
||||
$Id: History,v 1.23 1999/07/03 10:52:25 johna Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -24,6 +24,105 @@ committal in the CVS repository !
|
||||
History file for visualization category
|
||||
---------------------------------------
|
||||
|
||||
vis-01-00-15a 3rd July 1999 John Allison
|
||||
- Improved README (Guy).
|
||||
- Corrected a fprintf statement in G4OpenGLXViewer::spewWireframeEPS.
|
||||
|
||||
vis-01-00-15 29th June 1999 John Allison
|
||||
- Moved #include <rw/tvhdict.h> from G4OpenGLSceneHandler.hh to .cc.
|
||||
- Corrected #ifdef G4VIS_BUILD_OPENGL_DRIVER in G4OpenGLXViewer.hh.
|
||||
|
||||
vis-01-00-14 19th June 1999 John Allison
|
||||
- Removed references to G4Ray from GNUmakefile.
|
||||
- Archived (cvs removed) all G4Ray files.
|
||||
- Cosmetic change to an output statement in G4VisToOldVisCommands.cc/
|
||||
|
||||
vis-01-00-13 1st June 1999 John Allison
|
||||
- Updated README for May Release (Satoshi, John).
|
||||
- Removed G4Ray from tag.
|
||||
|
||||
31 Mai 1999 Guy Barrand
|
||||
- G4XoViewer : remove enabling/disabling XoCamera popup menu logic.
|
||||
In some situation (N03) we were loosing the XoCamera popup menu.
|
||||
- G4XoViewer : correct ClearStore, ClearTransientStore.
|
||||
|
||||
vis-01-00-12a 26th May 1999 John Allison
|
||||
- G4TrajectoriesModel.cc: (*TC) [iT] -> DrawTrajectory ();
|
||||
|
||||
vis-01-00-12 25th May 1999 John Allison
|
||||
- Moved global operator != to member function.
|
||||
- Updated OPACS to handle "ClearTransientStore" (Guy).
|
||||
|
||||
vis-01-00-11 12th May 1999 Guy Barrand
|
||||
- G4VSceneHandler : ClearTransientStore.
|
||||
- G4VisCommandsSceneHandler : protect against a null pointer.
|
||||
- OpenInventor : use HEPVis/SoWindow to create windows (needed
|
||||
on NT). Implement the a "transient scene graph" for "event"
|
||||
things. Use fXxx convention for fields.
|
||||
- G4TrajectoriesModeling : do not draw a "marker" at each step by default.
|
||||
|
||||
vis-01-00-10 10th May 1999 John Allison
|
||||
- Acted upon Code Wizard reports. Mainly made destructors virtual.
|
||||
|
||||
vis-01-00-09 28th April 1999 John Allison
|
||||
- Changes for UserAction classes.
|
||||
|
||||
vis-01-00-08 John Allison
|
||||
- Changes by Paulo Mora de Freitas for decoupling vis from parameterisation.
|
||||
|
||||
18th April 1999 John Allison
|
||||
- Added "defined" after || in VRML1(1)(File).hh. (Some preprocessors
|
||||
give an error without it.)
|
||||
|
||||
vis-01-00-07 15th April 1999 John Allison
|
||||
- Replaced visualization/test/GNUmakefile by a simple one using binmake.gmk.
|
||||
- Added CPPFLAGS += -I$(G4BASE)/intercoms/include to some GNUmakefiles ready
|
||||
for the move of G4VGraphicsScene to intercoms.
|
||||
|
||||
vis-01-00-06 29th March 1999 John Allison
|
||||
- Platform dependency fix in G4VisCommandsScene.cc.
|
||||
|
||||
vis-01-00-05 7th February 1999 John Allison
|
||||
- management: - Added /vis/scene/notifyHandlers.
|
||||
- Added virtual functions AddThis (const G4Polycone and
|
||||
G4Polyhedra to G4VSceneHandler
|
||||
- Moved some code from G4VisManager to G4Scene::AddWorldIfEmpty.
|
||||
- Various refinements and bug fixes.
|
||||
- modeling: Augmented G4PhysicalVolumeSearchScene and G4BoundingSphereScene
|
||||
See modeling/History.
|
||||
- OpenGL: - Corrected edgeCount check for triangles in
|
||||
G4OpenGLSceneHandler::AddPrimitive (const G4Polyhedron&).
|
||||
- Added (long unsigned int) cast in G4OpenGLXmRotationCallbacks.cc.
|
||||
- Added SetView and ShowView to G4OpenGLXViewer:
|
||||
// To force change of context...
|
||||
void G4OpenGLXViewer::SetView () {
|
||||
glXMakeCurrent (dpy, win, cx);
|
||||
G4OpenGLViewer::SetView ();
|
||||
}
|
||||
// Hopefully to get better flushing in DEC OpenGL...
|
||||
void G4OpenGLXViewer::ShowView () {
|
||||
glXWaitGL ();
|
||||
glFlush ();
|
||||
}
|
||||
|
||||
|
||||
vis-01-00-04 11th January 1999 John Allison
|
||||
- Completed change of names from scene to sceneHandler, view to viewer.
|
||||
- Vis manager and scene handlers now keep pointer to scene, rather than a copy.
|
||||
- G4SceneList now a simple RWTPtrOrderedVector.
|
||||
- /vis/camera/reset now resets viewpoint direction and up vector.
|
||||
|
||||
vis-01-00-03 10th January 1999 John Allison
|
||||
- Added flags for viewing geom, hits, digis to G4ModelingParameters.
|
||||
|
||||
vis-01-00-02 9th January 1999 John Allison
|
||||
- Changed Scene to SceneHandler, View to Viewer.
|
||||
|
||||
vis-01-00-01 6th January 1999 John Allison
|
||||
- Made G4VisManager::GetInstance() private to prevent inadvertent misuse.
|
||||
- Removed #include GNU_GCC - no longer necessary for egcs.
|
||||
- Continued developing the new commands.
|
||||
|
||||
vis-00-04-04 16th December 1998 John Allison
|
||||
- test/GNUmakefile for Linux-g++
|
||||
- test/test19.cc - removed g4templates.hh
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 2.3 1998/07/07 17:11:11 allison Exp $
|
||||
# $Id: GNUmakefile,v 1.2 1999/04/15 15:27:56 johna Exp $
|
||||
|
||||
name := G4OPACS
|
||||
|
||||
@@ -19,6 +19,7 @@ CPPFLAGS += -I$(G4BASE)/graphics_reps/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/geometry/volumes/include
|
||||
CPPFLAGS += -I$(G4BASE)/interfaces/common/include
|
||||
CPPFLAGS += -I$(G4BASE)/intercoms/include
|
||||
|
||||
ifdef G4VIS_BUILD_OPACS_DRIVER
|
||||
CPPFLAGS += -I$(COROOT)/include -I$(XXROOT)/include -I$(WOROOT)/include\
|
||||
|
||||
+14
-11
@@ -5,15 +5,15 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4GoScene.hh,v 2.1 1998/11/06 13:42:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4GoSceneHandler.hh,v 1.3 1999/05/25 12:04:43 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
// Wo scene - creates Wo Display lists.
|
||||
// Wo scene handler - creates Wo Display lists.
|
||||
|
||||
#ifndef G4GOSCENE_HH
|
||||
#define G4GOSCENE_HH
|
||||
#ifndef G4GOSCENEHANDLER_HH
|
||||
#define G4GOSCENEHANDLER_HH
|
||||
|
||||
#if defined(G4VIS_BUILD_OPACS_DRIVER) || defined(G4VIS_USE_OPACS)
|
||||
|
||||
@@ -23,14 +23,14 @@
|
||||
//G4
|
||||
#include "globals.hh"
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
#include "G4VScene.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
class G4GoScene: public G4VScene {
|
||||
class G4GoSceneHandler: public G4VSceneHandler {
|
||||
|
||||
public:
|
||||
G4GoScene (G4VGraphicsSystem& system,
|
||||
G4GoSceneHandler (G4VGraphicsSystem& system,
|
||||
const G4String& name = "");
|
||||
~G4GoScene ();
|
||||
virtual ~G4GoSceneHandler ();
|
||||
void AddPrimitive (const G4Polyline&);
|
||||
void AddPrimitive (const G4Text&);
|
||||
void AddPrimitive (const G4Circle&);
|
||||
@@ -59,9 +59,12 @@ public:
|
||||
|
||||
private:
|
||||
void ClearStore ();
|
||||
void ClearTransientStore();
|
||||
void RequestPrimitives (const G4VSolid& solid);
|
||||
G4VGraphicsSystem& fSystem; // Graphics system for this scene.
|
||||
ONode fRootGoNode; // Root ONode for this scene.
|
||||
ONode fRootGoNode; // Root ONode for this scene.
|
||||
ONode fStaticRootGoNode; // For detector.
|
||||
ONode fTransientRootGoNode; // For event.
|
||||
static G4int fSceneIdCount; // static counter for Wo scenes.
|
||||
static G4int fSceneCount; // No. of extanct scenes.
|
||||
static ONode fGoNode; // Current ONode.
|
||||
@@ -70,7 +73,7 @@ private:
|
||||
char* nodeName;
|
||||
};
|
||||
|
||||
inline G4int G4GoScene::GetSceneCount () {
|
||||
inline G4int G4GoSceneHandler::GetSceneCount () {
|
||||
return fSceneCount;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Wo.hh,v 2.1 1998/11/06 13:42:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4Wo.hh,v 1.4 1999/05/10 15:38:48 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
@@ -25,9 +25,9 @@ class G4VInteractorManager;
|
||||
class G4Wo: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4Wo ();
|
||||
~G4Wo ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
virtual ~G4Wo ();
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& name = "");
|
||||
static G4VInteractorManager* GetInteractorManager ();
|
||||
};
|
||||
|
||||
|
||||
+11
-11
@@ -5,31 +5,31 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4WoView.hh,v 2.1 1998/11/06 13:42:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4WoViewer.hh,v 1.3 1999/05/10 15:38:49 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
// Wo view - opens window, hard copy, etc.
|
||||
// Wo viewer - opens window, hard copy, etc.
|
||||
|
||||
#ifndef G4WOVIEW_HH
|
||||
#define G4WOVIEW_HH
|
||||
#ifndef G4WOVIEWER_HH
|
||||
#define G4WOVIEWER_HH
|
||||
|
||||
#if defined(G4VIS_BUILD_OPACS_DRIVER) || defined(G4VIS_USE_OPACS)
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <OCamera.h>
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4GoScene;
|
||||
class G4GoSceneHandler;
|
||||
|
||||
// Base class for various WoView classes.
|
||||
class G4WoView: public G4VView {
|
||||
class G4WoViewer: public G4VViewer {
|
||||
public:
|
||||
G4WoView (G4GoScene& scene, const G4String& name = "");
|
||||
~G4WoView ();
|
||||
G4WoViewer (G4GoSceneHandler& scene, const G4String& name = "");
|
||||
virtual ~G4WoViewer ();
|
||||
void DrawView ();
|
||||
void ShowView ();
|
||||
OCamera GetCamera ();
|
||||
@@ -38,7 +38,7 @@ private:
|
||||
void FinishView ();
|
||||
void SetView ();
|
||||
private:
|
||||
G4GoScene& fScene; // Graphics Scene for this view.
|
||||
G4GoSceneHandler& fSceneHandler; // Graphics Scene for this view.
|
||||
OCamera fGoCamera;
|
||||
Widget fXoCamera;
|
||||
Widget fShell;
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Xo.hh,v 2.1 1998/11/06 13:42:04 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4Xo.hh,v 1.4 1999/05/10 15:38:50 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
@@ -25,9 +25,9 @@ class G4VInteractorManager;
|
||||
class G4Xo: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4Xo ();
|
||||
~G4Xo ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
virtual ~G4Xo ();
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& name = "");
|
||||
static G4VInteractorManager* GetInteractorManager ();
|
||||
};
|
||||
|
||||
|
||||
+11
-11
@@ -5,32 +5,32 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4XoView.hh,v 2.1 1998/11/06 13:42:05 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4XoViewer.hh,v 1.3 1999/05/10 15:38:51 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
// Wo view - opens window, hard copy, etc.
|
||||
// Wo viewer - opens window, hard copy, etc.
|
||||
|
||||
#ifndef G4XOVIEW_HH
|
||||
#define G4XOVIEW_HH
|
||||
#ifndef G4XOVIEWER_HH
|
||||
#define G4XOVIEWER_HH
|
||||
|
||||
#if defined(G4VIS_BUILD_OPACS_DRIVER) || defined(G4VIS_USE_OPACS)
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <OCamera.h>
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Xo;
|
||||
class G4GoScene;
|
||||
class G4GoSceneHandler;
|
||||
|
||||
// Base class for various WoView classes.
|
||||
class G4XoView: public G4VView {
|
||||
class G4XoViewer: public G4VViewer {
|
||||
public:
|
||||
G4XoView (G4GoScene& scene, const G4String& name = "");
|
||||
~G4XoView ();
|
||||
G4XoViewer (G4GoSceneHandler& scene, const G4String& name = "");
|
||||
virtual ~G4XoViewer ();
|
||||
void DrawView ();
|
||||
void ShowView ();
|
||||
OCamera GetCamera ();
|
||||
@@ -39,7 +39,7 @@ private:
|
||||
void FinishView ();
|
||||
void SetView ();
|
||||
private:
|
||||
G4GoScene& fScene; // Graphics Scene for this view.
|
||||
G4GoSceneHandler& fSceneHandler; // Graphics Scene for this view.
|
||||
OCamera fGoCamera;
|
||||
Widget fXoCamera;
|
||||
Widget fShell;
|
||||
+112
-79
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4GoScene.cc,v 2.3 1998/11/06 13:42:07 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4GoSceneHandler.cc,v 1.3 1999/05/31 17:20:56 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
@@ -34,47 +34,52 @@
|
||||
#include "G4PhysicalVolumeModel.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
//This
|
||||
#include "G4GoScene.hh"
|
||||
#include "G4GoSceneHandler.hh"
|
||||
|
||||
static G4Transform3D transformation;
|
||||
|
||||
G4int G4GoScene::fSceneIdCount = 0;
|
||||
G4int G4GoScene::fSceneCount = 0;
|
||||
ONode G4GoScene::fGoNode = NULL;
|
||||
OColormap G4GoScene::fOColormap = NULL;
|
||||
G4int G4GoSceneHandler::fSceneIdCount = 0;
|
||||
G4int G4GoSceneHandler::fSceneCount = 0;
|
||||
ONode G4GoSceneHandler::fGoNode = NULL;
|
||||
OColormap G4GoSceneHandler::fOColormap = NULL;
|
||||
/***************************************************************************/
|
||||
G4GoScene::G4GoScene (
|
||||
G4GoSceneHandler::G4GoSceneHandler (
|
||||
G4VGraphicsSystem& system,
|
||||
const G4String& name
|
||||
)
|
||||
/***************************************************************************/
|
||||
// Creator.
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
:
|
||||
G4VScene (system, fSceneIdCount++, name),
|
||||
fSystem (system),
|
||||
fRootGoNode (NULL),
|
||||
nodeName (NULL)
|
||||
:G4VSceneHandler (system, fSceneIdCount++, name)
|
||||
,fSystem(system)
|
||||
,fRootGoNode(NULL)
|
||||
,fStaticRootGoNode(NULL)
|
||||
,fTransientRootGoNode(NULL)
|
||||
,nodeName(NULL)
|
||||
/*.........................................................................*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::G4GoScene" << endl;
|
||||
G4cout << "G4GoSceneHandler::G4GoSceneHandler" << endl;
|
||||
#endif
|
||||
fSceneCount++;
|
||||
}
|
||||
/***************************************************************************/
|
||||
G4GoScene::~G4GoScene (
|
||||
G4GoSceneHandler::~G4GoSceneHandler (
|
||||
)
|
||||
/***************************************************************************/
|
||||
// Destructor.
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
if(ONodeIsValid(fRootGoNode)==1) ONodeDelete (fRootGoNode); //fRootGoNode could be deleted by an XoCamera popup "Erase".
|
||||
//fRootGoNode could be deleted by an XoCamera popup "Erase".
|
||||
if(ONodeIsValid(fRootGoNode)==1)
|
||||
ONodeDelete (fRootGoNode);
|
||||
fRootGoNode = NULL;
|
||||
fStaticRootGoNode = NULL;
|
||||
fTransientRootGoNode = NULL;
|
||||
fSceneCount--;
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddPrimitive (
|
||||
void G4GoSceneHandler::AddPrimitive (
|
||||
const G4Polyline& line
|
||||
)
|
||||
/***************************************************************************/
|
||||
@@ -82,7 +87,7 @@ void G4GoScene::AddPrimitive (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::AddPrimitive(G4Polyline&) " << line.entries () << endl;
|
||||
G4cout << "G4GoSceneHandler::AddPrimitive(G4Polyline&) " << line.entries () << endl;
|
||||
#endif
|
||||
SetColour (GetColour(line));
|
||||
int nPoints = line.entries ();
|
||||
@@ -98,7 +103,7 @@ void G4GoScene::AddPrimitive (
|
||||
OPointListDelete (points);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddPrimitive (
|
||||
void G4GoSceneHandler::AddPrimitive (
|
||||
const G4Polymarker& line
|
||||
)
|
||||
/***************************************************************************/
|
||||
@@ -106,7 +111,7 @@ void G4GoScene::AddPrimitive (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::AddPrimitive(G4Polymarker&) " << line.entries () << endl;
|
||||
G4cout << "G4GoSceneHandler::AddPrimitive(G4Polymarker&) " << line.entries () << endl;
|
||||
#endif
|
||||
SetColour (GetColour(line));
|
||||
int nPoints = line.entries ();
|
||||
@@ -122,7 +127,7 @@ void G4GoScene::AddPrimitive (
|
||||
OPointListDelete (points);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddPrimitive (
|
||||
void G4GoSceneHandler::AddPrimitive (
|
||||
const G4Circle& circle
|
||||
)
|
||||
/***************************************************************************/
|
||||
@@ -133,7 +138,7 @@ void G4GoScene::AddPrimitive (
|
||||
G4Point3D center = circle.GetPosition();
|
||||
G4double radius = circle.GetWorldSize();
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::AddPrimitive(G4Circle&) : center : "
|
||||
G4cout << "G4GoSceneHandler::AddPrimitive(G4Circle&) : center : "
|
||||
<< " x : " << center.x()
|
||||
<< " y : " << center.y()
|
||||
<< " z : " << center.z()
|
||||
@@ -144,7 +149,7 @@ void G4GoScene::AddPrimitive (
|
||||
GoAddMarkerToNode (fGoNode,center.x(),center.y(),center.z());
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddPrimitive (
|
||||
void G4GoSceneHandler::AddPrimitive (
|
||||
const G4Polyhedron& polyhedron
|
||||
)
|
||||
/***************************************************************************/
|
||||
@@ -152,7 +157,7 @@ void G4GoScene::AddPrimitive (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::AddPrimitive(G4Polyhedron&) " << endl;
|
||||
G4cout << "G4GoSceneHandler::AddPrimitive(G4Polyhedron&) " << endl;
|
||||
#endif
|
||||
SetColour (GetColour(polyhedron));
|
||||
|
||||
@@ -160,7 +165,7 @@ void G4GoScene::AddPrimitive (
|
||||
switch (GetDrawingStyle (polyhedron)) {
|
||||
case (G4ViewParameters::hlhsr):
|
||||
case (G4ViewParameters::hsr):
|
||||
modeling = OModelingSolid;
|
||||
//not ready yet modeling = OModelingSolid;
|
||||
break;
|
||||
case (G4ViewParameters::hlr):
|
||||
case (G4ViewParameters::wireframe):
|
||||
@@ -193,7 +198,7 @@ void G4GoScene::AddPrimitive (
|
||||
} while (notLastEdge);
|
||||
if( (iPoint!=3) && (iPoint!=4) )
|
||||
{
|
||||
CWarnF ("G4GoScene::AddPrimitive G4Polyhedron : not a quad or a triangle : %d\n",iPoint);
|
||||
CWarnF ("G4GoSceneHandler::AddPrimitive G4Polyhedron : not a quad or a triangle : %d\n",iPoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -213,7 +218,7 @@ void G4GoScene::AddPrimitive (
|
||||
} while (notLastFace);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddPrimitive (
|
||||
void G4GoSceneHandler::AddPrimitive (
|
||||
const G4Text& text
|
||||
)
|
||||
/***************************************************************************/
|
||||
@@ -222,12 +227,12 @@ void G4GoScene::AddPrimitive (
|
||||
{
|
||||
SetColour (GetTextColour(text));
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::AddPrimitive(G4Text&) " << endl;
|
||||
G4cout << "G4GoSceneHandler::AddPrimitive(G4Text&) " << endl;
|
||||
#endif
|
||||
CWarnF ("G4GoScene::AddPrimitive G4Text : not yet implemented.\n");
|
||||
CWarnF ("G4GoSceneHandler::AddPrimitive G4Text : not yet implemented.\n");
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddPrimitive (
|
||||
void G4GoSceneHandler::AddPrimitive (
|
||||
const G4Square& Square
|
||||
)
|
||||
/***************************************************************************/
|
||||
@@ -236,12 +241,12 @@ void G4GoScene::AddPrimitive (
|
||||
{
|
||||
SetColour (GetColour(Square));
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::AddPrimitive(G4Square&) " << endl;
|
||||
G4cout << "G4GoSceneHandler::AddPrimitive(G4Square&) " << endl;
|
||||
#endif
|
||||
CWarnF ("G4GoScene::AddPrimitive G4Square : not yet implemented.\n");
|
||||
CWarnF ("G4GoSceneHandler::AddPrimitive G4Square : not yet implemented.\n");
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddPrimitive (
|
||||
void G4GoSceneHandler::AddPrimitive (
|
||||
const G4NURBS& nurb
|
||||
)
|
||||
/***************************************************************************/
|
||||
@@ -251,100 +256,100 @@ void G4GoScene::AddPrimitive (
|
||||
{
|
||||
SetColour (GetColour(nurb));
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::AddPrimitive(G4NURBS&) " << endl;
|
||||
G4cout << "G4GoSceneHandler::AddPrimitive(G4NURBS&) " << endl;
|
||||
#endif
|
||||
CWarnF ("G4GoScene::AddPrimitive G4NURBS : not yet implemented.\n");
|
||||
CWarnF ("G4GoSceneHandler::AddPrimitive G4NURBS : not yet implemented.\n");
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddThis (
|
||||
void G4GoSceneHandler::AddThis (
|
||||
const G4Box& box
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4VScene::AddThis (box);
|
||||
G4VSceneHandler::AddThis (box);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddThis (
|
||||
void G4GoSceneHandler::AddThis (
|
||||
const G4Cons& cons
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4VScene::AddThis (cons);
|
||||
G4VSceneHandler::AddThis (cons);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddThis (
|
||||
void G4GoSceneHandler::AddThis (
|
||||
const G4Tubs& tubs
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4VScene::AddThis (tubs);
|
||||
G4VSceneHandler::AddThis (tubs);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddThis (
|
||||
void G4GoSceneHandler::AddThis (
|
||||
const G4Trd& trd
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4VScene::AddThis (trd);
|
||||
G4VSceneHandler::AddThis (trd);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddThis (
|
||||
void G4GoSceneHandler::AddThis (
|
||||
const G4Trap& trap
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4VScene::AddThis (trap);
|
||||
G4VSceneHandler::AddThis (trap);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddThis (
|
||||
void G4GoSceneHandler::AddThis (
|
||||
const G4Sphere& sphere
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4VScene::AddThis (sphere);
|
||||
G4VSceneHandler::AddThis (sphere);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddThis (
|
||||
void G4GoSceneHandler::AddThis (
|
||||
const G4Para& para
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4VScene::AddThis (para);
|
||||
G4VSceneHandler::AddThis (para);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddThis (
|
||||
void G4GoSceneHandler::AddThis (
|
||||
const G4Torus& torus
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4VScene::AddThis (torus);
|
||||
G4VSceneHandler::AddThis (torus);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::AddThis (
|
||||
void G4GoSceneHandler::AddThis (
|
||||
const G4VSolid& solid
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4VScene::AddThis (solid);
|
||||
G4VSceneHandler::AddThis (solid);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::PreAddThis (
|
||||
void G4GoSceneHandler::PreAddThis (
|
||||
const G4Transform3D& objectTransformation,
|
||||
const G4VisAttributes& visAttribs
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4VScene::PreAddThis (objectTransformation, visAttribs);
|
||||
G4VSceneHandler::PreAddThis (objectTransformation, visAttribs);
|
||||
|
||||
CStringDelete (nodeName);
|
||||
nodeName = NULL;
|
||||
@@ -356,46 +361,56 @@ void G4GoScene::PreAddThis (
|
||||
nodeName = CStringCreateF (15+64,"PhysicalVolume/%lu",currentPhysicalVolume );
|
||||
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::PreAddThis : " << nodeName << endl;
|
||||
G4cout << "G4GoSceneHandler::PreAddThis : " << nodeName << endl;
|
||||
#endif
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::PostAddThis (
|
||||
void G4GoSceneHandler::PostAddThis (
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::PostAddThis" << endl;
|
||||
G4cout << "G4GoSceneHandler::PostAddThis" << endl;
|
||||
#endif
|
||||
CStringDelete (nodeName);
|
||||
nodeName = NULL;
|
||||
G4VScene::PostAddThis();
|
||||
G4VSceneHandler::PostAddThis();
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::BeginPrimitives (
|
||||
void G4GoSceneHandler::BeginPrimitives (
|
||||
const G4Transform3D& objectTransformation
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::BeginPrimitives" << endl;
|
||||
G4cout << "G4GoSceneHandler::BeginPrimitives" << endl;
|
||||
#endif
|
||||
G4VScene::BeginPrimitives (objectTransformation);
|
||||
G4VSceneHandler::BeginPrimitives (objectTransformation);
|
||||
transformation = objectTransformation;
|
||||
fGoNode = nodeName!=NULL ? ONodeCreate (nodeName) : ONodeMake ();
|
||||
if(ONodeIsValid(fRootGoNode)==0) fRootGoNode = ONodeMake ();
|
||||
ONodeAddChild (fRootGoNode,fGoNode);
|
||||
if(ONodeIsValid(fRootGoNode)==0) {
|
||||
fRootGoNode = ONodeMake ();
|
||||
fStaticRootGoNode = ONodeMake ();
|
||||
fTransientRootGoNode = ONodeMake ();
|
||||
ONodeAddChild (fRootGoNode,fStaticRootGoNode);
|
||||
ONodeAddChild (fRootGoNode,fTransientRootGoNode);
|
||||
}
|
||||
if (fReadyForTransients) {
|
||||
ONodeAddChild (fTransientRootGoNode,fGoNode);
|
||||
} else {
|
||||
ONodeAddChild (fStaticRootGoNode,fGoNode);
|
||||
}
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::EndPrimitives (
|
||||
void G4GoSceneHandler::EndPrimitives (
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::EndPrimitives" << endl;
|
||||
G4cout << "G4GoSceneHandler::EndPrimitives" << endl;
|
||||
#endif
|
||||
G4double g4angle;
|
||||
G4ThreeVector g4axis;
|
||||
@@ -410,22 +425,36 @@ void G4GoScene::EndPrimitives (
|
||||
OMatrixDelete (orot);
|
||||
OMatrixDelete (otra);
|
||||
fGoNode = NULL;
|
||||
G4VScene::EndPrimitives ();
|
||||
G4VSceneHandler::EndPrimitives ();
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::ClearStore (
|
||||
void G4GoSceneHandler::ClearStore (
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::ClearStore" << endl;
|
||||
G4cout << "G4GoSceneHandler::ClearStore" << endl;
|
||||
#endif
|
||||
if(ONodeIsValid(fRootGoNode)==0) fRootGoNode = NULL;
|
||||
ONodeDestroyChildren (fRootGoNode);
|
||||
if(ONodeIsValid(fTransientRootGoNode)==0) fTransientRootGoNode = NULL;
|
||||
ONodeDestroyChildren (fTransientRootGoNode);
|
||||
if(ONodeIsValid(fStaticRootGoNode)==0) fStaticRootGoNode = NULL;
|
||||
ONodeDestroyChildren (fStaticRootGoNode);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::RequestPrimitives (
|
||||
void G4GoSceneHandler::ClearTransientStore (
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoSceneHandler::ClearTransientStore" << endl;
|
||||
#endif
|
||||
if(ONodeIsValid(fTransientRootGoNode)==0) fTransientRootGoNode = NULL;
|
||||
ONodeDestroyChildren (fTransientRootGoNode);
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoSceneHandler::RequestPrimitives (
|
||||
const G4VSolid& solid
|
||||
)
|
||||
/***************************************************************************/
|
||||
@@ -434,24 +463,28 @@ void G4GoScene::RequestPrimitives (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::RequestPrimitives" << endl;
|
||||
G4cout << "G4GoSceneHandler::RequestPrimitives" << endl;
|
||||
#endif
|
||||
G4VScene::RequestPrimitives (solid);
|
||||
G4VSceneHandler::RequestPrimitives (solid);
|
||||
}
|
||||
/***************************************************************************/
|
||||
ONode G4GoScene::GetRootNode (
|
||||
ONode G4GoSceneHandler::GetRootNode (
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::RequestPrimitives" << endl;
|
||||
G4cout << "G4GoSceneHandler::RequestPrimitives" << endl;
|
||||
#endif
|
||||
if(ONodeIsValid(fRootGoNode)==0) fRootGoNode = NULL;
|
||||
if(ONodeIsValid(fRootGoNode)==0) {
|
||||
fRootGoNode = NULL;
|
||||
fStaticRootGoNode = NULL;
|
||||
fTransientRootGoNode = NULL;
|
||||
}
|
||||
return fRootGoNode;
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4GoScene::SetColour (
|
||||
void G4GoSceneHandler::SetColour (
|
||||
const G4Colour& a_colour
|
||||
)
|
||||
/***************************************************************************/
|
||||
@@ -460,7 +493,7 @@ void G4GoScene::SetColour (
|
||||
if(fOColormap==NULL) fOColormap = OColormapGetIdentifier("ocolormap_X");
|
||||
int index = OColormapGetRGB_Index(fOColormap,a_colour.GetRed (), a_colour.GetGreen (), a_colour.GetBlue ());
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4GoScene::SetColour : red : " << a_colour.GetRed () <<
|
||||
G4cout << "G4GoSceneHandler::SetColour : red : " << a_colour.GetRed () <<
|
||||
" green : " << a_colour.GetGreen () <<
|
||||
" blue : " << a_colour.GetBlue () <<
|
||||
" index : " << index << endl;
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Wo.cc,v 2.1 1998/11/06 13:42:08 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4Wo.cc,v 1.3 1999/01/11 00:47:32 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
@@ -19,8 +19,8 @@
|
||||
#include <Wo.h>
|
||||
//G4
|
||||
#include "G4Xt.hh"
|
||||
#include "G4WoView.hh"
|
||||
#include "G4GoScene.hh"
|
||||
#include "G4WoViewer.hh"
|
||||
#include "G4GoSceneHandler.hh"
|
||||
//This
|
||||
#include "G4Wo.hh"
|
||||
|
||||
@@ -51,25 +51,25 @@ G4VInteractorManager* G4Wo::GetInteractorManager (
|
||||
return interactorManager;
|
||||
}
|
||||
/***************************************************************************/
|
||||
G4VScene* G4Wo::CreateScene (
|
||||
G4VSceneHandler* G4Wo::CreateSceneHandler (
|
||||
const G4String& name
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4GoScene* pScene = new G4GoScene (*this, name);
|
||||
G4GoSceneHandler* pScene = new G4GoSceneHandler (*this, name);
|
||||
return pScene;
|
||||
}
|
||||
/***************************************************************************/
|
||||
G4VView* G4Wo::CreateView (
|
||||
G4VScene& scene,
|
||||
G4VViewer* G4Wo::CreateViewer (
|
||||
G4VSceneHandler& scene,
|
||||
const G4String& name
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4GoScene* pScene = (G4GoScene*)&scene;
|
||||
G4VView* pView = new G4WoView (*pScene, name);
|
||||
G4GoSceneHandler* pScene = (G4GoSceneHandler*)&scene;
|
||||
G4VViewer* pView = new G4WoViewer (*pScene, name);
|
||||
return pView;
|
||||
}
|
||||
|
||||
|
||||
+24
-24
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4WoView.cc,v 2.8 1998/11/09 15:51:38 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4WoViewer.cc,v 1.2 1999/01/11 00:47:33 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
@@ -28,17 +28,17 @@
|
||||
//G4
|
||||
#include "G4VInteractorManager.hh"
|
||||
#include "G4Wo.hh"
|
||||
#include "G4GoScene.hh"
|
||||
#include "G4GoSceneHandler.hh"
|
||||
//This
|
||||
#include "G4WoView.hh"
|
||||
#include "G4WoViewer.hh"
|
||||
|
||||
/***************************************************************************/
|
||||
G4WoView::G4WoView (
|
||||
G4GoScene& scene,
|
||||
G4WoViewer::G4WoViewer (
|
||||
G4GoSceneHandler& scene,
|
||||
const G4String& name
|
||||
)
|
||||
:G4VView (scene, scene.IncrementViewCount(), name)
|
||||
,fScene (scene)
|
||||
:G4VViewer (scene, scene.IncrementViewCount(), name)
|
||||
,fSceneHandler (scene)
|
||||
,fGoCamera (NULL)
|
||||
,fXoCamera (NULL)
|
||||
,fShell (NULL)
|
||||
@@ -47,11 +47,11 @@ G4WoView::G4WoView (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4WoView::G4WoView" << endl;
|
||||
G4cout << "G4WoViewer::G4WoViewer" << endl;
|
||||
#endif
|
||||
|
||||
if(WoIsInitialized()==0) {
|
||||
CWarn ("G4WoView : Wo is not initialized !\n");
|
||||
CWarn ("G4WoViewer : Wo is not initialized !\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ G4WoView::G4WoView (
|
||||
interactorManager->SetCreatedInteractor (fXoCamera);
|
||||
}
|
||||
/***************************************************************************/
|
||||
G4WoView::~G4WoView (
|
||||
G4WoViewer::~G4WoViewer (
|
||||
)
|
||||
/***************************************************************************/
|
||||
// Destructor.
|
||||
@@ -127,13 +127,13 @@ G4WoView::~G4WoView (
|
||||
}
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4WoView::ClearView (
|
||||
void G4WoViewer::ClearView (
|
||||
)
|
||||
/***************************************************************************/
|
||||
{
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4WoView::SetView (
|
||||
void G4WoViewer::SetView (
|
||||
)
|
||||
/***************************************************************************/
|
||||
// Calculates view representation based on extent of object being
|
||||
@@ -142,20 +142,20 @@ void G4WoView::SetView (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
const G4Point3D target = fVP.GetCurrentTargetPoint ();
|
||||
G4double radius = fScene.GetSceneData().GetExtent().GetExtentRadius();
|
||||
G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
|
||||
if(radius<=0.) radius = 1. * m;
|
||||
const G4double cameraDistance = fVP.GetCameraDistance (radius);
|
||||
const G4Point3D& pCamera =
|
||||
target + cameraDistance * fVP.GetViewpointDirection().unit();
|
||||
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4WoView::SetView : target.x " << target.x() << " target.y " << target.y() << " target.z " << target.z() << endl;
|
||||
G4cout << "G4WoView::SetView : dir.x " << fVP.GetViewpointDirection().unit().x() <<
|
||||
G4cout << "G4WoViewer::SetView : target.x " << target.x() << " target.y " << target.y() << " target.z " << target.z() << endl;
|
||||
G4cout << "G4WoViewer::SetView : dir.x " << fVP.GetViewpointDirection().unit().x() <<
|
||||
" dir.y " << fVP.GetViewpointDirection().unit().y() <<
|
||||
" dir.z " << fVP.GetViewpointDirection().unit().z() << endl;
|
||||
G4cout << "G4WoView::SetView : cameraDistance " << cameraDistance << endl;
|
||||
G4cout << "G4WoView::SetView : pCamera.x " << pCamera.x() << " pCamera.y " << pCamera.y() << " pCamera.z " << pCamera.z() << endl;
|
||||
G4cout << "G4WoView::SetView : pCamera.x " << pCamera.x() << " pCamera.y " << pCamera.y() << " pCamera.z " << pCamera.z() << endl;
|
||||
G4cout << "G4WoViewer::SetView : cameraDistance " << cameraDistance << endl;
|
||||
G4cout << "G4WoViewer::SetView : pCamera.x " << pCamera.x() << " pCamera.y " << pCamera.y() << " pCamera.z " << pCamera.z() << endl;
|
||||
G4cout << "G4WoViewer::SetView : pCamera.x " << pCamera.x() << " pCamera.y " << pCamera.y() << " pCamera.z " << pCamera.z() << endl;
|
||||
#endif
|
||||
|
||||
OCameraSetCenter (fGoCamera,target.x() ,target.y() ,target.z());
|
||||
@@ -167,7 +167,7 @@ void G4WoView::SetView (
|
||||
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4WoView::DrawView (
|
||||
void G4WoViewer::DrawView (
|
||||
)
|
||||
/***************************************************************************/
|
||||
{
|
||||
@@ -176,21 +176,21 @@ void G4WoView::DrawView (
|
||||
ShowView ();
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4WoView::ShowView (
|
||||
void G4WoViewer::ShowView (
|
||||
)
|
||||
/***************************************************************************/
|
||||
{
|
||||
OCameraViewNode (fGoCamera,fScene.GetRootNode());
|
||||
OCameraViewNode (fGoCamera,fSceneHandler.GetRootNode());
|
||||
}
|
||||
/***************************************************************************/
|
||||
OCamera G4WoView::GetCamera (
|
||||
OCamera G4WoViewer::GetCamera (
|
||||
)
|
||||
/***************************************************************************/
|
||||
{
|
||||
return fGoCamera;
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4WoView::FinishView (
|
||||
void G4WoViewer::FinishView (
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Xo.cc,v 2.2 1998/11/06 13:42:10 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4Xo.cc,v 1.3 1999/01/11 00:47:34 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
@@ -24,8 +24,8 @@
|
||||
#include <XWidget.h>
|
||||
//G4
|
||||
#include "G4Xt.hh"
|
||||
#include "G4XoView.hh"
|
||||
#include "G4GoScene.hh"
|
||||
#include "G4XoViewer.hh"
|
||||
#include "G4GoSceneHandler.hh"
|
||||
//This
|
||||
#include "G4Xo.hh"
|
||||
|
||||
@@ -63,25 +63,25 @@ G4VInteractorManager* G4Xo::GetInteractorManager (
|
||||
return interactorManager;
|
||||
}
|
||||
/***************************************************************************/
|
||||
G4VScene* G4Xo::CreateScene (
|
||||
G4VSceneHandler* G4Xo::CreateSceneHandler (
|
||||
const G4String& name
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4GoScene* pScene = new G4GoScene (*this, name);
|
||||
G4GoSceneHandler* pScene = new G4GoSceneHandler (*this, name);
|
||||
return pScene;
|
||||
}
|
||||
/***************************************************************************/
|
||||
G4VView* G4Xo::CreateView (
|
||||
G4VScene& scene,
|
||||
G4VViewer* G4Xo::CreateViewer (
|
||||
G4VSceneHandler& scene,
|
||||
const G4String& name
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
G4GoScene* pScene = (G4GoScene*)&scene;
|
||||
G4VView* pView = new G4XoView (*pScene, name);
|
||||
G4GoSceneHandler* pScene = (G4GoSceneHandler*)&scene;
|
||||
G4VViewer* pView = new G4XoViewer (*pScene, name);
|
||||
return pView;
|
||||
}
|
||||
|
||||
|
||||
+23
-26
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4XoView.cc,v 2.7 1998/11/06 13:42:11 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4XoViewer.cc,v 1.3 1999/05/31 21:17:01 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
@@ -29,22 +29,22 @@
|
||||
/*Xo*/
|
||||
#include <XoCamera.h>
|
||||
//G4
|
||||
#include "G4GoScene.hh"
|
||||
#include "G4GoSceneHandler.hh"
|
||||
#include "G4Xo.hh"
|
||||
#include "G4VInteractorManager.hh"
|
||||
//This
|
||||
#include "G4XoView.hh"
|
||||
#include "G4XoViewer.hh"
|
||||
|
||||
static Bool WaitForNotify (Display*,XEvent*,char*);
|
||||
static void ActivateCallback (Widget,XtPointer,XtPointer);
|
||||
static void CollectCallback (Widget,XtPointer,XtPointer);
|
||||
/***************************************************************************/
|
||||
G4XoView::G4XoView (
|
||||
G4GoScene& scene,
|
||||
G4XoViewer::G4XoViewer (
|
||||
G4GoSceneHandler& scene,
|
||||
const G4String& name
|
||||
)
|
||||
:G4VView (scene, scene.IncrementViewCount(), name)
|
||||
,fScene (scene)
|
||||
:G4VViewer (scene, scene.IncrementViewCount(), name)
|
||||
,fSceneHandler (scene)
|
||||
,fGoCamera (NULL)
|
||||
,fXoCamera (NULL)
|
||||
,fShell (NULL)
|
||||
@@ -53,7 +53,7 @@ G4XoView::G4XoView (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4XoView::G4XoView" << endl;
|
||||
G4cout << "G4XoViewer::G4XoViewer" << endl;
|
||||
#endif
|
||||
|
||||
G4VInteractorManager* interactorManager = G4Xo::GetInteractorManager();
|
||||
@@ -109,16 +109,13 @@ G4XoView::G4XoView (
|
||||
fGoCamera = NULL;
|
||||
}
|
||||
|
||||
// g++ wants the cast !!!
|
||||
interactorManager->AddSecondaryLoopPreAction ((G4SecondaryLoopAction)XoCameraEnablePopup);
|
||||
interactorManager->AddSecondaryLoopPostAction ((G4SecondaryLoopAction)XoCameraDisablePopup);
|
||||
interactorManager->SetCreatedInteractor (fXoCamera);
|
||||
interactorManager->SetCreatedInteractor(fXoCamera);
|
||||
|
||||
CStringDelete (wname);
|
||||
CStringDelete (defName);
|
||||
}
|
||||
/***************************************************************************/
|
||||
G4XoView::~G4XoView (
|
||||
G4XoViewer::~G4XoViewer (
|
||||
)
|
||||
/***************************************************************************/
|
||||
// Destructor.
|
||||
@@ -134,13 +131,13 @@ G4XoView::~G4XoView (
|
||||
fGoCamera = NULL;
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4XoView::ClearView (
|
||||
void G4XoViewer::ClearView (
|
||||
)
|
||||
/***************************************************************************/
|
||||
{
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4XoView::SetView (
|
||||
void G4XoViewer::SetView (
|
||||
)
|
||||
/***************************************************************************/
|
||||
// Calculates view representation based on extent of object being
|
||||
@@ -149,19 +146,19 @@ void G4XoView::SetView (
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
const G4Point3D target = fVP.GetCurrentTargetPoint ();
|
||||
G4double radius = fScene.GetSceneData().GetExtent().GetExtentRadius();
|
||||
G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
|
||||
if(radius<=0.) radius = 1. * m;
|
||||
const G4double cameraDistance = fVP.GetCameraDistance (radius);
|
||||
const G4Point3D& pCamera =
|
||||
target + cameraDistance * fVP.GetViewpointDirection().unit();
|
||||
|
||||
#ifdef DEBUG
|
||||
G4cout << "G4XoView::SetView : target.x " << target.x() << " target.y " << target.y() << " target.z " << target.z() << endl;
|
||||
G4cout << "G4XoView::SetView : dir.x " << fVP.GetViewpointDirection().unit().x() <<
|
||||
G4cout << "G4XoViewer::SetView : target.x " << target.x() << " target.y " << target.y() << " target.z " << target.z() << endl;
|
||||
G4cout << "G4XoViewer::SetView : dir.x " << fVP.GetViewpointDirection().unit().x() <<
|
||||
" dir.y " << fVP.GetViewpointDirection().unit().y() <<
|
||||
" dir.z " << fVP.GetViewpointDirection().unit().z() << endl;
|
||||
G4cout << "G4XoView::SetView : cameraDistance " << cameraDistance << endl;
|
||||
G4cout << "G4XoView::SetView : pCamera.x " << pCamera.x() << " pCamera.y " << pCamera.y() << " pCamera.z " << pCamera.z() << endl;
|
||||
G4cout << "G4XoViewer::SetView : cameraDistance " << cameraDistance << endl;
|
||||
G4cout << "G4XoViewer::SetView : pCamera.x " << pCamera.x() << " pCamera.y " << pCamera.y() << " pCamera.z " << pCamera.z() << endl;
|
||||
#endif
|
||||
|
||||
OCameraSetCenter (fGoCamera,target.x() ,target.y() ,target.z());
|
||||
@@ -173,14 +170,14 @@ void G4XoView::SetView (
|
||||
|
||||
}
|
||||
/***************************************************************************/
|
||||
OCamera G4XoView::GetCamera (
|
||||
OCamera G4XoViewer::GetCamera (
|
||||
)
|
||||
/***************************************************************************/
|
||||
{
|
||||
return fGoCamera;
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4XoView::DrawView (
|
||||
void G4XoViewer::DrawView (
|
||||
)
|
||||
/***************************************************************************/
|
||||
{
|
||||
@@ -189,18 +186,18 @@ void G4XoView::DrawView (
|
||||
FinishView ();
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4XoView::FinishView (
|
||||
void G4XoViewer::FinishView (
|
||||
)
|
||||
/***************************************************************************/
|
||||
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
|
||||
{
|
||||
}
|
||||
/***************************************************************************/
|
||||
void G4XoView::ShowView (
|
||||
void G4XoViewer::ShowView (
|
||||
)
|
||||
/***************************************************************************/
|
||||
{
|
||||
OCameraViewNode (fGoCamera,fScene.GetRootNode());
|
||||
OCameraViewNode (fGoCamera,fSceneHandler.GetRootNode());
|
||||
G4Xo::GetInteractorManager() -> SecondaryLoop();
|
||||
}
|
||||
/***************************************************************************/
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 2.3 1998/07/07 17:11:13 allison Exp $
|
||||
# $Id: GNUmakefile,v 1.1 1999/01/07 16:14:47 gunter Exp $
|
||||
|
||||
name := G4OpenGL
|
||||
|
||||
|
||||
+12
-12
@@ -5,32 +5,32 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateScene.hh,v 2.2 1998/11/06 13:42:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLImmediateSceneHandler.hh,v 1.2 1999/05/10 14:03:39 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// G4OpenGLImmediateScene - no Display lists.
|
||||
// G4OpenGLImmediateSceneHandler - no Display lists.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLIMMEDIATESCENE_HH
|
||||
#define G4OPENGLIMMEDIATESCENE_HH
|
||||
#ifndef G4OPENGLIMMEDIATESCENEHANDLER_HH
|
||||
#define G4OPENGLIMMEDIATESCENEHANDLER_HH
|
||||
|
||||
#include "G4VScene.hh"
|
||||
#include "G4OpenGLView.hh"
|
||||
#include "G4OpenGLImmediateView.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4OpenGLViewer.hh"
|
||||
#include "G4OpenGLImmediateViewer.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
|
||||
class G4OpenGLImmediate;
|
||||
|
||||
class G4OpenGLImmediateScene: public G4OpenGLScene {
|
||||
class G4OpenGLImmediateSceneHandler: public G4OpenGLSceneHandler {
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateScene (G4VGraphicsSystem& system, const G4String& name);
|
||||
~G4OpenGLImmediateScene ();
|
||||
G4OpenGLImmediateSceneHandler (G4VGraphicsSystem& system, const G4String& name);
|
||||
virtual ~G4OpenGLImmediateSceneHandler ();
|
||||
void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives ();
|
||||
void BeginModeling ();
|
||||
@@ -1,44 +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: G4OpenGLImmediateView.hh,v 2.0 1998/07/02 16:44:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLImmediateView : Encapsulates the `immediateness' of
|
||||
// an OpenGL view, for inheritance by
|
||||
// derived (X, Xm...) classes.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLIMMEDIATEVIEW_HH
|
||||
#define G4OPENGLIMMEDIATEVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLView.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
#include "G4OpenGLImmediateScene.hh"
|
||||
#include "G4OpenGLTransform3D.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLScene;
|
||||
class G4OpenGLImmediateScene;
|
||||
|
||||
class G4OpenGLImmediateView: virtual public G4OpenGLView {
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateView (G4OpenGLImmediateScene& scene);
|
||||
|
||||
private:
|
||||
G4OpenGLImmediateScene& fScene; // Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,44 @@
|
||||
// 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: G4OpenGLImmediateViewer.hh,v 1.2 1999/01/11 00:47:35 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLImmediateViewer : Encapsulates the `immediateness' of
|
||||
// an OpenGL viewer, for inheritance by
|
||||
// derived (X, Xm...) classes.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLIMMEDIATEVIEWER_HH
|
||||
#define G4OPENGLIMMEDIATEVIEWER_HH
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLViewer.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "G4OpenGLImmediateSceneHandler.hh"
|
||||
#include "G4OpenGLTransform3D.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLSceneHandler;
|
||||
class G4OpenGLImmediateSceneHandler;
|
||||
|
||||
class G4OpenGLImmediateViewer: virtual public G4OpenGLViewer {
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateViewer (G4OpenGLImmediateSceneHandler& scene);
|
||||
|
||||
private:
|
||||
G4OpenGLImmediateSceneHandler& fSceneHandler; // Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32.hh,v 2.0 1998/07/02 16:44:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLImmediateWin32.hh,v 1.3 1999/01/11 00:47:36 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateWin32 graphics system factory.
|
||||
@@ -21,8 +21,8 @@
|
||||
class G4OpenGLImmediateWin32: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLImmediateWin32 ();
|
||||
G4VScene* CreateScene ();
|
||||
G4VView* CreateView (G4VScene&);
|
||||
G4VSceneHandler* CreateSceneHandler ();
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,39 +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: G4OpenGLImmediateWin32View.hh,v 2.0 1998/07/02 16:44:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateWin32View : a class derived from G4OpenGLWin32View and
|
||||
// G4OpenGLImmediateView.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
|
||||
#ifndef G4OpenGLIMMEDIATEWIN32VIEW_HH
|
||||
#define G4OpenGLIMMEDIATEWIN32VIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLImmediateView.hh"
|
||||
#include "G4OpenGLWin32View.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLImmediateScene;
|
||||
|
||||
class G4OpenGLImmediateWin32View:
|
||||
public G4OpenGLWin32View, public G4OpenGLImmediateView{
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateWin32View (G4OpenGLImmediateScene& scene);
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,39 @@
|
||||
// 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: G4OpenGLImmediateWin32Viewer.hh,v 1.1 1999/01/09 16:22:37 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateWin32Viewer : a class derived from
|
||||
// G4OpenGLWin32Viewer and G4OpenGLImmediateViewer.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
|
||||
#ifndef G4OpenGLIMMEDIATEWIN32VIEWER_HH
|
||||
#define G4OpenGLIMMEDIATEWIN32VIEWER_HH
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLImmediateViewer.hh"
|
||||
#include "G4OpenGLWin32Viewer.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLImmediateSceneHandler;
|
||||
|
||||
class G4OpenGLImmediateWin32Viewer:
|
||||
public G4OpenGLWin32Viewer, public G4OpenGLImmediateViewer{
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateWin32Viewer (G4OpenGLImmediateSceneHandler& scene);
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateX.hh,v 2.1 1998/11/06 13:42:14 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLImmediateX.hh,v 1.4 1999/05/10 14:03:41 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -22,8 +22,9 @@
|
||||
class G4OpenGLImmediateX: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLImmediateX ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
virtual ~G4OpenGLImmediateX ();
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& name = "");
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,41 +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: G4OpenGLImmediateXView.hh,v 2.1 1998/11/06 13:42:15 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLImmediateXView : a class derived from G4OpenGLXView and
|
||||
// G4OpenGLImmediateView.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
|
||||
#ifndef G4OpenGLIMMEDIATEXVIEW_HH
|
||||
#define G4OpenGLIMMEDIATEXVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLImmediateView.hh"
|
||||
#include "G4OpenGLXView.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLImmediateScene;
|
||||
|
||||
class G4OpenGLImmediateXView:
|
||||
public G4OpenGLXView, public G4OpenGLImmediateView{
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateXView (G4OpenGLImmediateScene& scene,
|
||||
const G4String& name = "");
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,42 @@
|
||||
// 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: G4OpenGLImmediateXViewer.hh,v 1.2 1999/05/10 14:03:42 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLImmediateXViewer : a class derived from G4OpenGLXViewer and
|
||||
// G4OpenGLImmediateViewer.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
|
||||
#ifndef G4OpenGLIMMEDIATEXVIEWER_HH
|
||||
#define G4OpenGLIMMEDIATEXVIEWER_HH
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLImmediateViewer.hh"
|
||||
#include "G4OpenGLXViewer.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLImmediateSceneHandler;
|
||||
|
||||
class G4OpenGLImmediateXViewer:
|
||||
public G4OpenGLXViewer, public G4OpenGLImmediateViewer{
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateXViewer (G4OpenGLImmediateSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
virtual ~G4OpenGLImmediateXViewer ();
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXm.hh,v 2.1 1998/11/06 13:42:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLImmediateXm.hh,v 1.3 1999/01/11 00:47:37 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -22,8 +22,8 @@
|
||||
class G4OpenGLImmediateXm: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLImmediateXm ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& name = "");
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+12
-12
@@ -5,33 +5,33 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXmView.hh,v 2.1 1998/11/06 13:42:17 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLImmediateXmViewer.hh,v 1.1 1999/01/09 16:22:41 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// G4OpenGLXmView : Class derived from G4OpenGLXView, to provide
|
||||
// G4OpenGLXmViewer : Class derived from G4OpenGLXViewer, to provide
|
||||
// (Motif) widget OpenGL functionality for GEANT4.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OPENGLIMMEDIATEXMVIEW_HH
|
||||
#define G4OPENGLIMMEDIATEXMVIEW_HH
|
||||
#ifndef G4OPENGLIMMEDIATEXMVIEWER_HH
|
||||
#define G4OPENGLIMMEDIATEXMVIEWER_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLImmediateView.hh"
|
||||
#include "G4OpenGLXmView.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLImmediateViewer.hh"
|
||||
#include "G4OpenGLXmViewer.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLImmediateScene;
|
||||
class G4OpenGLImmediateSceneHandler;
|
||||
|
||||
class G4OpenGLImmediateXmView:
|
||||
public G4OpenGLXmView, public G4OpenGLImmediateView{
|
||||
class G4OpenGLImmediateXmViewer:
|
||||
public G4OpenGLXmViewer, public G4OpenGLImmediateViewer{
|
||||
|
||||
public:
|
||||
G4OpenGLImmediateXmView (G4OpenGLImmediateScene& scene,
|
||||
G4OpenGLImmediateXmViewer (G4OpenGLImmediateSceneHandler& scene,
|
||||
const G4String& name = "");
|
||||
void DrawView ();
|
||||
|
||||
@@ -1,53 +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: G4OpenGLScene.icc,v 2.1 1998/08/07 12:46:14 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 20th January 1998
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Box& box) {
|
||||
G4VScene::AddThis (box);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Cons& cons) {
|
||||
G4VScene::AddThis (cons);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Tubs& tubs) {
|
||||
G4VScene::AddThis (tubs);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Trd& trd) {
|
||||
G4VScene::AddThis (trd);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Trap& trap) {
|
||||
G4VScene::AddThis (trap);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Sphere& sphere) {
|
||||
G4VScene::AddThis (sphere);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Para& para) {
|
||||
G4VScene::AddThis (para);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4Torus& torus) {
|
||||
G4VScene::AddThis (torus);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddThis (const G4VSolid& vsolid) {
|
||||
G4VScene::AddThis (vsolid);
|
||||
}
|
||||
|
||||
inline void G4OpenGLScene::AddPrimitive (const G4Polymarker& polymarker) {
|
||||
G4VScene::AddPrimitive (polymarker);
|
||||
}
|
||||
|
||||
+12
-14
@@ -5,23 +5,21 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLScene.hh,v 2.3 1998/11/06 13:42:18 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLSceneHandler.hh,v 1.3 1999/06/29 18:06:53 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
// OpenGL scene - base for immediate mode and stored mode classes to
|
||||
// inherit from.
|
||||
// OpenGL scene handler - base for immediate mode and stored mode classes to
|
||||
// inherit from.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSCENE_HH
|
||||
#define G4OPENGLSCENE_HH
|
||||
#ifndef G4OPENGLSCENEHANDLER_HH
|
||||
#define G4OPENGLSCENEHANDLER_HH
|
||||
|
||||
#include <rw/tvhdict.h>
|
||||
|
||||
#include "G4VScene.hh"
|
||||
#include "G4OpenGLView.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4OpenGLViewer.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
|
||||
@@ -30,7 +28,7 @@
|
||||
#include <GL/glu.h>
|
||||
|
||||
// Base class for various OpenGLScene classes.
|
||||
class G4OpenGLScene: public G4VScene {
|
||||
class G4OpenGLSceneHandler: public G4VSceneHandler {
|
||||
|
||||
public:
|
||||
void AddPrimitive (const G4Polyline&);
|
||||
@@ -52,17 +50,17 @@ public:
|
||||
void AddThis (const G4VSolid&);
|
||||
|
||||
protected:
|
||||
G4OpenGLScene (G4VGraphicsSystem& system,
|
||||
G4OpenGLSceneHandler (G4VGraphicsSystem& system,
|
||||
G4int id,
|
||||
const G4String& name = "");
|
||||
~G4OpenGLScene ();
|
||||
virtual ~G4OpenGLSceneHandler ();
|
||||
G4bool initialize_hlr;
|
||||
|
||||
private:
|
||||
GLdouble clear_colour[4];
|
||||
};
|
||||
|
||||
#include "G4OpenGLScene.icc"
|
||||
#include "G4OpenGLSceneHandler.icc"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
// 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: G4OpenGLSceneHandler.icc,v 1.1 1999/01/09 16:22:43 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 20th January 1998
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddThis (const G4Box& box) {
|
||||
G4VSceneHandler::AddThis (box);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddThis (const G4Cons& cons) {
|
||||
G4VSceneHandler::AddThis (cons);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddThis (const G4Tubs& tubs) {
|
||||
G4VSceneHandler::AddThis (tubs);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddThis (const G4Trd& trd) {
|
||||
G4VSceneHandler::AddThis (trd);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddThis (const G4Trap& trap) {
|
||||
G4VSceneHandler::AddThis (trap);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddThis (const G4Sphere& sphere) {
|
||||
G4VSceneHandler::AddThis (sphere);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddThis (const G4Para& para) {
|
||||
G4VSceneHandler::AddThis (para);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddThis (const G4Torus& torus) {
|
||||
G4VSceneHandler::AddThis (torus);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddThis (const G4VSolid& vsolid) {
|
||||
G4VSceneHandler::AddThis (vsolid);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddPrimitive (const G4Polymarker& polymarker) {
|
||||
G4VSceneHandler::AddPrimitive (polymarker);
|
||||
}
|
||||
|
||||
+15
-14
@@ -5,33 +5,34 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredScene.hh,v 2.2 1998/11/06 13:42:19 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.3 1999/06/29 18:06:54 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// G4OpenGLStoredScene - creates OpenGL Display lists.
|
||||
// G4OpenGLStoredSceneHandler - creates OpenGL Display lists.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSTOREDSCENE_HH
|
||||
#define G4OPENGLSTOREDSCENE_HH
|
||||
#ifndef G4OPENGLSTOREDSCENEHANDLER_HH
|
||||
#define G4OPENGLSTOREDSCENEHANDLER_HH
|
||||
|
||||
#include "G4VScene.hh"
|
||||
#include "G4OpenGLView.hh"
|
||||
#include "G4OpenGLStoredView.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4OpenGLViewer.hh"
|
||||
#include "G4OpenGLStoredViewer.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include <rw/tvhdict.h>
|
||||
|
||||
class G4OpenGLStored;
|
||||
|
||||
class G4OpenGLStoredScene: public G4OpenGLScene {
|
||||
class G4OpenGLStoredSceneHandler: public G4OpenGLSceneHandler {
|
||||
|
||||
public:
|
||||
typedef unsigned long G4VSolidPointer;
|
||||
G4OpenGLStoredScene (G4VGraphicsSystem& system, const G4String& name = "");
|
||||
~G4OpenGLStoredScene ();
|
||||
G4OpenGLStoredSceneHandler (G4VGraphicsSystem& system, const G4String& name = "");
|
||||
virtual ~G4OpenGLStoredSceneHandler ();
|
||||
void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives ();
|
||||
void BeginModeling ();
|
||||
@@ -40,7 +41,7 @@ public:
|
||||
G4bool fMemoryForDisplayLists; // avoid memory overflow
|
||||
|
||||
private:
|
||||
friend class G4OpenGLStoredView;
|
||||
friend class G4OpenGLStoredViewer;
|
||||
// ..allows access to P/TODLs.
|
||||
void ClearStore ();
|
||||
void RequestPrimitives (const G4VSolid& solid);
|
||||
@@ -62,7 +63,7 @@ friend class G4OpenGLStoredView;
|
||||
RWTValHashDictionary<G4VSolidPointer, G4int> fSolidDictionary;
|
||||
};
|
||||
|
||||
inline G4int G4OpenGLStoredScene::GetSceneCount () {
|
||||
inline G4int G4OpenGLStoredSceneHandler::GetSceneCount () {
|
||||
return fSceneCount;
|
||||
}
|
||||
|
||||
@@ -1,45 +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: G4OpenGLStoredView.hh,v 2.0 1998/07/02 16:44:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLStoredView : Encapsulates the `storedness' of
|
||||
// an OpenGL view, for inheritance by
|
||||
// derived (X, Xm...) classes.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSTOREDVIEW_HH
|
||||
#define G4OPENGLSTOREDVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLView.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
#include "G4OpenGLStoredScene.hh"
|
||||
#include "G4OpenGLTransform3D.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLStoredScene;
|
||||
|
||||
class G4OpenGLStoredView: virtual public G4OpenGLView {
|
||||
|
||||
public:
|
||||
G4OpenGLStoredView (G4OpenGLStoredScene& scene);
|
||||
|
||||
protected:
|
||||
void KernelVisitDecision ();
|
||||
void DrawDisplayLists ();
|
||||
G4OpenGLStoredScene& fScene; // Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
// 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: G4OpenGLStoredViewer.hh,v 1.3 1999/05/10 14:03:46 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLStoredViewer : Encapsulates the `storedness' of
|
||||
// an OpenGL viewer, for inheritance by
|
||||
// derived (X, Xm...) classes.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSTOREDVIEWER_HH
|
||||
#define G4OPENGLSTOREDVIEWER_HH
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLViewer.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "G4OpenGLStoredSceneHandler.hh"
|
||||
#include "G4OpenGLTransform3D.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLStoredSceneHandler;
|
||||
|
||||
class G4OpenGLStoredViewer: virtual public G4OpenGLViewer {
|
||||
|
||||
public:
|
||||
G4OpenGLStoredViewer (G4OpenGLStoredSceneHandler& scene);
|
||||
virtual ~G4OpenGLStoredViewer ();
|
||||
|
||||
protected:
|
||||
void KernelVisitDecision ();
|
||||
void DrawDisplayLists ();
|
||||
G4OpenGLStoredSceneHandler& fSceneHandler; // Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32.hh,v 2.0 1998/07/02 16:44:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLStoredWin32.hh,v 1.3 1999/01/11 00:47:39 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredWin32 graphics system factory.
|
||||
@@ -21,8 +21,8 @@
|
||||
class G4OpenGLStoredWin32: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLStoredWin32 ();
|
||||
G4VScene* CreateScene ();
|
||||
G4VView* CreateView (G4VScene&);
|
||||
G4VSceneHandler* CreateSceneHandler ();
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,37 +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: G4OpenGLStoredWin32View.hh,v 2.0 1998/07/02 16:44:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredWin32View : a class derived from G4OpenGLWin32View and
|
||||
// G4OpenGLStoredView.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSTOREDWIN32VIEW_HH
|
||||
#define G4OPENGLSTOREDWIN32VIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLStoredView.hh"
|
||||
#include "G4OpenGLWin32View.hh"
|
||||
|
||||
class G4OpenGLStoredScene;
|
||||
|
||||
class G4OpenGLStoredWin32View:
|
||||
public G4OpenGLWin32View, public G4OpenGLStoredView{
|
||||
|
||||
public:
|
||||
G4OpenGLStoredWin32View (G4OpenGLStoredScene& scene);
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// 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: G4OpenGLStoredWin32Viewer.hh,v 1.1 1999/01/09 16:22:46 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredWin32Viewer : a class derived from
|
||||
// G4OpenGLWin32Viewer and G4OpenGLStoredViewer.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSTOREDWIN32VIEWER_HH
|
||||
#define G4OPENGLSTOREDWIN32VIEWER_HH
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLStoredViewer.hh"
|
||||
#include "G4OpenGLWin32Viewer.hh"
|
||||
|
||||
class G4OpenGLStoredSceneHandler;
|
||||
|
||||
class G4OpenGLStoredWin32Viewer:
|
||||
public G4OpenGLWin32Viewer, public G4OpenGLStoredViewer{
|
||||
|
||||
public:
|
||||
G4OpenGLStoredWin32Viewer (G4OpenGLStoredSceneHandler& scene);
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredX.hh,v 2.1 1998/11/06 13:42:20 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLStoredX.hh,v 1.4 1999/05/10 14:03:47 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -22,8 +22,9 @@
|
||||
class G4OpenGLStoredX: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLStoredX ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
virtual ~G4OpenGLStoredX ();
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& name = "");
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,38 +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: G4OpenGLStoredXView.hh,v 2.1 1998/11/06 13:42:21 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLStoredXView : a class derived from G4OpenGLXView and
|
||||
// G4OpenGLStoredView.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSTOREDXVIEW_HH
|
||||
#define G4OPENGLSTOREDXVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLStoredView.hh"
|
||||
#include "G4OpenGLXView.hh"
|
||||
|
||||
class G4OpenGLStoredScene;
|
||||
|
||||
class G4OpenGLStoredXView:
|
||||
public G4OpenGLXView, public G4OpenGLStoredView{
|
||||
|
||||
public:
|
||||
G4OpenGLStoredXView (G4OpenGLStoredScene& scene, const G4String& name = "");
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
// 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: G4OpenGLStoredXViewer.hh,v 1.2 1999/05/10 14:03:49 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// Class G4OpenGLStoredXViewer : a class derived from G4OpenGLXViewer and
|
||||
// G4OpenGLStoredViewer.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
|
||||
#ifndef G4OPENGLSTOREDXVIEWER_HH
|
||||
#define G4OPENGLSTOREDXVIEWER_HH
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLStoredViewer.hh"
|
||||
#include "G4OpenGLXViewer.hh"
|
||||
|
||||
class G4OpenGLStoredSceneHandler;
|
||||
|
||||
class G4OpenGLStoredXViewer:
|
||||
public G4OpenGLXViewer, public G4OpenGLStoredViewer{
|
||||
|
||||
public:
|
||||
G4OpenGLStoredXViewer (G4OpenGLStoredSceneHandler& scene, const G4String& name = "");
|
||||
virtual ~G4OpenGLStoredXViewer ();
|
||||
void DrawView ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLStoredXm.hh,v 2.1 1998/11/06 13:42:21 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLStoredXm.hh,v 1.3 1999/01/11 00:47:40 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -22,8 +22,8 @@
|
||||
class G4OpenGLStoredXm: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4OpenGLStoredXm ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
|
||||
G4VViewer* CreateViewer (G4VSceneHandler&, const G4String& name = "");
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,38 +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: G4OpenGLStoredXmView.hh,v 2.1 1998/11/06 13:42:22 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// Class G4OpenGLStoredXmView : a class derived from G4OpenGLXmView
|
||||
// and G4OpenGLStoredView.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OpenGLSTOREDXMVIEW_HH
|
||||
#define G4OpenGLSTOREDXMVIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLStoredView.hh"
|
||||
#include "G4OpenGLXmView.hh"
|
||||
|
||||
class G4OpenGLStoredScene;
|
||||
|
||||
class G4OpenGLStoredXmView:
|
||||
public G4OpenGLXmView, public G4OpenGLStoredView{
|
||||
|
||||
public:
|
||||
G4OpenGLStoredXmView (G4OpenGLStoredScene& scene, const G4String& name = "");
|
||||
void DrawView ();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
// 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: G4OpenGLStoredXmViewer.hh,v 1.1 1999/01/09 16:22:50 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
// Class G4OpenGLStoredXmViewer : a class derived from G4OpenGLXmViewer
|
||||
// and G4OpenGLStoredViewer.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#ifndef G4OpenGLSTOREDXMVIEWER_HH
|
||||
#define G4OpenGLSTOREDXMVIEWER_HH
|
||||
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLStoredViewer.hh"
|
||||
#include "G4OpenGLXmViewer.hh"
|
||||
|
||||
class G4OpenGLStoredSceneHandler;
|
||||
|
||||
class G4OpenGLStoredXmViewer:
|
||||
public G4OpenGLXmViewer, public G4OpenGLStoredViewer{
|
||||
|
||||
public:
|
||||
G4OpenGLStoredXmViewer (G4OpenGLStoredSceneHandler& scene, const G4String& name = "");
|
||||
void DrawView ();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLTransform3D.hh,v 2.0 1998/07/02 16:44:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLTransform3D.hh,v 1.2 1999/01/09 16:22:51 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 24th October 1996
|
||||
|
||||
+14
-13
@@ -5,32 +5,33 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLView.hh,v 2.0 1998/07/02 16:44:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLViewer.hh,v 1.3 1999/05/10 14:03:50 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
// OpenGL view - opens window, hard copy, etc.
|
||||
// OpenGL viewer - opens window, hard copy, etc.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLVIEW_HH
|
||||
#define G4OPENGLVIEW_HH
|
||||
#ifndef G4OPENGLVIEWER_HH
|
||||
#define G4OPENGLVIEWER_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
class G4OpenGLScene;
|
||||
class G4OpenGLSceneHandler;
|
||||
|
||||
// Base class for various OpenGLView classes.
|
||||
class G4OpenGLView: virtual public G4VView {
|
||||
class G4OpenGLViewer: virtual public G4VViewer {
|
||||
|
||||
public:
|
||||
void ClearView ();
|
||||
|
||||
protected:
|
||||
G4OpenGLView (G4OpenGLScene& scene);
|
||||
G4OpenGLViewer (G4OpenGLSceneHandler& scene);
|
||||
virtual ~G4OpenGLViewer ();
|
||||
void SetView ();
|
||||
void HaloingFirstPass ();
|
||||
void HaloingSecondPass ();
|
||||
@@ -46,14 +47,14 @@ protected:
|
||||
|
||||
static int snglBuf_RGBA[10];
|
||||
static int dblBuf_RGBA[11];
|
||||
G4OpenGLScene& fScene; // Graphics Scene for this view.
|
||||
G4OpenGLSceneHandler& fSceneHandler; // Graphics Scene for this view.
|
||||
|
||||
private:
|
||||
// G4OpenGLScene& fScene; // Graphics Scene for this view.
|
||||
// G4OpenGLSceneHandler& fSceneHandler; // Graphics Scene for this view.
|
||||
};
|
||||
|
||||
class G4OpenGLImmediateScene;
|
||||
class G4OpenGLStoredScene;
|
||||
class G4OpenGLImmediateSceneHandler;
|
||||
class G4OpenGLStoredSceneHandler;
|
||||
|
||||
#endif
|
||||
|
||||
+12
-12
@@ -5,20 +5,20 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLWin32View.hh,v 2.0 1998/07/02 16:44:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLWin32Viewer.hh,v 1.1 1999/01/09 16:22:53 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// G4OpenGLWin32View : Class to provide WindowsNT specific
|
||||
// functionality for OpenGL in GEANT4
|
||||
// G4OpenGLWin32Viewer : Class to provide WindowsNT specific
|
||||
// functionality for OpenGL in GEANT4
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
|
||||
#ifndef G4OPENGLWIN32VIEW_HH
|
||||
#define G4OPENGLWIN32VIEW_HH
|
||||
#ifndef G4OPENGLWIN32VIEWER_HH
|
||||
#define G4OPENGLWIN32VIEWER_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
class G4OpenGLScene;
|
||||
class G4OpenGLSceneHandler;
|
||||
|
||||
class G4OpenGLWin32View: virtual public G4OpenGLView {
|
||||
class G4OpenGLWin32Viewer: virtual public G4OpenGLViewer {
|
||||
|
||||
public:
|
||||
G4OpenGLWin32View (G4OpenGLScene& scene);
|
||||
~G4OpenGLWin32View ();
|
||||
G4OpenGLWin32Viewer (G4OpenGLSceneHandler& scene);
|
||||
~G4OpenGLWin32Viewer ();
|
||||
void FinishView ();
|
||||
|
||||
protected:
|
||||
+15
-13
@@ -5,21 +5,21 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXView.hh,v 2.5 1998/10/29 09:37:23 barrand Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXViewer.hh,v 1.4 1999/06/29 18:06:56 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
// G4OpenGLXView : Class to provide XWindows specific
|
||||
// functionality for OpenGL in GEANT4
|
||||
// G4OpenGLXViewer : Class to provide XWindows specific
|
||||
// functionality for OpenGL in GEANT4
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#ifndef G4OPENGLXVIEW_HH
|
||||
#define G4OPENGLXVIEW_HH
|
||||
#ifndef G4OPENGLXVIEWER_HH
|
||||
#define G4OPENGLXVIEWER_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "G4OpenGLScene.hh"
|
||||
#include "G4VViewer.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tvordvec.h>
|
||||
|
||||
@@ -31,13 +31,15 @@
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
class G4OpenGLScene;
|
||||
class G4OpenGLSceneHandler;
|
||||
|
||||
class G4OpenGLXView: virtual public G4OpenGLView {
|
||||
class G4OpenGLXViewer: virtual public G4OpenGLViewer {
|
||||
|
||||
public:
|
||||
G4OpenGLXView (G4OpenGLScene& scene);
|
||||
~G4OpenGLXView ();
|
||||
G4OpenGLXViewer (G4OpenGLSceneHandler& scene);
|
||||
virtual ~G4OpenGLXViewer ();
|
||||
void SetView ();
|
||||
void ShowView ();
|
||||
void FinishView ();
|
||||
void print();
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmBox.hh,v 2.0 1998/07/02 16:44:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmBox.hh,v 1.2 1999/01/09 16:22:55 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//Box container class
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmConvenienceRoutines.hh,v 2.1 1998/07/12 03:09:31 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmConvenienceRoutines.hh,v 1.2 1999/01/09 16:22:55 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifndef G4OPENGLXMCONVENIENCEROUTINES_HH
|
||||
#define G4OPENGLXMCONVENIENCEROUTINES_HH
|
||||
|
||||
#include "G4OpenGLXmView.hh"
|
||||
#include "G4OpenGLXmViewer.hh"
|
||||
|
||||
// Methods contained in G4OpenGLXmConvenienceRoutines:
|
||||
//
|
||||
@@ -27,7 +27,7 @@
|
||||
//
|
||||
// Description of methods in G4OpenGLXmConvenienceRoutines:
|
||||
//
|
||||
// 1) Add_four_arrow_buttons (G4OpenGLXmView* pView,
|
||||
// 1) Add_four_arrow_buttons (G4OpenGLXmViewer* pView,
|
||||
// XtCallbackProc* arrow_callbacks,
|
||||
// Widget* parent_widget)
|
||||
//
|
||||
@@ -44,7 +44,7 @@
|
||||
// G4int default_button,
|
||||
// char* radio_box_name,
|
||||
// char** button_names,
|
||||
// G4OpenGLXmView* pView);
|
||||
// G4OpenGLXmViewer* pView);
|
||||
//
|
||||
// Adds a row column widget containing num_buttons toggle buttons, to the
|
||||
// row column parent_widget passed in the arguments List. label_string is
|
||||
@@ -64,7 +64,7 @@
|
||||
// Widget* row_col_box,
|
||||
// Widget* wid,
|
||||
// G4float* val,
|
||||
// G4OpenGLXmView* pView);
|
||||
// G4OpenGLXmViewer* pView);
|
||||
//
|
||||
// Adds a text field widget to the row_col_box supplied in the arguments
|
||||
// List. widget goes towards giving the widgets created within Add_set_field
|
||||
@@ -76,7 +76,7 @@
|
||||
// 4) Add_slider_box (char* label_string,
|
||||
// G4int num_sliders,
|
||||
// char** slider_names,
|
||||
// G4OpenGLXmView* pView,
|
||||
// G4OpenGLXmViewer* pView,
|
||||
// G4float* min_array,
|
||||
// G4float* max_array,
|
||||
// G4float* value_array,
|
||||
@@ -112,7 +112,7 @@
|
||||
// This XtCallbackProc reads a character string from a text field widget,
|
||||
// and converts it to a floating point number.
|
||||
|
||||
void Add_four_arrow_buttons (G4OpenGLXmView* pView,
|
||||
void Add_four_arrow_buttons (G4OpenGLXmViewer* pView,
|
||||
XtCallbackProc* arrow_callbacks,
|
||||
Widget* parent_widget);
|
||||
|
||||
@@ -123,19 +123,19 @@ void Add_radio_box (char* label_string,
|
||||
G4int default_button,
|
||||
char* radio_box_name,
|
||||
char** button_names,
|
||||
G4OpenGLXmView* pView);
|
||||
G4OpenGLXmViewer* pView);
|
||||
|
||||
void Add_set_field (char* widget,
|
||||
char* widget_text,
|
||||
Widget* row_col_box,
|
||||
Widget* wid,
|
||||
G4float* val,
|
||||
G4OpenGLXmView* pView);
|
||||
G4OpenGLXmViewer* pView);
|
||||
|
||||
void Add_slider_box (char* label_string,
|
||||
G4int num_sliders,
|
||||
char** slider_names,
|
||||
G4OpenGLXmView* pView,
|
||||
G4OpenGLXmViewer* pView,
|
||||
G4float* min_array,
|
||||
G4float* max_array,
|
||||
G4float* value_array,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmFourArrowButtons.hh,v 2.0 1998/07/02 16:44:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmFourArrowButtons.hh,v 1.2 1999/01/09 16:22:56 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//Four arrow buttons class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmFramedBox.hh,v 2.0 1998/07/02 16:45:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmFramedBox.hh,v 1.2 1999/01/09 16:22:56 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//Framed box container class
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmMainMenubarCallbacks.hh,v 2.0 1998/07/02 16:45:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmMainMenubarCallbacks.hh,v 1.2 1999/01/09 16:22:57 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifndef G4OPENGLXMMAINMENUBARCALLBACKS_HH
|
||||
#define G4OPENGLXMMAINMENUBARCALLBACKS_HH
|
||||
|
||||
#include "G4OpenGLXmView.hh"
|
||||
#include "G4OpenGLXmViewer.hh"
|
||||
|
||||
void misc_callback (Widget w, XtPointer clientData, XtPointer callData);
|
||||
void actions_callback (Widget w, XtPointer clientData, XtPointer callData);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmPanningCallbacks.hh,v 2.0 1998/07/02 16:45:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmPanningCallbacks.hh,v 1.2 1999/01/09 16:22:58 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifndef G4OPENGLXMPANNINGCALLBACKS_HH
|
||||
#define G4OPENGLXMPANNINGCALLBACKS_HH
|
||||
|
||||
#include "G4OpenGLXmView.hh"
|
||||
#include "G4OpenGLXmViewer.hh"
|
||||
|
||||
void zoom_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmPushButton.hh,v 2.0 1998/07/02 16:45:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmPushButton.hh,v 1.2 1999/01/09 16:22:58 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//Push button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmRadioButton.hh,v 2.0 1998/07/02 16:45:10 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmRadioButton.hh,v 1.2 1999/01/09 16:22:59 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//Radio button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmResources.hh,v 2.1 1998/10/04 11:32:49 ajw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmResources.hh,v 1.2 1999/01/09 16:22:59 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Default resources file for GEANT4 OpenGL Motif windows.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmRotationCallbacks.hh,v 2.0 1998/07/02 16:45:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmRotationCallbacks.hh,v 1.2 1999/01/09 16:23:00 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifndef G4OPENGLXMROTATIONCALLBACKS_HH
|
||||
#define G4OPENGLXMROTATIONCALLBACKS_HH
|
||||
|
||||
#include "G4OpenGLXmView.hh"
|
||||
#include "G4OpenGLXmViewer.hh"
|
||||
|
||||
void theta_rotation_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmSeparator.hh,v 2.0 1998/07/02 16:45:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmSeparator.hh,v 1.2 1999/01/09 16:23:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//Separator class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmSliderBar.hh,v 2.0 1998/07/02 16:45:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmSliderBar.hh,v 1.2 1999/01/09 16:23:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
//Slider bar class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OpenGLXmStyleCallbacks.hh,v 2.0 1998/07/02 16:45:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4OpenGLXmStyleCallbacks.hh,v 1.2 1999/01/09 16:23:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifndef G4OPENGLXMSTYLECALLBACKS_HH
|
||||
#define G4OPENGLXMSTYLECALLBACKS_HH
|
||||
|
||||
#include "G4OpenGLXmView.hh"
|
||||
#include "G4OpenGLXmViewer.hh"
|
||||
|
||||
void drawing_style_callback (Widget w,
|
||||
XtPointer clientData,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user