Import Geant4 4.1.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILE.hh,v 1.8 2001/07/27 22:32:55 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE driver factory.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILESceneHandler.hh,v 1.10 2001/09/17 07:40:32 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILEViewer.hh,v 1.8 2001/07/27 22:32:57 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE viewer - opens window, hard copy, etc.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRClientServer.hh,v 1.6 2001/07/11 10:08:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Wed Jul 3 14:13:52 JST 1996
|
||||
////////////////////////////////
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRConst.hh,v 1.6 2001/07/11 10:08:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Tue Jul 2 15:30:49 JST 1996
|
||||
///////////////////////////////////
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRFeatures.hh,v 1.5 2001/07/11 10:08:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#if !defined G4_FR_FEATURES_HH
|
||||
#define G4_FR_FEATURES_HH
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRSceneFunc.icc,v 1.1 2001/12/01 20:59:59 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRofstream.hh,v 1.5 2001/07/11 10:08:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
#include"g4std/fstream"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRenderer.hh,v 1.7 2001/07/11 10:08:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRendererSceneHandler.hh,v 1.9 2001/09/17 07:40:32 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 11:19:19 JST 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRendererViewer.hh,v 1.7 2001/07/11 10:08:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 12:10:14 JST 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILE.cc,v 1.9 2001/07/27 22:32:59 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE factory.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILESceneHandler.cc,v 1.11 2001/12/01 20:52:06 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE scene.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DAWNFILEViewer.cc,v 1.13 2001/07/27 22:33:01 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE view - opens window, hard copy, etc.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FRClientServer.cc,v 1.5 2001/07/11 10:08:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// Satoshi TANAKA, Wed Jul 3 14:14:29 JST 1996
|
||||
////////////////////////////////
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRenderer.cc,v 1.7 2001/07/11 10:08:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRendererSceneHandler.cc,v 1.8 2001/12/01 20:52:06 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 11:34:24 JST 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FukuiRendererViewer.cc,v 1.7 2001/07/11 10:08:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 12:09:11 JST 1996
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.9 2001/11/19 15:08:37 johna Exp $
|
||||
$Id: History,v 1.16 2002/02/10 07:12:52 perl Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -20,6 +20,32 @@ committal in the CVS repository !
|
||||
History file for visualization/HepRep sub-category
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
4th February 2002 Joseph Perl (vis-V04-00-01)
|
||||
- Check for missing hierarchy layers in HepRepXMLWriter.
|
||||
(Not strictly needed since have a culled layer check in SceneHandler,
|
||||
but may be useful in other applications of HepRepXMLWriter).
|
||||
|
||||
3rd February 2002 Joseph Perl
|
||||
- Detect transient data by testing for
|
||||
!fpCurrentPV || fReadyForTransients
|
||||
rather than just fReadyForTransients
|
||||
|
||||
1st February 2002 Joseph Perl
|
||||
- Defer file opening until first real HepRepType is to be written.
|
||||
- Moved HepRep code from AddThis to AddPrimitive.
|
||||
- Add additional levels to hierarchy if any appear to have been
|
||||
removed by culling.
|
||||
- Add visibility attribute.
|
||||
|
||||
29th January 2002 Joseph Perl
|
||||
- Relocate file-opening logic to constructor and ShowView
|
||||
(had been in SetView).
|
||||
|
||||
28th January 2002 Joseph Perl
|
||||
- Produce hierarchical output rather than flat HepRepType structure.
|
||||
- Handle trajectories as well as detector geometry.
|
||||
- Output files now named G4Data<n>.heprep where n increments with each open.
|
||||
|
||||
19th November 2001 John Allison (vis-V03-02-19)
|
||||
- Added G4HEPREPFILEDEBUG to control debug code.
|
||||
- Changed <fstream.h> to "g4std/fstream".
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFile.hh,v 1.1 2001/11/06 11:48:04 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4HepRepFile.hh,v 1.4 2002/02/02 04:00:12 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
|
||||
@@ -21,12 +21,13 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFileSceneHandler.hh,v 1.4 2001/11/21 16:48:58 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4HepRepFileSceneHandler.hh,v 1.7 2002/02/02 04:00:14 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
// A base class for a scene handler to dump geometry hierarchy.
|
||||
// Joseph Perl 27th January 2002
|
||||
// A base class for a scene handler to export geometry and trajectories
|
||||
// to the HepRep xml file format.
|
||||
|
||||
#ifndef G4HepRepFileSCENEHANDLER_HH
|
||||
#define G4HepRepFileSCENEHANDLER_HH
|
||||
@@ -105,8 +106,8 @@ public:
|
||||
// void BeginPrimitives(const G4Transform3D& objectTransformation);
|
||||
// void EndPrimitives();
|
||||
|
||||
// void BeginModeling();
|
||||
// void EndModeling();
|
||||
void BeginModeling();
|
||||
void EndModeling();
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Required...
|
||||
@@ -121,9 +122,14 @@ protected:
|
||||
G4int fCurrentDepth; // Current depth of geom. hierarchy.
|
||||
G4VPhysicalVolume* fpCurrentPV; // Current physical volume.
|
||||
G4LogicalVolume* fpCurrentLV; // Current logical volume.
|
||||
const G4ModelingParameters* fpOriginalMP; // Keeps pointer to original.
|
||||
G4ModelingParameters* fpNonCullingMP; // For temporary non-culling.
|
||||
|
||||
private:
|
||||
HepRepXMLWriter *hepRepXMLWriter;
|
||||
void AddHepRepInstance(const char* primName,
|
||||
const G4Visible visible);
|
||||
int fileCounter;
|
||||
|
||||
#ifdef G4HEPREPFILEDEBUG
|
||||
void PrintThings();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFileViewer.hh,v 1.2 2001/11/19 15:06:52 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4HepRepFileViewer.hh,v 1.5 2002/02/02 04:00:16 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "G4VViewer.hh"
|
||||
|
||||
#include "HepRepXMLWriter.hh"
|
||||
#include "G4HepRepFileSceneHandler.hh"
|
||||
|
||||
class G4HepRepFileViewer: public G4VViewer {
|
||||
public:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
// File and Version Information:
|
||||
// $Id: HepRepXMLWriter.hh,v 1.4 2001/12/13 12:04:25 gunter Exp $
|
||||
// $Id: HepRepXMLWriter.hh,v 1.8 2002/02/02 04:00:19 perl Exp $
|
||||
//
|
||||
// Description:
|
||||
// Create a HepRep XML File (HepRep version 1).
|
||||
@@ -47,7 +47,7 @@ class HepRepXMLWriter
|
||||
public:
|
||||
HepRepXMLWriter();
|
||||
|
||||
void addType(const char* name);
|
||||
void addType(const char* name, int newTypeDepth);
|
||||
void addInstance();
|
||||
void addPrimitive();
|
||||
void addPoint(double x, double y, double z);
|
||||
@@ -57,7 +57,6 @@ public:
|
||||
const char* type,
|
||||
const char* extra);
|
||||
|
||||
// Four methods to fill attValues
|
||||
void addAttValue(const char* name,
|
||||
const char* value);
|
||||
|
||||
@@ -77,12 +76,20 @@ public:
|
||||
|
||||
void open(const char* filespec);
|
||||
void close();
|
||||
|
||||
void endTypes();
|
||||
|
||||
bool isOpen;
|
||||
int typeDepth;
|
||||
bool inType[50];
|
||||
bool inInstance[50];
|
||||
char* prevTypeName[50];
|
||||
|
||||
private:
|
||||
G4std::ofstream fout;
|
||||
|
||||
bool inType;
|
||||
bool inInstance;
|
||||
void init();
|
||||
|
||||
bool inPrimitive;
|
||||
bool inPoint;
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFile.cc,v 1.1 2001/11/06 11:48:07 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4HepRepFile.cc,v 1.4 2002/02/02 04:00:22 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Joseph Perl 1 October 2001
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFileSceneHandler.cc,v 1.3 2001/11/19 15:07:28 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4HepRepFileSceneHandler.cc,v 1.7 2002/02/03 22:22:58 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
// A base class for a scene handler to dump geometry hierarchy.
|
||||
// Based on a provisional G4HepRepFileGraphicsScene (was in modeling).
|
||||
// Joseph Perl 27th January 2002
|
||||
// A base class for a scene handler to export geometry and trajectories
|
||||
// to the HepRep xml file format.
|
||||
|
||||
#include "G4HepRepFileSceneHandler.hh"
|
||||
#include "G4HepRepFile.hh"
|
||||
@@ -65,12 +65,39 @@ G4HepRepFileSceneHandler::G4HepRepFileSceneHandler(G4VGraphicsSystem& system,
|
||||
fSceneCount++;
|
||||
|
||||
hepRepXMLWriter = ((G4HepRepFile*)(&system))->GetHepRepXMLWriter();
|
||||
G4cout << " From scene handler const: opening file, G4HepRepFile.xml"
|
||||
<< G4endl;
|
||||
fileCounter = 0;
|
||||
}
|
||||
|
||||
G4HepRepFileSceneHandler::~G4HepRepFileSceneHandler() {}
|
||||
|
||||
void G4HepRepFileSceneHandler::EstablishSpecials
|
||||
(G4PhysicalVolumeModel& pvModel) {
|
||||
pvModel.DefinePointersToWorkingSpace (&fCurrentDepth,
|
||||
&fpCurrentPV,
|
||||
&fpCurrentLV);
|
||||
}
|
||||
|
||||
void G4HepRepFileSceneHandler::BeginModeling() {
|
||||
G4VSceneHandler::BeginModeling(); // Required: see G4VSceneHandler.hh.
|
||||
// Force culling off...
|
||||
if (fpModel) {
|
||||
fpOriginalMP = fpModel->GetModelingParameters();
|
||||
if (fpOriginalMP) {
|
||||
fpNonCullingMP = new G4ModelingParameters(*fpOriginalMP);
|
||||
fpNonCullingMP->SetCulling(false);
|
||||
fpModel->SetModelingParameters(fpNonCullingMP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void G4HepRepFileSceneHandler::EndModeling() {
|
||||
if (fpModel && fpOriginalMP) {
|
||||
fpModel->SetModelingParameters(fpOriginalMP);
|
||||
delete fpNonCullingMP;
|
||||
}
|
||||
G4VSceneHandler::EndModeling(); // Required: see G4VSceneHandler.hh.
|
||||
}
|
||||
|
||||
#ifdef G4HEPREPFILEDEBUG
|
||||
void G4HepRepFileSceneHandler::PrintThings() {
|
||||
G4cout <<
|
||||
@@ -97,7 +124,6 @@ void G4HepRepFileSceneHandler::AddThis(const G4Box& box) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName());
|
||||
G4VSceneHandler::AddThis(box); // Invoke default action.
|
||||
}
|
||||
|
||||
@@ -109,7 +135,6 @@ void G4HepRepFileSceneHandler::AddThis(const G4Cons& cons) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName());
|
||||
G4VSceneHandler::AddThis(cons); // Invoke default action.
|
||||
}
|
||||
|
||||
@@ -121,7 +146,6 @@ void G4HepRepFileSceneHandler::AddThis(const G4Tubs& tubs) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName());
|
||||
G4VSceneHandler::AddThis(tubs); // Invoke default action.
|
||||
}
|
||||
|
||||
@@ -133,7 +157,6 @@ void G4HepRepFileSceneHandler::AddThis(const G4Trd& trd) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName());
|
||||
G4VSceneHandler::AddThis(trd); // Invoke default action.
|
||||
}
|
||||
|
||||
@@ -145,7 +168,6 @@ void G4HepRepFileSceneHandler::AddThis(const G4Trap& trap) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName());
|
||||
G4VSceneHandler::AddThis(trap); // Invoke default action.
|
||||
}
|
||||
|
||||
@@ -157,7 +179,6 @@ void G4HepRepFileSceneHandler::AddThis(const G4Sphere& sphere) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName());
|
||||
G4VSceneHandler::AddThis(sphere); // Invoke default action.
|
||||
}
|
||||
|
||||
@@ -169,7 +190,6 @@ void G4HepRepFileSceneHandler::AddThis(const G4Para& para) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName());
|
||||
G4VSceneHandler::AddThis(para); // Invoke default action.
|
||||
}
|
||||
|
||||
@@ -181,7 +201,6 @@ void G4HepRepFileSceneHandler::AddThis(const G4Torus& torus) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName());
|
||||
G4VSceneHandler::AddThis(torus); // Invoke default action.
|
||||
}
|
||||
|
||||
@@ -193,7 +212,6 @@ void G4HepRepFileSceneHandler::AddThis(const G4Polycone& polycone) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName());
|
||||
G4VSceneHandler::AddThis(polycone); // Invoke default action.
|
||||
}
|
||||
|
||||
@@ -205,7 +223,6 @@ void G4HepRepFileSceneHandler::AddThis(const G4Polyhedra& polyhedra) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName());
|
||||
G4VSceneHandler::AddThis(polyhedra); // Invoke default action.
|
||||
}
|
||||
|
||||
@@ -217,7 +234,6 @@ void G4HepRepFileSceneHandler::AddThis(const G4VSolid& solid) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName());
|
||||
G4VSceneHandler::AddThis(solid); // Invoke default action.
|
||||
}
|
||||
|
||||
@@ -231,11 +247,7 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4Polyline& polyline) {
|
||||
PrintThings();
|
||||
#endif
|
||||
|
||||
hepRepXMLWriter->addInstance();
|
||||
hepRepXMLWriter->addAttValue("DrawAs","Line");
|
||||
|
||||
G4Colour color = GetColour(polyline);
|
||||
hepRepXMLWriter->addAttValue("LineColor", color.GetRed(), color.GetGreen(), color.GetBlue());
|
||||
AddHepRepInstance("Line",polyline);
|
||||
|
||||
hepRepXMLWriter->addPrimitive();
|
||||
|
||||
@@ -254,15 +266,10 @@ void G4HepRepFileSceneHandler::AddPrimitive (const G4Polymarker& line) {
|
||||
PrintThings();
|
||||
#endif
|
||||
|
||||
hepRepXMLWriter->addInstance();
|
||||
hepRepXMLWriter->addAttValue("DrawAs","Point");
|
||||
AddHepRepInstance("Point",line);
|
||||
|
||||
// FIXME: should be taken from G4
|
||||
hepRepXMLWriter->addAttValue("MarkName", "Square");
|
||||
hepRepXMLWriter->addAttValue("MarkSize", 5);
|
||||
|
||||
G4Colour color = GetColour(line);
|
||||
hepRepXMLWriter->addAttValue("LineColor", color.GetRed(), color.GetGreen(), color.GetBlue());
|
||||
hepRepXMLWriter->addAttValue("MarkName", "Dot");
|
||||
hepRepXMLWriter->addAttValue("MarkSize", 4);
|
||||
|
||||
hepRepXMLWriter->addPrimitive();
|
||||
|
||||
@@ -292,18 +299,13 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4Circle& circle) {
|
||||
PrintThings();
|
||||
#endif
|
||||
|
||||
hepRepXMLWriter->addInstance();
|
||||
hepRepXMLWriter->addAttValue("DrawAs","Point");
|
||||
AddHepRepInstance("Point",circle);
|
||||
|
||||
hepRepXMLWriter->addAttValue("MarkName", "Dot");
|
||||
|
||||
G4Colour color = GetColour(circle);
|
||||
hepRepXMLWriter->addAttValue("LineColor", color.GetRed(), color.GetGreen(), color.GetBlue());
|
||||
|
||||
hepRepXMLWriter->addAttValue("MarkSize", 4);
|
||||
|
||||
hepRepXMLWriter->addPrimitive();
|
||||
|
||||
G4double radius = circle.GetWorldSize();
|
||||
hepRepXMLWriter->addAttValue("MarkSize", radius);
|
||||
|
||||
G4Point3D center = (*fpObjectTransformation) * circle.GetPosition();
|
||||
hepRepXMLWriter->addPoint(center.x(), center.y(), center.z());
|
||||
}
|
||||
@@ -317,18 +319,13 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4Square& square) {
|
||||
PrintThings();
|
||||
#endif
|
||||
|
||||
hepRepXMLWriter->addInstance();
|
||||
hepRepXMLWriter->addAttValue("DrawAs","Point");
|
||||
hepRepXMLWriter->addAttValue("MarkName", "Square");
|
||||
AddHepRepInstance("Point",square);
|
||||
|
||||
G4Colour color = GetColour(square);
|
||||
hepRepXMLWriter->addAttValue("LineColor", color.GetRed(), color.GetGreen(), color.GetBlue());
|
||||
hepRepXMLWriter->addAttValue("MarkName", "Square");
|
||||
hepRepXMLWriter->addAttValue("MarkSize", 4);
|
||||
|
||||
hepRepXMLWriter->addPrimitive();
|
||||
|
||||
G4double size = square.GetWorldSize();
|
||||
hepRepXMLWriter->addAttValue("MarkSize", size);
|
||||
|
||||
G4Point3D center = (*fpObjectTransformation) * square.GetPosition();
|
||||
hepRepXMLWriter->addPoint(center.x(), center.y(), center.z());
|
||||
}
|
||||
@@ -340,26 +337,14 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4Polyhedron& polyhedron) {
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
|
||||
AddHepRepInstance("Polygon",polyhedron);
|
||||
|
||||
if(polyhedron.GetNoFacets()==0)return;
|
||||
|
||||
G4Normal3D surfaceNormal;
|
||||
G4Point3D vertex;
|
||||
|
||||
hepRepXMLWriter->addInstance();
|
||||
hepRepXMLWriter->addAttValue("DrawAs","Polygon");
|
||||
|
||||
G4Colour color = GetColour(polyhedron);
|
||||
hepRepXMLWriter->addAttValue("LineColor", color.GetRed(), color.GetGreen(), color.GetBlue());
|
||||
|
||||
// Additional attributes.
|
||||
hepRepXMLWriter->addAttValue("LVol", fpCurrentLV->GetName());
|
||||
hepRepXMLWriter->addAttValue("Solid", fpCurrentLV->GetSolid()->GetName());
|
||||
hepRepXMLWriter->addAttValue("EType", fpCurrentLV->GetSolid()->GetEntityType());
|
||||
hepRepXMLWriter->addAttValue("Material", fpCurrentLV->GetMaterial()->GetName());
|
||||
hepRepXMLWriter->addAttValue("Density", fpCurrentLV->GetMaterial()->GetDensity());
|
||||
hepRepXMLWriter->addAttValue("State", fpCurrentLV->GetMaterial()->GetState());
|
||||
hepRepXMLWriter->addAttValue("Radlen", fpCurrentLV->GetMaterial()->GetRadlen());
|
||||
|
||||
G4bool notLastFace;
|
||||
do {
|
||||
hepRepXMLWriter->addPrimitive();
|
||||
@@ -385,13 +370,112 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4NURBS& nurbs) {
|
||||
G4cout << "G4HepRepFileSceneHandler::AddPrimitive G4NURBS : not implemented. " << G4endl;
|
||||
}
|
||||
|
||||
void G4HepRepFileSceneHandler::EstablishSpecials
|
||||
(G4PhysicalVolumeModel& pvModel) {
|
||||
pvModel.DefinePointersToWorkingSpace(&fCurrentDepth,
|
||||
&fpCurrentPV,
|
||||
&fpCurrentLV);
|
||||
}
|
||||
|
||||
HepRepXMLWriter *G4HepRepFileSceneHandler::GetHepRepXMLWriter() {
|
||||
return hepRepXMLWriter;
|
||||
}
|
||||
|
||||
void G4HepRepFileSceneHandler::AddHepRepInstance(const char* primName,
|
||||
const G4Visible visible) {
|
||||
#ifdef G4HEPREPFILEDEBUG
|
||||
G4cout <<
|
||||
"G4HepRepFileSceneHandler::AddHepRepInstance called."
|
||||
<< G4endl;
|
||||
#endif
|
||||
|
||||
if (!hepRepXMLWriter->isOpen) {
|
||||
char* newFileSpec;
|
||||
newFileSpec = new char [100];
|
||||
int length;
|
||||
length = sprintf (newFileSpec, "%s%d%s","G4Data",fileCounter,".heprep");
|
||||
hepRepXMLWriter->open(newFileSpec);
|
||||
fileCounter++;
|
||||
|
||||
hepRepXMLWriter->addAttDef("LVol", "Logical Volume", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("Solid", "Solid Name", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("EType", "Entity Type", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("Material", "Material Name", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("Density", "Material Density", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("State", "Material State", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("Radlen", "Material Radiation Length", "Physics","");
|
||||
}
|
||||
|
||||
// Handle Type declaration for Event Data.
|
||||
// Should be able to just test on fReadyForTransients, but this seems to
|
||||
// be falsely false if no geometry has yet been drawn.
|
||||
// So I test on both !fpCurrentPV (means no geometry has yet been drawn)
|
||||
// and fReadyForTransients.
|
||||
if (!fpCurrentPV || fReadyForTransients) {
|
||||
if (strcmp("Event Data",hepRepXMLWriter->prevTypeName[0])!=0) {
|
||||
hepRepXMLWriter->addType("Event Data",0);
|
||||
hepRepXMLWriter->addInstance();
|
||||
}
|
||||
|
||||
if (strcmp("Line",primName)==0)
|
||||
hepRepXMLWriter->addType("Trajectories",1);
|
||||
else {
|
||||
if (strcmp(hepRepXMLWriter->prevTypeName[1],"Trajectories")==0)
|
||||
hepRepXMLWriter->addType("Trajectory Points",2);
|
||||
else
|
||||
hepRepXMLWriter->addType("Trajectory Points",1);
|
||||
}
|
||||
|
||||
hepRepXMLWriter->addInstance();
|
||||
|
||||
// Handle Type declaration for Detector Geometry,
|
||||
// replacing G4's top geometry level name "worldPhysical" with the
|
||||
// name "Detector Geometry".
|
||||
} else {
|
||||
if (strcmp("Detector Geometry",hepRepXMLWriter->prevTypeName[0])!=0) {
|
||||
hepRepXMLWriter->addType("Detector Geometry",0);
|
||||
hepRepXMLWriter->addInstance();
|
||||
}
|
||||
|
||||
// Re-insert any layers of the hierarchy that were removed by G4's culling process.
|
||||
while (hepRepXMLWriter->typeDepth < (fCurrentDepth-1)) {
|
||||
hepRepXMLWriter->addType("G4 Culled Layer", hepRepXMLWriter->typeDepth + 1);
|
||||
hepRepXMLWriter->addInstance();
|
||||
}
|
||||
|
||||
if (fCurrentDepth!=0) {
|
||||
// Add the HepRepType for the current volume.
|
||||
hepRepXMLWriter->addType(fpCurrentPV->GetName(),fCurrentDepth);
|
||||
hepRepXMLWriter->addInstance();
|
||||
}
|
||||
|
||||
// Additional attributes.
|
||||
hepRepXMLWriter->addAttValue("LVol", fpCurrentLV->GetName());
|
||||
hepRepXMLWriter->addAttValue("Solid", fpCurrentLV->GetSolid()->GetName());
|
||||
hepRepXMLWriter->addAttValue("EType", fpCurrentLV->GetSolid()->GetEntityType());
|
||||
hepRepXMLWriter->addAttValue("Material", fpCurrentLV->GetMaterial()->GetName());
|
||||
hepRepXMLWriter->addAttValue("Density", fpCurrentLV->GetMaterial()->GetDensity());
|
||||
hepRepXMLWriter->addAttValue("State", fpCurrentLV->GetMaterial()->GetState());
|
||||
hepRepXMLWriter->addAttValue("Radlen", fpCurrentLV->GetMaterial()->GetRadlen());
|
||||
}
|
||||
|
||||
hepRepXMLWriter->addAttValue("DrawAs",primName);
|
||||
hepRepXMLWriter->addAttValue("Layer",hepRepXMLWriter->typeDepth);
|
||||
|
||||
// Handle color attribute, avoiding drawing anything black on black.
|
||||
G4Colour colour = GetColour(visible);
|
||||
float redness = colour.GetRed();
|
||||
float greenness = colour.GetGreen();
|
||||
float blueness = colour.GetBlue();
|
||||
|
||||
if (redness==0. && greenness==0. && blueness==0.) {
|
||||
redness = 1.;
|
||||
greenness = 1.;
|
||||
blueness = 1.;
|
||||
}
|
||||
|
||||
if (strcmp(primName,"Point")==0)
|
||||
hepRepXMLWriter->addAttValue("MarkColor",redness,greenness,blueness);
|
||||
else
|
||||
hepRepXMLWriter->addAttValue("LineColor",redness,greenness,blueness);
|
||||
|
||||
// Handle visibility attribute.
|
||||
const G4VisAttributes* visAtts = visible.GetVisAttributes();
|
||||
if (visAtts && (visAtts->IsVisible()==0))
|
||||
hepRepXMLWriter->addAttValue("Visibility",false);
|
||||
else
|
||||
hepRepXMLWriter->addAttValue("Visibility",true);
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFileViewer.cc,v 1.3 2001/11/19 15:07:28 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4HepRepFileViewer.cc,v 1.6 2002/02/02 04:00:27 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
|
||||
#include "G4HepRepFileViewer.hh"
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
G4HepRepFileViewer::G4HepRepFileViewer
|
||||
(G4VSceneHandler& sceneHandler, const G4String& name):
|
||||
G4VViewer(sceneHandler, sceneHandler.IncrementViewCount(), name) {
|
||||
|
||||
hepRepXMLWriter = ((G4HepRepFileSceneHandler*)(&sceneHandler))->GetHepRepXMLWriter();
|
||||
}
|
||||
|
||||
@@ -47,16 +46,8 @@ G4HepRepFileViewer::~G4HepRepFileViewer() {}
|
||||
|
||||
void G4HepRepFileViewer::SetView() {
|
||||
#ifdef G4HEPREPFILEDEBUG
|
||||
G4cout << "G4HepRepFileViewer::SetView() called." << G4endl;
|
||||
G4cout << "G4HepRepFileViewer::SetView() called.=" << G4endl;
|
||||
#endif
|
||||
hepRepXMLWriter->open("G4HepRepFile.xml");
|
||||
hepRepXMLWriter->addAttDef("LVol", "Logical Volume", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("Solid", "Solid Name", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("EType", "Entity Type", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("Material", "Material Name", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("Density", "Material Density", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("State", "Material State", "Physics","");
|
||||
hepRepXMLWriter->addAttDef("Radlen", "Material Radiation Length", "Physics","");
|
||||
}
|
||||
|
||||
void G4HepRepFileViewer::ClearView() {
|
||||
@@ -75,12 +66,9 @@ void G4HepRepFileViewer::DrawView() {
|
||||
|
||||
void G4HepRepFileViewer::ShowView () {
|
||||
#ifdef G4HEPREPFILEDEBUG
|
||||
G4cout << "G4HepRepFileViewer::ShowView" << G4endl;
|
||||
G4cout << "G4HepRepFileViewer::ShowView" << G4endl;
|
||||
#endif
|
||||
G4VViewer::ShowView();
|
||||
|
||||
hepRepXMLWriter->close();
|
||||
G4VViewer::ShowView();
|
||||
|
||||
hepRepXMLWriter->close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
// File and Version Information:
|
||||
// $Id: HepRepXMLWriter.cc,v 1.3 2001/12/13 12:04:26 gunter Exp $
|
||||
// $Id: HepRepXMLWriter.cc,v 1.8 2002/02/05 19:52:01 perl Exp $
|
||||
//
|
||||
// Description:
|
||||
// Create a HepRep XML File (HepRep version 1).
|
||||
@@ -43,16 +43,69 @@
|
||||
|
||||
HepRepXMLWriter::HepRepXMLWriter()
|
||||
{
|
||||
isOpen = false;
|
||||
init();
|
||||
}
|
||||
|
||||
void HepRepXMLWriter::addType(const char* name)
|
||||
void HepRepXMLWriter::init()
|
||||
{
|
||||
typeDepth = -1;
|
||||
|
||||
int i = -1;
|
||||
while (i++<49) {
|
||||
prevTypeName[i] = new char[1];
|
||||
strcpy(prevTypeName[i],"");
|
||||
|
||||
inType[i] = false;
|
||||
inInstance[i] = false;
|
||||
}
|
||||
|
||||
inPrimitive = false;
|
||||
inPoint = false;
|
||||
}
|
||||
|
||||
void HepRepXMLWriter::addType(const char* name,int newTypeDepth)
|
||||
{
|
||||
if (fout.good())
|
||||
{
|
||||
endType();
|
||||
fout << " <heprep:type version=\"null\" name=\"" << name << "\">"
|
||||
// Flatten structure if it exceeds maximum allowed typeDepth of 49.
|
||||
if (newTypeDepth > 49)
|
||||
newTypeDepth = 49;
|
||||
|
||||
if (newTypeDepth < 0)
|
||||
newTypeDepth = 0;
|
||||
|
||||
// Insert any layers that are missing from the hierarchy (protects against
|
||||
// callers that skip from, say, layer 1 to layer 3 with no layer 2).
|
||||
while (typeDepth < (newTypeDepth-1)) {
|
||||
addType("Layer Inserted by HepRepXMLWriter", typeDepth + 1);
|
||||
addInstance();
|
||||
}
|
||||
|
||||
// If moving closer to the root, close previously open types.
|
||||
while (newTypeDepth<typeDepth)
|
||||
endType();
|
||||
|
||||
// Close any remaining primitives of the current instance.
|
||||
endPrimitive();
|
||||
|
||||
// If this is a new type name for the current depth, declare the
|
||||
// new Type. Otherwise, it is just another Instance of the current Type.
|
||||
if (strcmp(name,prevTypeName[newTypeDepth])!=0)
|
||||
{
|
||||
if (inType[newTypeDepth])
|
||||
endType();
|
||||
|
||||
prevTypeName[newTypeDepth] = new char[strlen(name)+1];
|
||||
strcpy(prevTypeName[newTypeDepth],name);
|
||||
|
||||
inType[newTypeDepth] = true;
|
||||
indent();
|
||||
fout << "<heprep:type version=\"null\" name=\"" << name << "\">"
|
||||
<< G4endl;
|
||||
inType = true;
|
||||
|
||||
typeDepth = newTypeDepth;
|
||||
}
|
||||
} else {
|
||||
G4cout << "HepRepXMLWriter:addType No file is currently open." << G4endl;
|
||||
}
|
||||
@@ -62,13 +115,15 @@ void HepRepXMLWriter::addInstance()
|
||||
{
|
||||
if (fout.good())
|
||||
{
|
||||
if (inType)
|
||||
if (inType[typeDepth])
|
||||
{
|
||||
endInstance();
|
||||
fout << " <heprep:instance>" << G4endl;
|
||||
inInstance = true;
|
||||
inInstance[typeDepth] = true;
|
||||
indent();
|
||||
fout << "<heprep:instance>" << G4endl;
|
||||
} else {
|
||||
G4cout << "HepRepXMLWriter:addInstance No HepRep Type is currently open"
|
||||
G4cout <<
|
||||
"HepRepXMLWriter:addInstance No HepRep Type is currently open"
|
||||
<< G4endl;
|
||||
}
|
||||
} else {
|
||||
@@ -81,11 +136,12 @@ void HepRepXMLWriter::addPrimitive()
|
||||
{
|
||||
if (fout.good())
|
||||
{
|
||||
if (inInstance)
|
||||
if (inInstance[typeDepth])
|
||||
{
|
||||
endPrimitive();
|
||||
fout << " <heprep:primitive>" << G4endl;
|
||||
inPrimitive = true;
|
||||
indent();
|
||||
fout << "<heprep:primitive>" << G4endl;
|
||||
} else {
|
||||
G4cout <<
|
||||
"HepRepXMLWriter:addPrimitive No HepRep Instance is currently open"
|
||||
@@ -104,8 +160,9 @@ void HepRepXMLWriter::addPoint(double x, double y, double z)
|
||||
if (inPrimitive)
|
||||
{
|
||||
endPoint();
|
||||
fout << " <heprep:point x=\"" << x << "\" y=\"" << y << "\" z=\"" << z << "\">" << G4endl;
|
||||
inPoint = true;
|
||||
indent();
|
||||
fout << "<heprep:point x=\"" << x << "\" y=\"" << y << "\" z=\"" << z << "\">" << G4endl;
|
||||
} else {
|
||||
G4cout <<
|
||||
"HepRepXMLWriter:addPoint No HepRep Primitive is currently open"
|
||||
@@ -124,9 +181,9 @@ void HepRepXMLWriter::addAttDef(const char* name,
|
||||
if (fout.good())
|
||||
{
|
||||
indent();
|
||||
fout << " <heprep:attdef extra=\"" << extra << "\" name=\"" << name << "\" type=\"" << type << "\"" << G4endl;
|
||||
fout << "<heprep:attdef extra=\"" << extra << "\" name=\"" << name << "\" type=\"" << type << "\"" << G4endl;
|
||||
indent();
|
||||
fout << " desc=\"" << desc << "\"/>" << G4endl;
|
||||
fout << " desc=\"" << desc << "\"/>" << G4endl;
|
||||
} else {
|
||||
G4cout << "HepRepXMLWriter:addAttDef No file is currently open" << G4endl;
|
||||
}
|
||||
@@ -183,7 +240,10 @@ void HepRepXMLWriter::addAttValue (const char* name,
|
||||
indent();
|
||||
fout << " <heprep:attvalue showLabel=\"NONE\" name=\"" << name << "\"" << G4endl;
|
||||
indent();
|
||||
fout << " value=\"" << value << "\"/>" << G4endl;
|
||||
if (value)
|
||||
fout << " value=\"True\"/>" << G4endl;
|
||||
else
|
||||
fout << " value=\"False\"/>" << G4endl;
|
||||
} else {
|
||||
G4cout << "HepRepXMLWriter:addAttValue No file is currently open" << G4endl;
|
||||
}
|
||||
@@ -196,10 +256,10 @@ void HepRepXMLWriter::addAttValue (const char* name,
|
||||
{
|
||||
if (fout.good())
|
||||
{
|
||||
indent();
|
||||
int redness = int(value1*255.);
|
||||
int greenness = int(value2*255.);
|
||||
int blueness = int(value3*255.);
|
||||
indent();
|
||||
fout << " <heprep:attvalue showLabel=\"NONE\" name=\"" << name << "\"" << G4endl;
|
||||
indent();
|
||||
fout << " value=\"" << redness << "," << greenness << "," << blueness << "\"/>" << G4endl;
|
||||
@@ -208,57 +268,66 @@ void HepRepXMLWriter::addAttValue (const char* name,
|
||||
}
|
||||
}
|
||||
|
||||
void HepRepXMLWriter::open(const char* filespec)
|
||||
void HepRepXMLWriter::open(const char* fileSpec)
|
||||
{
|
||||
if (fout.good())
|
||||
fout.close();
|
||||
|
||||
fout.open(filespec);
|
||||
|
||||
if (fout.good())
|
||||
{
|
||||
if (isOpen)
|
||||
close();
|
||||
|
||||
fout.open(fileSpec);
|
||||
|
||||
if (fout.good()) {
|
||||
fout << "<?xml version=\"1.0\" ?>" << G4endl;
|
||||
fout << "<heprep:heprep xmlns:heprep=\"http://www.freehep.org/HepRep\"" << G4endl;
|
||||
fout << " xmlns:xsi=\"http://www.w3.org/1999/XMLSchema-instance\" xsi:schemaLocation=\"HepRep.xsd\">" << G4endl;
|
||||
|
||||
inType = false;
|
||||
inInstance = false;
|
||||
inPrimitive = false;
|
||||
inPoint = false;
|
||||
|
||||
isOpen = true;
|
||||
init();
|
||||
} else {
|
||||
G4cout << "HepRepXMLWriter:open Unable to write to file " << filespec << G4endl;
|
||||
G4cout << "HepRepXMLWriter:open Unable to write to file " << fileSpec << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void HepRepXMLWriter::close()
|
||||
{
|
||||
if (fout.good())
|
||||
{
|
||||
endType();
|
||||
// Close any remaining open Types
|
||||
endTypes();
|
||||
|
||||
if (fout.good()) {
|
||||
fout << "</heprep:heprep>" << G4endl;
|
||||
fout.close( );
|
||||
isOpen = false;
|
||||
} else {
|
||||
G4cout << "HepRepXMLWriter:close No file is currently open" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
void HepRepXMLWriter::endTypes()
|
||||
{
|
||||
// Close any remaining open Types
|
||||
while(typeDepth>-1)
|
||||
endType();
|
||||
}
|
||||
|
||||
void HepRepXMLWriter::endType()
|
||||
{
|
||||
if (inType)
|
||||
{
|
||||
endInstance();
|
||||
fout << " </heprep:type>" << G4endl;
|
||||
inType = false;
|
||||
}
|
||||
endInstance();
|
||||
indent();
|
||||
fout << "</heprep:type>" << G4endl;
|
||||
inType[typeDepth] = false;
|
||||
delete [] prevTypeName[typeDepth];
|
||||
prevTypeName[typeDepth] = new char[1];
|
||||
strcpy(prevTypeName[typeDepth],"");
|
||||
typeDepth--;
|
||||
}
|
||||
|
||||
void HepRepXMLWriter::endInstance()
|
||||
{
|
||||
if (inInstance)
|
||||
if (inInstance[typeDepth])
|
||||
{
|
||||
endPrimitive();
|
||||
fout << " </heprep:instance>" << G4endl;
|
||||
inInstance = false;
|
||||
indent();
|
||||
fout << "</heprep:instance>" << G4endl;
|
||||
inInstance[typeDepth] = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +336,8 @@ void HepRepXMLWriter::endPrimitive()
|
||||
if (inPrimitive)
|
||||
{
|
||||
endPoint();
|
||||
fout << " </heprep:primitive>" << G4endl;
|
||||
indent();
|
||||
fout << "</heprep:primitive>" << G4endl;
|
||||
inPrimitive = false;
|
||||
}
|
||||
}
|
||||
@@ -276,7 +346,8 @@ void HepRepXMLWriter::endPoint()
|
||||
{
|
||||
if (inPoint)
|
||||
{
|
||||
fout << " </heprep:point>" << G4endl;
|
||||
indent();
|
||||
fout << "</heprep:point>" << G4endl;
|
||||
inPoint = false;
|
||||
}
|
||||
}
|
||||
@@ -285,10 +356,14 @@ void HepRepXMLWriter::indent()
|
||||
{
|
||||
if (fout.good())
|
||||
{
|
||||
if (inType)
|
||||
fout << " ";
|
||||
if (inInstance)
|
||||
int i = 0;
|
||||
while (inType[i] && i<12) {
|
||||
fout << " ";
|
||||
if (inInstance[i])
|
||||
fout << " ";
|
||||
i++;
|
||||
}
|
||||
|
||||
if (inPrimitive)
|
||||
fout << " ";
|
||||
if (inPoint)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.172 2001/12/01 21:07:26 stanaka Exp $
|
||||
$Id: History,v 1.193 2002/06/24 07:34:15 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -24,7 +24,84 @@ committal in the CVS repository !
|
||||
History file for visualization category
|
||||
---------------------------------------
|
||||
|
||||
01th December 2001 vis-V03-02-21
|
||||
24th June 2002 Gabriele Cosmo (vis-V04-00-10)
|
||||
- Exclude latest changes to OpenGL driver (opengl-V04-00-03), causing compilation
|
||||
errors on some platforms (DEC-cxx).
|
||||
|
||||
23th June 2002 Satshi Tanaka (vis-V04-00-09)
|
||||
- Bug fixes in G4VRMLXFileSceneHandlerFunc.icc
|
||||
- Protection of VRML-Newtork drivers for Windows platform.
|
||||
(The compilation is skipped in the Windows platform.)
|
||||
|
||||
19th June 2002 John Allison (vis-V04-00-08)
|
||||
- Cosmetic changes in G4VRML2FileSceneHandler.cc and G4VRML2SceneHandler.cc
|
||||
(Gabriele)
|
||||
|
||||
10th June 2002 John Allison
|
||||
- Cosmetic changes for SUN-CC in G4OpenGLXmConvenienceRoutines.cc
|
||||
(opengl-V04-00-03).
|
||||
- Improvement to /vis/scene/add/logicalVolume guidance.
|
||||
|
||||
6th June 2002 John Allison
|
||||
- Cosmetic changes for GNU compiler in G4OpenGLXViewer.cc (opengl-V04-00-02).
|
||||
|
||||
8th May 2002 John Allison (vis-V04-00-07)
|
||||
- Minor changes to warning messages and README.built_in_commands.
|
||||
- Added test fro G4EllipticalTube to test/src/MyDetectorConstruction.cc.
|
||||
|
||||
1st May 2002 John Allison (vis-V04-00-06)
|
||||
- Deprecated /vis/viewer/set/autoRefresh.
|
||||
|
||||
26th April 2002 Makoto Asai (vis-V04-00-05)
|
||||
- Corresponds to the changes in intercoms-V04-00-00
|
||||
- Affected files :
|
||||
G4VisManager.cc G4VisCommandsViewer.cc G4VisCommandsCompound.cc
|
||||
|
||||
22nd April 2002 John Allison (vis-V04-00-04)
|
||||
- Prevent copying of autoRefresh status with /vis/viewer/set/all command.
|
||||
- Corrected out of date advice about /vis/set/culling, etc.
|
||||
- Workaround for pseudo-parallel/orthogonal projection in Ray Tracer.
|
||||
|
||||
28th February 2002 John Allison (vis-V04-00-03)
|
||||
- Updated OpenGL to compile (but not run) on Windows (opengl-V04-00-01).
|
||||
- Removed redundant code in GNUmakefiles in OPACS, OpenGL, OpenInventor, VRML.
|
||||
- Improved README.adding_graphics_system.
|
||||
|
||||
23rd February 2002 John Allison (vis-V04-00-02)
|
||||
- Bug fix in modeling, which was causing nested calls to Begin/EndPrimitives.
|
||||
|
||||
4th February 2002 Joseph Perl (vis-V04-00-01)
|
||||
- HepRep: Check for missing hierarchy layers in HepRepXMLWriter.
|
||||
(Not strictly needed since have a culled layer check in SceneHandler,
|
||||
but may be useful in other applications of HepRepXMLWriter).
|
||||
|
||||
3rd February 2002 Joseph Perl
|
||||
- HepRep: Detect transient data by testing for
|
||||
!fpCurrentPV || fReadyForTransients
|
||||
rather than just fReadyForTransients
|
||||
|
||||
1st February 2002 Joseph Perl
|
||||
- Improvements to HepRep:
|
||||
- Defer file opening until first real HepRepType is to be written.
|
||||
- Moved HepRep code from AddThis to AddPrimitive.
|
||||
- Add additional levels to hierarchy if any appear to have been
|
||||
removed by culling.
|
||||
- Add visibility attribute.
|
||||
|
||||
29th January 2002 Joseph Perl
|
||||
- Relocate HepRep file-opening logic to constructor and ShowView
|
||||
(had been in SetView).
|
||||
|
||||
28th January 2002 vis-V03-02-23 Joseph Perl
|
||||
- Improvements to HepRep:
|
||||
- Produce hierarchical output rather than flat HepRepType structure.
|
||||
- Handle trajectories as well as detector geometry.
|
||||
- Output files now named G4Data<n>.heprep where n increments with each open.
|
||||
|
||||
14th January 2002 vis-V03-02-22 Joseph Perl
|
||||
- Corrected handling for already open file in HepRepXMLWriter.
|
||||
|
||||
01th December 2001 vis-V03-02-21 Satoshi Tanaka
|
||||
- Code refinements in FukuiRenderer/ directory:
|
||||
* Noisy warnings for Linux-g++ are suppressed.
|
||||
(%lg ==> %g etc)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.3 2000/04/07 14:52:49 johna Exp $
|
||||
# $Id: GNUmakefile,v 1.4 2002/03/01 00:29:54 johna Exp $
|
||||
|
||||
name := G4OPACS
|
||||
|
||||
@@ -22,14 +22,4 @@ 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\
|
||||
-I$(GOROOT)/include -I$(XOROOT)/include
|
||||
ifeq ($(G4_OPACS_WIDGET_SET),Xm)
|
||||
CPPFLAGS += -DHAS_XM $(X11FLAGS) $(XMFLAGS)
|
||||
else
|
||||
CPPFLAGS += -DHAS_XAW $(X11FLAGS) $(XAWFLAGS)
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GoSceneHandler.hh,v 1.8 2001/08/24 21:49:59 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Wo.hh,v 1.6 2001/07/11 10:08:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4WoViewer.hh,v 1.5 2001/07/11 10:08:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Xo.hh,v 1.6 2001/07/11 10:08:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4XoViewer.hh,v 1.5 2001/07/11 10:08:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GoSceneHandler.cc,v 1.13 2001/11/12 18:22:09 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Wo.cc,v 1.5 2001/07/11 10:08:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4WoViewer.cc,v 1.7 2001/07/11 10:08:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Xo.cc,v 1.6 2001/07/11 10:08:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4XoViewer.cc,v 1.8 2001/07/11 10:08:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Guy Barrand 04 November 1996
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.2 2000/04/07 13:32:41 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.3 2002/03/01 00:29:39 johna Exp $
|
||||
|
||||
name := G4OpenGL
|
||||
|
||||
@@ -22,17 +22,4 @@ CPPFLAGS += -I$(G4BASE)/geometry/volumes/include
|
||||
CPPFLAGS += -I$(G4BASE)/intercoms/include
|
||||
CPPFLAGS += -I$(G4BASE)/interfaces/common/include
|
||||
|
||||
ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
CPPFLAGS += $(OGLFLAGS)
|
||||
endif
|
||||
ifdef G4VIS_BUILD_OPENGLXAW_DRIVER
|
||||
CPPFLAGS += $(XAWFLAGS)
|
||||
endif
|
||||
ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
CPPFLAGS += $(XMFLAGS)
|
||||
endif
|
||||
ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
CPPFLAGS += $(X11FLAGS)
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.15 2001/08/24 20:28:15 johna Exp $
|
||||
$Id: History,v 1.16 2002/02/24 01:47:46 johna Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -20,6 +20,11 @@ committal in the CVS repository !
|
||||
History file for visualization/OpenGL
|
||||
-------------------------------------
|
||||
|
||||
23rd February 2002 John Allison (opengl-V04-00-01)
|
||||
- Changes to encourage compilation on Windows in preparation for
|
||||
implementation of G4OpenGLWin32Viewer. Removed spurious includes of
|
||||
glx.h, unistd.h and assert.h.
|
||||
|
||||
24th August 2001 John Allison (vis-V03-02-13)
|
||||
- Limited the printing of warnings in
|
||||
G4OpenGLSceneHandler::AddPrimitive (const G4Text& text).
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateSceneHandler.hh,v 1.6 2001/08/09 20:16:56 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateViewer.hh,v 1.6 2001/07/11 10:08:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32.hh,v 1.5 2001/07/11 10:08:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateWin32 graphics system factory.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32Viewer.hh,v 1.6 2001/07/14 21:47:41 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateWin32Viewer : a class derived from
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateX.hh,v 1.6 2001/07/11 10:08:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXViewer.hh,v 1.7 2001/07/14 21:47:42 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXm.hh,v 1.6 2001/07/11 10:08:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXmViewer.hh,v 1.7 2001/07/14 21:47:43 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.hh,v 1.10 2001/08/24 21:46:45 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLSceneHandler.hh,v 1.11 2002/02/24 01:47:49 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -40,8 +40,6 @@
|
||||
#include "G4RotationMatrix.hh"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
// Base class for various OpenGLScene classes.
|
||||
class G4OpenGLSceneHandler: public G4VSceneHandler {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.icc,v 1.5 2001/08/09 20:16:06 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 20th January 1998
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.13 2001/08/14 18:03:14 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredViewer.hh,v 1.8 2001/08/14 18:03:15 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32.hh,v 1.5 2001/07/11 10:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredWin32 graphics system factory.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32Viewer.hh,v 1.4 2001/07/14 21:47:45 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredWin32Viewer : a class derived from
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredX.hh,v 1.6 2001/07/11 10:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXViewer.hh,v 1.5 2001/07/14 21:47:46 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXm.hh,v 1.5 2001/07/11 10:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXmViewer.hh,v 1.5 2001/07/14 21:47:47 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLTransform3D.hh,v 1.4 2001/07/11 10:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 24th October 1996
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLViewer.hh,v 1.7 2001/07/11 10:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLViewer.hh,v 1.8 2002/02/24 01:47:51 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -60,8 +60,6 @@ protected:
|
||||
antialiasing_enabled, //is antialiasing enabled?
|
||||
haloing_enabled; //is haloing enabled for wireframe?
|
||||
|
||||
static int snglBuf_RGBA[10];
|
||||
static int dblBuf_RGBA[11];
|
||||
G4OpenGLSceneHandler& fSceneHandler; // Graphics Scene for this view.
|
||||
|
||||
private:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLWin32Viewer.hh,v 1.5 2001/07/11 10:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// G4OpenGLWin32Viewer : Class to provide WindowsNT specific
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXViewer.hh,v 1.12 2001/07/11 10:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLXViewer.hh,v 1.13 2002/02/24 01:47:52 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -63,6 +63,9 @@ protected:
|
||||
void CreateGLXContext (XVisualInfo* vi);
|
||||
virtual void CreateMainWindow ();
|
||||
|
||||
static int snglBuf_RGBA[10];
|
||||
static int dblBuf_RGBA[11];
|
||||
|
||||
char print_string[50];
|
||||
G4bool print_colour,
|
||||
vectored_ps;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmBox.hh,v 1.6 2001/07/11 10:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Box container class
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmFourArrowButtons.hh,v 1.5 2001/07/11 10:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Four arrow buttons class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmFramedBox.hh,v 1.6 2001/07/11 10:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Framed box container class
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmPushButton.hh,v 1.6 2001/07/11 10:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Push button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmRadioButton.hh,v 1.6 2001/07/11 10:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Radio button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmResources.hh,v 1.4 2001/07/11 10:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Default resources file for GEANT4 OpenGL Motif windows.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmSeparator.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Separator class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmSliderBar.hh,v 1.6 2001/07/11 10:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Slider bar class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmTextField.hh,v 1.6 2001/07/11 10:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Text field class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmTopLevelShell.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Top level shell class
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetComponent.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif component widgets
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetContainer.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif container widgets
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetObject.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Virtual base class for all Motif widgets.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetShell.hh,v 1.5 2001/07/11 10:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif window widgets (shells)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmViewer.hh,v 1.6 2001/07/11 10:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateSceneHandler.cc,v 1.6 2001/08/14 18:03:16 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLImmediateSceneHandler.cc,v 1.7 2002/02/24 01:47:55 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -40,8 +40,6 @@
|
||||
// Also seems to be required for HP's CC and AIX xlC, at least.
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "G4OpenGLViewer.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateViewer.cc,v 1.4 2001/07/11 10:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLImmediateViewer.cc,v 1.5 2002/02/24 01:47:56 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -34,14 +34,6 @@
|
||||
|
||||
#include "G4OpenGLImmediateViewer.hh"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
G4OpenGLImmediateViewer::G4OpenGLImmediateViewer (G4OpenGLImmediateSceneHandler& scene):
|
||||
G4VViewer (scene, -1),
|
||||
G4OpenGLViewer (scene),
|
||||
|
||||
@@ -21,18 +21,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32.cc,v 1.6 2001/07/11 10:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLImmediateWin32.cc,v 1.7 2002/02/24 01:47:58 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateWin32 graphics system factory.
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4VisFeaturesOfOpenGL.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32Viewer.cc,v 1.4 2001/07/14 21:47:49 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLImmediateWin32Viewer.cc,v 1.5 2002/02/24 01:48:00 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateWin32Viewer : a class derived from G4OpenGLWin32Viewer and
|
||||
@@ -33,12 +33,8 @@
|
||||
#include "G4OpenGLImmediateWin32Viewer.hh"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
G4OpenGLImmediateWin32Viewer::G4OpenGLImmediateWin32Viewer (G4OpenGLImmediateSceneHandler& scene):
|
||||
G4OpenGLViewer (scene),
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateX.cc,v 1.7 2001/07/11 10:08:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLImmediateX.cc,v 1.8 2002/02/24 01:48:02 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -30,10 +30,6 @@
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4VisFeaturesOfOpenGL.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXViewer.cc,v 1.6 2001/07/14 21:47:50 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLImmediateXViewer.cc,v 1.7 2002/02/24 01:48:04 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -34,15 +34,8 @@
|
||||
#include "G4OpenGLImmediateXViewer.hh"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
G4OpenGLImmediateXViewer::G4OpenGLImmediateXViewer (G4OpenGLImmediateSceneHandler& scene,
|
||||
const G4String& name):
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXm.cc,v 1.7 2001/07/11 10:08:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLImmediateXm.cc,v 1.8 2002/02/24 01:48:05 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -31,8 +31,6 @@
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4VisFeaturesOfOpenGL.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXmViewer.cc,v 1.6 2001/07/14 21:47:51 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLImmediateXmViewer.cc,v 1.7 2002/02/24 01:48:07 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -34,12 +34,8 @@
|
||||
#include "G4OpenGLImmediateXmViewer.hh"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
G4OpenGLImmediateXmViewer::G4OpenGLImmediateXmViewer
|
||||
(G4OpenGLImmediateSceneHandler& scene,
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.cc,v 1.14 2001/08/24 18:37:09 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLSceneHandler.cc,v 1.15 2002/02/24 01:48:09 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -41,7 +41,6 @@
|
||||
// Also seems to be required for HP's CC and AIX xlC, at least.
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredSceneHandler.cc,v 1.13 2001/08/14 18:03:17 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLStoredSceneHandler.cc,v 1.14 2002/02/24 01:48:11 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -39,8 +39,6 @@
|
||||
// Also seems to be required for HP's CC and AIX xlC, at least.
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4OpenGLStoredSceneHandler.hh"
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredViewer.cc,v 1.7 2001/08/14 18:03:19 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLStoredViewer.cc,v 1.8 2002/02/24 01:48:12 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -35,12 +35,8 @@
|
||||
#include "G4OpenGLStoredViewer.hh"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "G4OpenGLStoredSceneHandler.hh"
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32.cc,v 1.6 2001/07/11 10:08:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLStoredWin32.cc,v 1.7 2002/02/24 01:48:14 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredWin32 graphics system factory.
|
||||
@@ -31,8 +31,6 @@
|
||||
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4VisFeaturesOfOpenGL.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32Viewer.cc,v 1.4 2001/07/14 21:47:53 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLStoredWin32Viewer.cc,v 1.5 2002/02/24 01:48:16 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredWin32Viewer : a class derived from G4OpenGLWin32Viewer and
|
||||
@@ -33,12 +33,8 @@
|
||||
#include "G4OpenGLStoredWin32Viewer.hh"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
G4OpenGLStoredWin32Viewer::G4OpenGLStoredWin32Viewer (G4OpenGLStoredSceneHandler& scene):
|
||||
G4OpenGLViewer (scene),
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredX.cc,v 1.7 2001/07/11 10:08:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLStoredX.cc,v 1.8 2002/02/24 01:48:17 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -32,8 +32,6 @@
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4VisFeaturesOfOpenGL.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXViewer.cc,v 1.7 2001/08/14 18:03:20 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLStoredXViewer.cc,v 1.8 2002/02/24 01:48:19 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -34,15 +34,8 @@
|
||||
#include "G4OpenGLStoredXViewer.hh"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
G4OpenGLStoredXViewer::G4OpenGLStoredXViewer (G4OpenGLStoredSceneHandler& scene,
|
||||
const G4String& name):
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXm.cc,v 1.6 2001/07/11 10:08:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLStoredXm.cc,v 1.7 2002/02/24 01:48:20 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -30,10 +30,6 @@
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4VisFeaturesOfOpenGL.hh"
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXmViewer.cc,v 1.6 2001/07/14 21:47:55 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLStoredXmViewer.cc,v 1.7 2002/02/24 01:48:22 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -34,12 +34,8 @@
|
||||
#include "G4OpenGLStoredXmViewer.hh"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
G4OpenGLStoredXmViewer::G4OpenGLStoredXmViewer (G4OpenGLStoredSceneHandler& scene,
|
||||
const G4String& name):
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLTransform3D.cc,v 1.4 2001/07/11 10:08:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 24th October 1996
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLViewer.cc,v 1.12 2001/07/11 10:08:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLViewer.cc,v 1.13 2002/02/24 01:48:24 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -31,15 +31,12 @@
|
||||
#ifdef G4VIS_BUILD_OPENGL_DRIVER
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4OpenGLViewer.hh"
|
||||
#include "G4OpenGLSceneHandler.hh"
|
||||
#include "G4OpenGLTransform3D.hh"
|
||||
#include "G4ios.hh"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "G4Scene.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
@@ -49,20 +46,12 @@
|
||||
#include "G4Normal3D.hh"
|
||||
#include "G4Plane3D.hh"
|
||||
|
||||
int G4OpenGLViewer::snglBuf_RGBA[10] =
|
||||
{ GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1, GLX_DEPTH_SIZE, 1, None };
|
||||
|
||||
int G4OpenGLViewer::dblBuf_RGBA[11] =
|
||||
{ GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 1, None };
|
||||
|
||||
G4OpenGLViewer::G4OpenGLViewer (G4OpenGLSceneHandler& scene):
|
||||
G4VViewer (scene, -1),
|
||||
white_background (False),
|
||||
transparency_enabled (False),
|
||||
antialiasing_enabled (False),
|
||||
haloing_enabled (False),
|
||||
white_background (false),
|
||||
transparency_enabled (false),
|
||||
antialiasing_enabled (false),
|
||||
haloing_enabled (false),
|
||||
fSceneHandler (scene)
|
||||
{
|
||||
// Make changes to view parameters for OpenGL...
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLWin32Viewer.cc,v 1.3 2001/07/11 10:08:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLWin32Viewer.cc,v 1.4 2002/02/24 01:48:26 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// G4OpenGLWin32Viewer : Class to provide WindowsNT specific
|
||||
@@ -33,12 +33,9 @@
|
||||
#include "G4OpenGLWin32Viewer.hh"
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <GL/glu.h>
|
||||
//#include <GL/glx.h> Change this for Win32
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXViewer.cc,v 1.13 2001/11/29 12:14:01 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4OpenGLXViewer.cc,v 1.14 2002/02/24 01:48:27 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
@@ -38,9 +38,6 @@
|
||||
#include <GL/glu.h>
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
@@ -51,8 +48,15 @@
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
int G4OpenGLXViewer::snglBuf_RGBA[10] =
|
||||
{ GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1, GLX_DEPTH_SIZE, 1, None };
|
||||
|
||||
int G4OpenGLXViewer::dblBuf_RGBA[11] =
|
||||
{ GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 1, None };
|
||||
|
||||
#define NewString(str) \
|
||||
((str) != NULL ? (strcpy((char*)malloc((unsigned)strlen(str) + 1), str)) : (char*)NULL)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmBox.cc,v 1.5 2001/07/11 10:08:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//Box container class
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user