Import Geant4 8.0.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenInventor.hh,v 1.7 2004/04/08 09:39:37 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// Guy Barrand 26 Mar 1998.
|
||||
// OpenInventor graphics system factory.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenInventorSceneHandler.hh,v 1.26 2005/06/02 17:43:46 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// J Kallenbach 27th Aug 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenInventorTransform3D.hh,v 1.6 2004/11/22 14:20:19 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// jck 17 Dec 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenInventorWin.hh,v 1.1 2004/04/08 09:37:30 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// OpenInventor graphics system factory.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenInventorWin32.hh,v 1.6 2004/04/08 09:39:38 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// OpenInventor graphics system factory.
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenInventorWinViewer.hh,v 1.7 2004/11/25 13:39:54 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4OpenInventorWinViewer.hh,v 1.8 2005/11/15 08:39:03 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// Jeff Kallenbach 01 Aug 1996
|
||||
@@ -43,6 +43,7 @@ class Geant4_SoWinExaminerViewer;
|
||||
class G4OpenInventorWinViewer: public G4OpenInventorViewer {
|
||||
public: //G4VViewer
|
||||
virtual void FinishView();
|
||||
virtual void SetView();
|
||||
protected:
|
||||
virtual void ViewerRender();
|
||||
virtual SoCamera* GetCamera();
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenInventorX.hh,v 1.6 2004/04/08 09:39:38 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenInventorXt.hh,v 1.1 2004/04/08 09:37:30 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenInventorXtViewer.hh,v 1.12 2004/11/25 13:39:54 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4OpenInventorXtViewer.hh,v 1.13 2005/11/15 08:39:03 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// Jeff Kallenbach 01 Aug 1996
|
||||
@@ -42,6 +42,7 @@ class SoXtExaminerViewer;
|
||||
class G4OpenInventorXtViewer: public G4OpenInventorViewer {
|
||||
public: //G4VViewer
|
||||
virtual void FinishView();
|
||||
virtual void SetView();
|
||||
protected:
|
||||
virtual void ViewerRender();
|
||||
virtual SoCamera* GetCamera();
|
||||
|
||||
@@ -27,20 +27,25 @@
|
||||
#include <Inventor/nodes/SoShape.h>
|
||||
|
||||
#include <Inventor/fields/SoSFBool.h>
|
||||
#include <Inventor/fields/SoSFNode.h>
|
||||
|
||||
class HepPolyhedron;
|
||||
class G4Polyhedron;
|
||||
|
||||
/**
|
||||
* Geant4_SoPolyhedron is an Inventor encapsulation of the HepPolyedron
|
||||
* class written by E.Chernyaev. In particular Geant4_SoPolyhedron permits
|
||||
* SoPolyhedron is an Inventor encapsulation of the G4Polyedron
|
||||
* class written by E.Chernyaev. In particular SoPolyhedron permits
|
||||
* to represent boolean operations over solids.
|
||||
* The solids are modeled with HepPolyedron objects. The HepPolyhedron
|
||||
* permits to produce a new HepPolyhedron according to the boolean
|
||||
* operation done on them. The resulting HepPolyhedron is then given
|
||||
* to an Geant4_SoPolyhedron for rendering.
|
||||
* To avoid clashes with other libraries (Geant4) where the G4Polyhedron
|
||||
* classes may be found, the G4Polyhedron (through usage of CPP macros)
|
||||
* had been renamed G4Polyhedron in the HEPVis lib.
|
||||
* The solids are modeled with G4Polyedron objects. The G4Polyhedron
|
||||
* permits to produce a new G4Polyhedron according to the boolean
|
||||
* operation done on them. The resulting G4Polyhedron is then given
|
||||
* to an SoPolyhedron for rendering.
|
||||
* Note that a boolean operation could be rendered in wire frame
|
||||
* by drawing the contour of the resulting solid (not by drawing
|
||||
* the wire frame of a triangulation).
|
||||
* See the applications/Polyhedron example.
|
||||
*/
|
||||
|
||||
class Geant4_SoPolyhedron : public SoShape {
|
||||
@@ -48,19 +53,23 @@ class Geant4_SoPolyhedron : public SoShape {
|
||||
public:
|
||||
SoSFBool solid;
|
||||
SoSFBool reducedWireFrame;
|
||||
SoSFNode alternateRep;
|
||||
public:
|
||||
Geant4_SoPolyhedron();
|
||||
Geant4_SoPolyhedron(const HepPolyhedron&);
|
||||
Geant4_SoPolyhedron(HepPolyhedron*);
|
||||
Geant4_SoPolyhedron(const G4Polyhedron&);
|
||||
Geant4_SoPolyhedron(G4Polyhedron*);
|
||||
virtual void generateAlternateRep();
|
||||
virtual void clearAlternateRep();
|
||||
public:
|
||||
static void initClass();
|
||||
protected:
|
||||
virtual void computeBBox(SoAction*,SbBox3f&,SbVec3f&);
|
||||
virtual void generatePrimitives(SoAction*);
|
||||
virtual void doAction(SoAction*);
|
||||
protected:
|
||||
virtual ~Geant4_SoPolyhedron();
|
||||
private:
|
||||
HepPolyhedron* fPolyhedron;
|
||||
G4Polyhedron* fPolyhedron;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: SbMath.h,v 1.3 2004/12/07 23:40:59 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#ifndef HEPVis_SbMath_h
|
||||
#define HEPVis_SbMath_h
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef HEPVis_SoAlternateRepAction_h
|
||||
#define HEPVis_SoAlternateRepAction_h
|
||||
|
||||
// Inheritance :
|
||||
#include <Inventor/actions/SoAction.h>
|
||||
|
||||
#include <Inventor/actions/SoSubAction.h>
|
||||
|
||||
#define SoAlternateRepAction Geant4_SoAlternateRepAction
|
||||
|
||||
class SoAlternateRepAction : public SoAction {
|
||||
SO_ACTION_HEADER(SoAlternateRepAction);
|
||||
public:
|
||||
SoAlternateRepAction();
|
||||
virtual ~SoAlternateRepAction();
|
||||
static void initClass(void);
|
||||
void setGenerate(SbBool);
|
||||
SbBool getGenerate() const;
|
||||
private:
|
||||
static void nodeAction(SoAction*,SoNode*);
|
||||
private:
|
||||
SbBool fGenerate;
|
||||
};
|
||||
|
||||
#define SO_ALTERNATEREP_DO_ACTION(aAction) \
|
||||
if(aAction->isOfType(SoAlternateRepAction::getClassTypeId())) {\
|
||||
if(((SoAlternateRepAction*)aAction)->getGenerate()==TRUE) {\
|
||||
if(alternateRep.getValue()==NULL) {\
|
||||
generateAlternateRep();\
|
||||
SoNode* altRep = alternateRep.getValue();\
|
||||
if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
|
||||
altRep->doAction(aAction);\
|
||||
}\
|
||||
} else {\
|
||||
SoNode* altRep = alternateRep.getValue();\
|
||||
if((altRep!=NULL) && altRep->isOfType(SoGroup::getClassTypeId()))\
|
||||
altRep->doAction(aAction);\
|
||||
clearAlternateRep();\
|
||||
}\
|
||||
return;\
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -21,10 +21,10 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: SoDetectorTreeKit.h,v 1.3 2004/11/22 22:57:01 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: SoDetectorTreeKit.h,v 1.4 2005/10/17 07:21:44 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
/*-----------------------------Hepvis----------------------------------------*/
|
||||
/*-----------------------------HEPVis----------------------------------------*/
|
||||
/* */
|
||||
/* Node: SoDetectorTreeKit */
|
||||
/* Description: Easy way of browsing through a tree of detectors */
|
||||
@@ -34,11 +34,10 @@
|
||||
#ifndef HEPVis_SoDetectorTreeKit_h
|
||||
#define HEPVis_SoDetectorTreeKit_h
|
||||
|
||||
// Inheritance :
|
||||
#include <Inventor/nodekits/SoBaseKit.h>
|
||||
#include <Inventor/nodes/SoEventCallback.h>
|
||||
|
||||
class SoSFNode;
|
||||
class SoHandleEventAction;
|
||||
class SoEventCallback;
|
||||
class SoSeparator;
|
||||
|
||||
#define SoDetectorTreeKit Geant4_SoDetectorTreeKit
|
||||
@@ -49,7 +48,9 @@ class SoDetectorTreeKit:public SoBaseKit {
|
||||
// The following is required:
|
||||
SO_KIT_HEADER(SoDetectorTreeKit);
|
||||
////////////////////////////////////////////
|
||||
SoSFNode alternateRep;
|
||||
public:
|
||||
SoSFNode alternateRep; //public in order to query if alternateRep done.
|
||||
private:
|
||||
////////////////////////////////////////////
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(callbackList);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(topSeparator);
|
||||
@@ -80,7 +81,7 @@ public:
|
||||
// Return the preview state
|
||||
virtual SbBool getPreview() const;
|
||||
|
||||
// The SoSwitch::whichChild = SO_SWITCH_ALL
|
||||
// Set SoSwitch::whichChild = SO_SWITCH_ALL
|
||||
void setPreviewAndFull();
|
||||
|
||||
// Return the preview Separator
|
||||
@@ -104,6 +105,7 @@ protected:
|
||||
// Destructor.
|
||||
virtual ~SoDetectorTreeKit();
|
||||
|
||||
virtual void doAction(SoAction*);
|
||||
private:
|
||||
|
||||
// This is needed as well
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: SoBox.h,v 1.2 2004/06/14 09:27:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
/*-----------------------------Hepvis----------------------------------------*/
|
||||
/* */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: SoCons.h,v 1.2 2004/06/14 09:27:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
/*-----------------------------Hepvis----------------------------------------*/
|
||||
/* */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: SoTrap.h,v 1.3 2004/11/23 21:51:05 gbarrand Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
/*-----------------------------Hepvis----------------------------------------*/
|
||||
/* */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: SoTrd.h,v 1.2 2004/06/14 09:27:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
/*-----------------------------Hepvis----------------------------------------*/
|
||||
/* */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: SoTubs.h,v 1.2 2004/06/14 09:27:38 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
/*-----------------------------Hepvis----------------------------------------*/
|
||||
/* */
|
||||
|
||||
Reference in New Issue
Block a user