Import Geant4 2.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.3 1999/10/28 09:13:57 japost Exp $
|
||||
# $Id: GNUmakefile,v 1.4 2000/01/21 13:47:35 gcosmo Exp $
|
||||
# ------------------------------------------------------------
|
||||
# GNUmakefile for BREPS library. Gabriele Cosmo, 15/11/96.
|
||||
# ------------------------------------------------------------
|
||||
@@ -13,7 +13,6 @@ include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
CPPFLAGS += \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/geometry/solids/STEP/include \
|
||||
-I$(G4BASE)/geometry/solids/Boolean/include \
|
||||
-I$(G4BASE)/geometry/solids/CSG/include \
|
||||
-I$(G4BASE)/global/management/include \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.7 1999/11/08 09:50:26 gcosmo Exp $
|
||||
$Id: History,v 1.15 2000/05/31 14:44:14 gcosmo Exp $
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,74 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
13/05/2000 : G. Cosmo breps-V01-01-00
|
||||
- Added protection to arguments fed to atan2(x,y) in G4Ellipse::Project().
|
||||
|
||||
11/04/2000 : J. Allison
|
||||
- Removed implementations of G4VisExtent GetExtent() in most sub-classes
|
||||
of G4VSolid (a default implementation exists in G4VSolid).
|
||||
Files changed: G4BREPSolid[.hh.cc].
|
||||
- All implementations of DescribeYourselfTo (G4VGraphicsScene& scene) const
|
||||
now correctly written: scene.AddThis(*this).
|
||||
Files changed: G4BREPSolidOpenPCone.cc.
|
||||
|
||||
25/02/2000 : G. Cosmo breps-V01-00-02
|
||||
G4BSplineSurface[.hh.cc]
|
||||
- fixed dynamic memory allocation problem with creation of temporary
|
||||
hits and manipulation of knots.
|
||||
- rationalized dependencies over G4UVHit, G4ControlPoints and
|
||||
G4BoundingBox3D classes.
|
||||
- added initialization of pointers in constructor where missing.
|
||||
G4BSplineSurfaceWithKnots[.hh.cc]
|
||||
- created dummy classes.
|
||||
G4ConicalSurface.cc
|
||||
- Modified diagnostic message.
|
||||
G4PointRat.hh
|
||||
- Removed useless inclusion of G4UVHit.hh.
|
||||
G4UVHit.hh
|
||||
- Added missing initialization of data-members where needed.
|
||||
- Initialized 'next' pointer to zero in costructor.
|
||||
test/stepfiles
|
||||
- G4msgc_barrel_solid.stp was corrupted. Fixed.
|
||||
- Enhanced PERL script correct.pl to parse more complex STEP files.
|
||||
|
||||
14/02/2000 : G. Cosmo breps-V01-00-01
|
||||
G4BSplineSurface.cc - fixed warnings on HP-aCC
|
||||
- removed cast of G4Surface* to G4SurfaceList* (!) in function
|
||||
FinalIntersection().
|
||||
- replaced wherever needed explicit cast to G4PointRat from G4Point3D
|
||||
and viceversa, by using appropriate access functions instead.
|
||||
G4SurfaceList.cc
|
||||
- initialised 'next' and 'temp' pointers in default constructor.
|
||||
Changed 'char*' to 'const char*' as return-type for methods returning the
|
||||
concrete type name; removed temporary cast to char*. Updated files:
|
||||
- G4ThreeMat.hh, G4Surface.hh, G4SphericalSurface.hh,
|
||||
G4RectangularTrimmedSurface.hh, G4FPlane.hh, G4FCylindricalSurface.hh,
|
||||
G4FConicalSurface.hh, G4CylindricalSurface.hh, G4ConicalSurface.hh,
|
||||
G4Curve.hh, G4BSplineSurface[.hh.cc].
|
||||
|
||||
21/01/2000 : G. Cosmo breps-V01-00-00
|
||||
Decoupling from NIST STEP reader completed:
|
||||
- G4RectangularTrimmedSurface.cc: removed inclusion of
|
||||
SdaiCONFIG_CONTROL_DESIGN.h
|
||||
- G4PointRat[.hh.cc]: removed unused function
|
||||
CopyRationalValue(const RealNode&).
|
||||
- G4Conic[.hh.cc]: removed constructor G4Conic(STEPentity&).
|
||||
- G4BREPSolid[.hh.cc]: removed unused function CreateSTEPData() and
|
||||
any references to STEP/instmgr.h.
|
||||
- G4Parabola.hh: removed declared and NOT defined constructors
|
||||
G4Parabola(STEPentity&) and G4Parabola(STEPentity&, InstMgr&).
|
||||
- G4Hyperbola.hh: removed declared and NOT defined constructors
|
||||
G4Hyperbola(STEPentity&) and G4Hyperbola(STEPentity&, InstMgr&).
|
||||
- G4Ellipse.hh: removed declared and NOT defined constructors
|
||||
G4Ellipse(STEPentity&) and G4Ellipse(STEPentity&, InstMgr&).
|
||||
- G4ControlPoints.hh: removed declared and NOT defined constructor
|
||||
G4ControlPoints(STEaggregate&, const int).
|
||||
Temporary fixes for porting on SUN-CC 5.0 compiler. Casts to char*:
|
||||
- G4ThreeMat.hh, G4Surface.hh, G4SphericalSurface.hh,
|
||||
G4RectangularTrimmedSurface.hh, G4FPlane.hh, G4FCylindricalSurface.hh,
|
||||
G4FConicalSurface.hh, G4CylindricalSurface.hh, G4ConicalSurface.hh.
|
||||
|
||||
08/11/1999 : G. Cosmo breps-V00-01-00
|
||||
First step for decoupling BREPS from NIST STEP reader:
|
||||
- Moved G4NISTStepReader[.hh.cc] and G4StepFileReader[.hh] to
|
||||
|
||||
@@ -1,321 +0,0 @@
|
||||
Juanary 20, 1999
|
||||
Lionel Broglia Patron
|
||||
|
||||
Working note
|
||||
|
||||
This document describes the modifications to be done into
|
||||
BREPS and STEPintervace classes
|
||||
|
||||
|
||||
============================================
|
||||
BREPS
|
||||
|
||||
- implement G4BSplineCurve::IntersectRay2D
|
||||
|
||||
As the same as all the curve classes, IntersectRay2D(ray) is a function which
|
||||
return the number of intersections of the curve by the ray included into the
|
||||
curve's boundaries. (see G4Line::IntersectRay2D for exemple)
|
||||
|
||||
|
||||
- problem with nbintersect when the hitpoint is on the curve boundary
|
||||
|
||||
In this case, the point is considerated into the surface, so return an odd
|
||||
specific value (999). (done for G4Line)
|
||||
|
||||
|
||||
- implement swept surface (later)
|
||||
|
||||
- Be carreful into G4BREPSolidxxx::Inside :
|
||||
if we obtain the same distance with 2 intersections,
|
||||
it is necessary to count one only (done for PCone & PGone)
|
||||
|
||||
- Utilize the DistanceTo and Inside functions of PCone, which are
|
||||
general, in G4BREPSolid.
|
||||
After, utilize specific functions for each particular solid to
|
||||
have a faster algorithm
|
||||
|
||||
|
||||
|
||||
|
||||
============================================
|
||||
STEPinterface
|
||||
|
||||
- take the name of the solids
|
||||
|
||||
- write out STEP (later)
|
||||
|
||||
- Problem with STEP conical surface (same for cylindrical)
|
||||
for the moment the interface create a G4ConicalSurface,
|
||||
but I want to create a G4FConicalSurface
|
||||
|
||||
In STEP, a conical surface is defined by a semi-infinite cone and 1 or 2 plane
|
||||
which delimite the length of the cone. The semi-infinite cone is defined by a
|
||||
G4Axis2Placement3D (location and axis), a radius and an angle. The radius is
|
||||
the radius of the cone at the location. For the moment, a STEP conical surface
|
||||
is saved as a G4ConicalSurface(placement, angle).
|
||||
|
||||
On the contrary a G4FConicalSurface is defined by a placement, a large_radius,
|
||||
a small_radius and a length :
|
||||
|
||||
// Position.axis|
|
||||
// |
|
||||
// -- ---|--- small_radius
|
||||
// l | / | \
|
||||
// e | / | \
|
||||
// n | / | \
|
||||
// g | / | \
|
||||
// t | / | \
|
||||
// h | / | \
|
||||
// -- ---------|--------- large_radius
|
||||
// Position
|
||||
|
||||
|
||||
In the same way, In STEP, a cylindrical surface is defined by an infinite
|
||||
cylinder and 1 or 2 plane which delimite the length of the cylinder. The
|
||||
semi-infinite cylinder is defined by a G4Axis2Placement3D (location and axis)
|
||||
and a radius. For the moment, a STEP cylindrical surface is saved as a
|
||||
G4CylindricalSurface(placement, radius).
|
||||
|
||||
On the contrary a G4FCylindricalSurface is defined by a placement, a radius and
|
||||
a length :
|
||||
|
||||
// Position.axis| radius
|
||||
// >|---|<---------
|
||||
// |
|
||||
// -- +---|---+
|
||||
// l | | | |
|
||||
// e | | | |
|
||||
// n | | | |
|
||||
// g | | | |
|
||||
// t | | | |
|
||||
// h | | | |
|
||||
// -- +---|---+
|
||||
// Position
|
||||
|
||||
It is necessary to find a way to save a STEP conical or cylindrical surface in
|
||||
a G4FConicalSurface or G4FCylindricalSurface because the algorithms of Inside
|
||||
and DistanceToX are written and run correctly for PCone and PGone which utilize
|
||||
these surfaces.
|
||||
|
||||
One solution is to create with the STEP interface the G4FConicalSurface
|
||||
or the G4FCylindricalSurface with new creators. And before execute the
|
||||
Intersect or the HowNear function, recalculate the good values.
|
||||
|
||||
|
||||
|
||||
==> Tests
|
||||
|
||||
- verify the validity of the results of the simple tests
|
||||
- new simple specific test for curve and surface
|
||||
- compare with CSG test
|
||||
- new more general test
|
||||
|
||||
|
||||
======================================
|
||||
Function explanation
|
||||
|
||||
Inside(Pt)
|
||||
|
||||
// This function returns whether the point is inside,
|
||||
// outside or on the surface of the solid
|
||||
|
||||
|
||||
DistanceToIn(Pt)
|
||||
|
||||
// Calculates the shortest distance ("safety") from a point
|
||||
// outside the solid to any boundary of this solid.
|
||||
// Return 0 if the point is already inside.
|
||||
|
||||
|
||||
DistanceToIn(Pt, Vec)
|
||||
|
||||
// Calculates the distance from a point outside the solid
|
||||
// to the solid`s boundary along a specified direction vector.
|
||||
//
|
||||
// Note : Intersections with boundaries less than the
|
||||
// tolerance must be ignored if the direction
|
||||
// is away from the boundary
|
||||
|
||||
|
||||
DistanceToOut(Pt)
|
||||
|
||||
// Calculates the shortest distance ("safety") from a point
|
||||
// inside the solid to any boundary of this solid.
|
||||
// Return 0 if the point is already outside.
|
||||
|
||||
|
||||
DistanceToOut(Pt, Vec)
|
||||
|
||||
// Calculates the distance from a point inside the solid
|
||||
// to the solid`s boundary along a specified direction vector.
|
||||
// Return 0 if the point is already outside.
|
||||
//
|
||||
// Note : If the shortest distance to a boundary is less
|
||||
// than the tolerance, it is ignored. This allows
|
||||
// for a point within a tolerant boundary to leave
|
||||
// immediately
|
||||
|
||||
|
||||
Problem with DistanceToIn(Pt) and DistanceToOut(Pt) :
|
||||
|
||||
Problem with the G4FPlane : there is no inside and no outside...
|
||||
So, to test if the point is inside to return 0, utilize the Inside
|
||||
function. But I don`t know if it is really needed because dToIn is
|
||||
called only if the point is outside...
|
||||
So for the moment, I cannot ensure to return 0 if the point is inside for
|
||||
DistanceToOut and outside for DistanceToIn.
|
||||
|
||||
|
||||
|
||||
G4BREPSolid is utilized for the creation of solid with STEP interface. For
|
||||
the moment, the G4BREPSolid::Inside function utilize some other G4BREPSolid
|
||||
functions which are redondant in some cases, and I don`t understand exactly
|
||||
what they done.
|
||||
|
||||
These functions are identical into PCone and Polyhedra and I think there are
|
||||
general functions, so try to copy them into the G4BREPSolid class.
|
||||
|
||||
After that, it's possible to optimize these functions into each specific solid
|
||||
(PCone, Pgone, Box, etc...)
|
||||
|
||||
|
||||
|
||||
These 5 functions utilized other functions :
|
||||
- TestSurfaceBBoxes (solid function)
|
||||
- SurfaceNormal (solid function)
|
||||
- HowNear (surface function)
|
||||
- Intersect (surface function)
|
||||
|
||||
|
||||
TestSurfaceBBoxes(ray)
|
||||
|
||||
// Test if the bounding box of each surface is intersected
|
||||
// by the ray. If not, the surface become deactive.
|
||||
|
||||
This function is placed at the begining of all the DistanceTo and Inside
|
||||
functions. It is utilized to deactive the surface which bounding box is not
|
||||
intersected by the ray. In this way, we do not make the complicate and long
|
||||
Intersect function for the surfaces we are sure that they are not intersected.
|
||||
|
||||
|
||||
|
||||
SurfaceNormal(Pt)
|
||||
|
||||
// This function calculates the normal of the
|
||||
// solid boundary surface on a point on this surface
|
||||
// Note : the sense of the normal depends on the sense of the surface
|
||||
|
||||
This solid function check on which of its surface the point is, and after call
|
||||
the SurfaceNormal(Pt) function of this surface. The sense of the normal depends
|
||||
on the sense of the surface : if it's an inner surface the sense is 0, and if
|
||||
it's an outer surface the sense is 1.
|
||||
The normal calculate at first is by default away from the boundary. But if the
|
||||
sense is 0 the normal is the opposite.
|
||||
|
||||
|
||||
|
||||
HowNear(Pt)
|
||||
|
||||
// Shortest distance from the point x to the G4...Surface.
|
||||
// The distance will be positive if the point is outside
|
||||
// the G4...Surface, negative if the point is inside.
|
||||
|
||||
In the case of the G4FPlane, HowNear is the closest distance from the point to
|
||||
the infinite plane.
|
||||
|
||||
In the case of the G4FCylindrical and G4FConical surface, the closest distance
|
||||
from the point to the infinite volume is calculated at first. But if this
|
||||
distance correspond to the distance from the start point to a point outside the
|
||||
surface boundary, return the distance from the point to the nearest plane
|
||||
which delimite the surface length.
|
||||
|
||||
Be careful !
|
||||
Insure that HowNear < 0 correspond to point inside
|
||||
HowNear > 0 correspond to point outside
|
||||
HowNear = 0 correspond to point on the surface
|
||||
|
||||
The sign is needed for DistanceToIn(pt) and DistanceToOut(pt)
|
||||
Problem : for the plane, there is no inside and no outside !
|
||||
(see the comments for these 2 functions)
|
||||
|
||||
|
||||
|
||||
Intersect(Ray)
|
||||
|
||||
// This function count the number of intersections of a
|
||||
// bounded surface by a ray.
|
||||
|
||||
|
||||
Set "distance" to the closest distance from the start point to the nearest
|
||||
intersection and return the number of intersections. If no intersection is
|
||||
founded, set distance = kInfinity and return 0.
|
||||
|
||||
If this number is par, it`s signify that the start point of the ray is outside
|
||||
the volume bounded by the surface. So, for the case of the solid Inside
|
||||
calculation, ignored this intersections because the point is outside this
|
||||
part of the volume.
|
||||
|
||||
|
||||
In the case of the intersection of the ray and a G4FPlane, we calculate at
|
||||
first the intersection with the infinite plane. After, we have to determine if
|
||||
the intersection is inside the finite plane.
|
||||
|
||||
To do that, the intersection point and the curve boudary of the finite plane
|
||||
are projected in 2D both. So we determine if the projected hit is inside or
|
||||
outside the projected surface.
|
||||
|
||||
To do that, the function IntersectRay2D is utilized, which return the number of
|
||||
intersections of a test ray which started point is the projected hit with the
|
||||
projected curve boundaries. If the number of intersections is odd, the
|
||||
projected hit is inside the projected boundary, so the intersection point is
|
||||
inside the G4FPlane and we find a real intersection.
|
||||
|
||||
In the same way, into each curve IntersectRay2D function, all the intersections
|
||||
are calculated at first, and after we determine which intersection is on the
|
||||
bounded curve and in the direction of the ray. In case of the projected point
|
||||
is on the curve, the projectedhit is considerated inside the projected surface.
|
||||
So return immediately a specific odd value (999).
|
||||
|
||||
For the moment, only the G4Line:IntersectRay2D is completed, do the same for
|
||||
each curve.
|
||||
|
||||
|
||||
In the case of the G4FConicalSurface and G4FCylindricalSurface, the Intersect
|
||||
function is easier. At first, all the intersections of the infinite surface by
|
||||
the ray are calculated. After, we determine if the intersection points are in
|
||||
the direction of the ray and are inside the bounding box of the surface.
|
||||
|
||||
|
||||
|
||||
|
||||
Generality :
|
||||
|
||||
- there are unnecessary #include, especially in STEPinterface
|
||||
|
||||
- utilize G4int, G4double, G4bool instead of int, double, bool ...
|
||||
|
||||
- look inside G4Ray class : there are plane functions inside !!!
|
||||
|
||||
- replace : #define toto 3.25
|
||||
by : const double toto=3.25
|
||||
|
||||
placed all this constant values in a .hh file (maybe G4Globals.hh)
|
||||
|
||||
- utilize the HEP classes and the function of the HEP classes
|
||||
ex : replace G4Plane by HepPlane if it is possible
|
||||
replace G4ThreeMat by HepMatrix or HepTransform3D
|
||||
( see http://wwwinfo.cern.ch/asd/lhc++/clhep/manual/RefGuide/index.html )
|
||||
|
||||
- see if FLT_MAXX can replaced by kInfinity and FLT_EPSILO by kCarTolerance
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
#ifndef __SOLID_H
|
||||
#define __SOLID_H
|
||||
|
||||
#include "G4VSolid.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4Surface.hh"
|
||||
#include "G4Axis2Placement3D.hh"
|
||||
#include "G4PointRat.hh"
|
||||
#include "G4BoundingBox3D.hh"
|
||||
|
||||
class STEPentity;
|
||||
class InstMgr;
|
||||
class G4Ray;
|
||||
|
||||
|
||||
class G4BREPSolid : public G4VSolid
|
||||
{
|
||||
|
||||
@@ -23,7 +20,6 @@ public:
|
||||
|
||||
virtual G4String GetEntityType() const {return "Closed_Shell";}
|
||||
virtual void Initialize();
|
||||
G4int CreateSTEPData(); // not yet implemented
|
||||
|
||||
G4bool CalculateExtent(const EAxis pAxis ,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
@@ -50,7 +46,6 @@ public:
|
||||
G4Point3D Scope(); // ???
|
||||
|
||||
void DescribeYourselfTo (G4VGraphicsScene& scene) const;
|
||||
G4VisExtent GetExtent () const;
|
||||
G4Polyhedron* CreatePolyhedron () const;
|
||||
G4NURBS* CreateNURBS () const;
|
||||
|
||||
@@ -87,7 +82,6 @@ public:
|
||||
}
|
||||
|
||||
static G4int NumberOfSolids;
|
||||
static InstMgr InstanceList;
|
||||
|
||||
G4double GetShortestDistance() const {return ShortestDistance;}
|
||||
|
||||
@@ -178,12 +172,3 @@ protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidBox.hh,v 1.2 1999/12/15 14:49:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __G4BREPSolidBOX
|
||||
#define __G4BREPSolidBOX
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidCone.hh,v 1.2 1999/12/15 14:49:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __G4BREPSolidCone
|
||||
#define __G4BREPSolidCone
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidCylinder.hh,v 1.2 1999/12/15 14:49:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __G4BREPSolidCylinder
|
||||
#define __G4BREPSolidCylinder
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidPCone.hh,v 1.3 1999/12/15 14:49:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// The polyconical solid G4BREPSolidPCone is a shape defined by a set of
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidPolyhedra.hh,v 1.3 1999/12/15 14:49:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// The polygonal solid G4BREPSolidPolyhedra is a shape defined by an inner
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidSphere.hh,v 1.2 1999/12/15 14:49:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __G4BREPSolidSphere
|
||||
#define __G4BREPSolidSphere
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidTorus.hh,v 1.2 1999/12/15 14:49:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __G4BREPSolidTorus
|
||||
#define __G4BREPSolidTorus
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BSplineCurve.hh,v 1.5 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __BSPLINECURVE_H
|
||||
#define __BSPLINECURVE_H
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BSplineCurveWithKnots.hh,v 1.2 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __B_SPLINECURVEWITHKNOTS_H
|
||||
#define __B_SPLINECURVEWITHKNOTS_H
|
||||
|
||||
@@ -5,34 +5,24 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BSplineSurface.hh,v 1.3 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4BSplineSurface.hh,v 1.6 2000/02/25 15:58:47 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __BSPLINESURFACE_H
|
||||
#define __BSPLINESURFACE_H
|
||||
|
||||
|
||||
#include "G4Point3D.hh"
|
||||
#include "G4PointRat.hh"
|
||||
#include "G4Surface.hh"
|
||||
#include "G4ProjectedSurface.hh"
|
||||
|
||||
|
||||
|
||||
//#ifdef WIN32
|
||||
//# include "G4ios.hh"
|
||||
//#else
|
||||
//# include <stream.h>
|
||||
//#endif
|
||||
|
||||
|
||||
#include "G4UVHit.hh"
|
||||
|
||||
class G4BSplineSurface : public G4Surface
|
||||
{
|
||||
public:
|
||||
|
||||
G4BSplineSurface();
|
||||
G4BSplineSurface(char*, G4Ray&);
|
||||
G4BSplineSurface(const char*, G4Ray&);
|
||||
G4BSplineSurface(const G4BSplineSurface &tmp);
|
||||
G4BSplineSurface(G4int, G4int, G4KnotVector&, G4KnotVector&,
|
||||
G4ControlPoints&);
|
||||
@@ -110,14 +100,3 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4BSplineSurfaceWithKnots.hh,v 1.1 2000/02/25 15:57:42 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __B_SPLINESURFACEWITHKNOTS_H
|
||||
#define __B_SPLINESURFACEWITHKNOTS_H
|
||||
|
||||
#include "G4BSplineSurface.hh"
|
||||
|
||||
|
||||
class G4BSplineSurfaceWithKnots : public G4BSplineSurface
|
||||
{
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BezierSurface.hh,v 1.2 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __BEZIERSURFACE_H
|
||||
#define __BEZIERSURFACE_H
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4CircularCurve.hh,v 1.3 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __CIRCULARCURVE_H
|
||||
#define __CIRCULARCURVE_H
|
||||
|
||||
@@ -9,7 +9,6 @@ class G4Conic: public G4Curve
|
||||
public:
|
||||
|
||||
G4Conic();
|
||||
G4Conic(STEPentity& Ent);
|
||||
~G4Conic();
|
||||
|
||||
// Get/Set to geometric data
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ConicalSurface.hh,v 1.2 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4ConicalSurface.hh,v 1.4 2000/02/16 12:02:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
/* /usr/local/gismo/repo/geometry/G4ConicalSurface.h,v 1.5 1993/12/30 02:13:59 rensing Exp */
|
||||
// File: G4ConicalSurface.h
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
// G4ConicalSurface( const G4ConicalSurface& c ): G4Surface( c.origin )
|
||||
// { axis = c.axis; angle = c.angle; }
|
||||
|
||||
virtual char *NameOf() const { return "G4ConicalSurface"; }
|
||||
virtual const char* NameOf() const { return "G4ConicalSurface"; }
|
||||
|
||||
virtual void PrintOn( G4std::ostream& os = G4cout ) const;
|
||||
|
||||
@@ -125,7 +125,7 @@ private:
|
||||
//-----> { axis = c.axis; angle = c.angle; }
|
||||
//
|
||||
// function to return class name
|
||||
//----->virtual char *NameOf() const { return "G4ConicalSurface"; }
|
||||
//----->virtual const char* NameOf() const { return "G4ConicalSurface"; }
|
||||
//
|
||||
// printing function
|
||||
//----->virtual void PrintOn( G4std::ostream& os = G4cout ) const;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ControlPoints.hh,v 1.2 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4ControlPoints.hh,v 1.3 2000/01/21 13:47:40 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// Modif 8 oct 98 : A.Floquet
|
||||
@@ -29,8 +29,6 @@ public:
|
||||
// Constructors
|
||||
G4ControlPoints();
|
||||
|
||||
G4ControlPoints(const STEPaggregate& Aggr, const int Rational);
|
||||
|
||||
G4ControlPoints( int, int);
|
||||
|
||||
G4ControlPoints( int , int , int );
|
||||
@@ -93,13 +91,3 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ConvexHull.hh,v 1.2 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __CONVEXHULL_H
|
||||
#define __CONVEXHULL_H
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Curve.hh,v 1.3 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4Curve.hh,v 1.4 2000/02/16 12:02:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __CURVE_H
|
||||
#define __CURVE_H
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
virtual void SetParentSrfPtr(const G4Surface* srf){}
|
||||
|
||||
|
||||
virtual const char* Name(){return "G4Curve";}
|
||||
virtual const char* Name() const {return "G4Curve";}
|
||||
|
||||
G4bool operator==(const G4Curve& right) const
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4CylindricalSurface.hh,v 1.2 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4CylindricalSurface.hh,v 1.4 2000/02/16 12:02:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
/* /usr/local/gismo/repo/geometry/G4CylindricalSurface.h,v 1.16 1993/12/30 02:14:08 rensing Exp */
|
||||
// File: G4CylindricalSurface.h
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
|
||||
G4String GetEntityType(){return G4String("Cylindrical_Surface");}
|
||||
|
||||
virtual char *NameOf() const { return "G4CylindricalSurface"; }
|
||||
virtual const char* NameOf() const { return "G4CylindricalSurface"; }
|
||||
|
||||
virtual void PrintOn( G4std::ostream& os = G4cout ) const;
|
||||
|
||||
@@ -128,7 +128,7 @@ private:
|
||||
//-----> { axis = c.axis; radius = c.radius; }
|
||||
//
|
||||
// function to return class name
|
||||
//----->virtual char *NameOf() const { return "G4CylindricalSurface"; }
|
||||
//----->virtual const char* NameOf() const { return "G4CylindricalSurface"; }
|
||||
//
|
||||
// printing function
|
||||
//----->virtual void PrintOn( G4std::ostream& os = G4cout ) const;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Ellipse.hh,v 1.3 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4Ellipse.hh,v 1.4 2000/01/21 13:47:41 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __ELLIPTICCURVE_H
|
||||
#define __ELLIPTICCURVE_H
|
||||
@@ -31,10 +31,6 @@ public:
|
||||
virtual G4Point3D GetPoint(G4double param);
|
||||
virtual G4double GetPPoint(const G4Point3D& p);
|
||||
|
||||
// STEP
|
||||
G4Ellipse(STEPentity& Ent, InstMgr&);
|
||||
G4Ellipse(STEPentity& Ent);
|
||||
|
||||
// Get/Set for the geometric data
|
||||
void Init(const G4Axis2Placement3D& position0,
|
||||
G4double semiAxis10, G4double semiAxis20);
|
||||
@@ -63,6 +59,3 @@ private:
|
||||
#include "G4Ellipse.icc"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FConicalSurface.hh,v 1.4 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4FConicalSurface.hh,v 1.6 2000/02/16 12:02:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __FCONIC_H
|
||||
#define __FCONIC_H
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
// STEP additions
|
||||
//
|
||||
// function to return class name
|
||||
virtual char *Name() const { return "G4FConicalSurface"; }
|
||||
virtual const char* Name() const { return "G4FConicalSurface"; }
|
||||
// printing function
|
||||
virtual void PrintOn( G4std::ostream& os = G4cout ) const;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FCylindricalSurface.hh,v 1.5 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4FCylindricalSurface.hh,v 1.7 2000/02/16 12:02:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __FCYLINDER_H
|
||||
#define __FCYLINDER_H
|
||||
@@ -95,7 +95,7 @@ class G4FCylindricalSurface: public G4Surface
|
||||
void CalcBBox();
|
||||
|
||||
// function to return class name
|
||||
virtual char *NameOf() const
|
||||
virtual const char* NameOf() const
|
||||
{
|
||||
return "G4FCylindricalSurface";
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FPlane.hh,v 1.5 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4FPlane.hh,v 1.7 2000/02/16 12:02:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// L. Broglia
|
||||
//
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
return NormalX->GetDir();
|
||||
}
|
||||
|
||||
virtual char *Name() const { return "G4FPlane"; }
|
||||
virtual const char* Name() const { return "G4FPlane"; }
|
||||
|
||||
G4double ClosestDistanceToPoint(const G4Point3D& Pt);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Globals.hh,v 1.2 1999/12/15 14:49:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
/* /usr/local/gismo/repo/support/globals.h,v 1.8 1994/04/18 18:29:03 atwood Exp */
|
||||
// File: globals.h
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Hyperbola.hh,v 1.3 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4Hyperbola.hh,v 1.4 2000/01/21 13:47:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __HYPERBOLICCURVE_H
|
||||
#define __HYPERBOLICCURVE_H
|
||||
@@ -31,10 +31,6 @@ public:
|
||||
virtual G4Point3D GetPoint(G4double param);
|
||||
virtual G4double GetPPoint(const G4Point3D& p);
|
||||
|
||||
// STEP
|
||||
G4Hyperbola(STEPentity& Ent);
|
||||
G4Hyperbola(STEPentity& Ent, InstMgr&);
|
||||
|
||||
//G4Hyperbola(G4Point3d, G4Point3d, G4Point3d,
|
||||
// G4Point3d,G4double, G4double );
|
||||
//G4Point3d EvaluateByParameterValue(const G4double u);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4KnotVector.hh,v 1.3 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __KNOTVECTOR_H
|
||||
#define __KNOTVECTOR_H
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Line.hh,v 1.3 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __LINE_H
|
||||
#define __LINE_H
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OsloMatrix.hh,v 1.2 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#ifndef __G4OsloMatrix_h
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Parabola.hh,v 1.3 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4Parabola.hh,v 1.4 2000/01/21 13:47:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#ifndef __PARABOLICCURVE_H
|
||||
@@ -31,10 +31,6 @@ public:
|
||||
virtual G4Point3D GetPoint(G4double param);
|
||||
virtual G4double GetPPoint(const G4Point3D& p);
|
||||
|
||||
// STEP
|
||||
G4Parabola(STEPentity& Ent);
|
||||
G4Parabola(STEPentity& Ent, InstMgr&);
|
||||
|
||||
//G4Parabola(G4Point3d, G4Point3d, G4double );
|
||||
//G4Point3d EvaluateByParameterValue(const G4double u);
|
||||
//G4Point3d GetBoundMax();
|
||||
@@ -62,4 +58,3 @@ private:
|
||||
#include "G4Parabola.icc"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PlacedSolid.hh,v 1.2 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PLACEDSOLID_HH
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Plane.hh,v 1.2 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __G4Plane
|
||||
#define __G4Plane
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Point3DVector.hh,v 1.3 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef included_G4Point3DVector
|
||||
#define included_G4Point3DVector
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PointRat.hh,v 1.4 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4PointRat.hh,v 1.6 2000/02/25 15:59:16 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// Modif 8 oct 98 : A.Floquet
|
||||
@@ -25,9 +25,7 @@
|
||||
|
||||
// L. Broglia
|
||||
// Before included in G4Point.hh
|
||||
#include "STEPaggregate.h"
|
||||
#include "G4Plane.hh"
|
||||
#include "G4UVHit.hh"
|
||||
#define SQRT_SMALL_FASTF 1.0e-18
|
||||
#define SMALL SQRT_SMALL_FASTF
|
||||
#define ROW 0
|
||||
@@ -46,8 +44,6 @@ public:
|
||||
|
||||
~G4PointRat();
|
||||
|
||||
void CopyRationalValue(const RealNode& Rnode);
|
||||
|
||||
int GetType(void)const { return 4; } // This function should be removed
|
||||
// if calls to this are also removed
|
||||
void operator=(const G4Point3D&);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProjectedSurface.hh,v 1.2 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __G4ProjectedSurface_h
|
||||
#define __G4ProjectedSurface_h 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Ray.hh,v 1.2 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __G4Ray_h
|
||||
#define __G4Ray_h 1
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4RectangularTrimmedSurface.hh,v 1.2 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4RectangularTrimmedSurface.hh,v 1.4 2000/02/16 12:02:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4FCylindricalSurface.hh"
|
||||
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
int Intersect(const G4Ray&);
|
||||
void CalcBBox();
|
||||
|
||||
virtual char *Name() const { return "G4RectangularTrimmedSurface"; }
|
||||
virtual const char* Name() const { return "G4RectangularTrimmedSurface"; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Sort.hh,v 1.2 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// File: G4Sort.h
|
||||
// Author: Alan Breakstone
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SphericalSurface.hh,v 1.2 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4SphericalSurface.hh,v 1.4 2000/02/16 12:02:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __G4SpheShell_H
|
||||
#define __G4SpheShell_H
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
if(v.z() < min.z()) min.setZ(v.z());
|
||||
}
|
||||
|
||||
virtual char *NameOf() const { return "G4SphericalSurface"; }
|
||||
virtual const char* NameOf() const { return "G4SphericalSurface"; }
|
||||
virtual void PrintOn( G4std::ostream& os = G4cout ) const;
|
||||
|
||||
int operator==( const G4SphericalSurface& s )
|
||||
@@ -177,7 +177,7 @@ private:
|
||||
//-----> theta_2 = s.theta_2; }
|
||||
//
|
||||
// function to return class name
|
||||
//----->virtual char *NameOf() const { return "G4SphericalSurface"; }
|
||||
//----->virtual const char* NameOf() const { return "G4SphericalSurface"; }
|
||||
//
|
||||
// printing function
|
||||
//----->virtual void PrintOn( G4std::ostream& os = G4cout ) const;
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
virtual inline void Reset(){Intersected=0;active = 1; distance = kInfinity;};
|
||||
|
||||
// one function for type info (GetEntityType) should be enough
|
||||
virtual char *Name() const { return "G4Surface"; }
|
||||
virtual const char* Name() const { return "G4Surface"; }
|
||||
virtual int MyType() const { return Type; }
|
||||
|
||||
// To be replaced by a CLHEP vector operation
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SurfaceList.hh,v 1.2 1999/12/15 14:49:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __G4SurfaceList_h
|
||||
#define __G4SurfaceList_h 1
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ThreeMat.hh,v 1.2 1999/12/15 14:49:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4ThreeMat.hh,v 1.4 2000/02/16 12:02:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
/* G4ThreeMat.h,v 1.7 1993/12/30 02:15:55 rensing Exp */
|
||||
// File: G4ThreeMat.h
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
// copy constructor
|
||||
G4ThreeMat( const G4ThreeMat& m );
|
||||
// function to return class name
|
||||
virtual char *NameOf() const { return "G4ThreeMat"; }
|
||||
virtual const char* NameOf() const { return "G4ThreeMat"; }
|
||||
// printing functions (derived classes do not need to overwrite operator <<)
|
||||
friend G4std::ostream& operator<<( G4std::ostream& os, const G4ThreeMat& m );
|
||||
virtual void PrintOn( G4std::ostream& os = G4cout ) const;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ToroidalSurface.hh,v 1.2 1999/12/15 14:49:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#ifndef __G4TOROIDALSURAFCE
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UVHit.hh,v 1.2 1999/12/15 14:49:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4UVHit.hh,v 1.3 2000/02/25 15:59:45 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#ifndef __G4UV_Hit
|
||||
#define __G4UV_Hit
|
||||
@@ -15,12 +15,14 @@
|
||||
|
||||
class G4UVHit
|
||||
{
|
||||
public:
|
||||
G4UVHit(){u=-1;v=-1; next=0;}
|
||||
G4UVHit(G4double u_hit, G4double v_hit){u = u_hit; v = v_hit; next=0;}
|
||||
~G4UVHit(){}
|
||||
|
||||
public:
|
||||
G4UVHit * next;
|
||||
int sub;
|
||||
G4double u, v;
|
||||
G4UVHit(){u=-1;next=this;}
|
||||
G4UVHit(G4double u_hit, G4double v_hit){u = u_hit; v = v_hit;}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolid.cc,v 1.10 1999/12/15 14:49:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4BREPSolid.cc,v 1.12 2000/04/11 16:15:17 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
|
||||
#include "G4BREPSolid.hh"
|
||||
#include "G4VoxelLimits.hh"
|
||||
@@ -19,13 +19,10 @@
|
||||
#include "G4BSplineSurface.hh"
|
||||
#include "G4ToroidalSurface.hh"
|
||||
#include "G4SphericalSurface.hh"
|
||||
#include "instmgr.h"
|
||||
|
||||
G4Ray G4BREPSolid::Track;
|
||||
G4double G4BREPSolid::ShortestDistance= kInfinity;
|
||||
int G4BREPSolid::NumberOfSolids=0;
|
||||
InstMgr G4BREPSolid::InstanceList;
|
||||
|
||||
|
||||
G4BREPSolid::G4BREPSolid(const G4String name) : G4VSolid(name)
|
||||
{
|
||||
@@ -1019,14 +1016,6 @@ void G4BREPSolid::DescribeYourselfTo (G4VGraphicsScene& scene) const
|
||||
}
|
||||
|
||||
|
||||
G4VisExtent G4BREPSolid::GetExtent() const
|
||||
{
|
||||
G4Point3D Min = bbox->GetBoxMin();
|
||||
G4Point3D Max = bbox->GetBoxMax();
|
||||
return G4VisExtent (Min.x(), Max.x(), Min.y(), Max.y(), Min.z(), Max.z());
|
||||
}
|
||||
|
||||
|
||||
G4Polyhedron* G4BREPSolid::CreatePolyhedron () const
|
||||
{
|
||||
// temporary
|
||||
@@ -1047,27 +1036,6 @@ G4NURBS* G4BREPSolid::CreateNURBS () const
|
||||
}
|
||||
|
||||
|
||||
int G4BREPSolid::CreateSTEPData()
|
||||
{
|
||||
// create the solid entity
|
||||
//STEPentity* ent = new STEPentity();
|
||||
//stateEnum *sEnu = new stateEnum("newSE");
|
||||
//MgrNode *mnode = new MgrNode(ent, sEnu);
|
||||
|
||||
// create the attributelist & attributes for this solid
|
||||
// STEPattributeList *aList = new STEPattributeList();
|
||||
//AttrDescriptor *aDesc = new AttrDescriptor();
|
||||
// STEPattribute *name_attr = new STEPattribute(aDesc, name);
|
||||
|
||||
// create the mgrnode neede by the instance List
|
||||
|
||||
// append node to instance List
|
||||
|
||||
// call entoity creation routines for child entities.
|
||||
return 0; // to shut up compilers
|
||||
}
|
||||
|
||||
|
||||
void G4BREPSolid::CalcBBoxes()
|
||||
{
|
||||
// First initialization
|
||||
@@ -1488,20 +1456,3 @@ G4Point3D G4BREPSolid::Scope()
|
||||
|
||||
return scope;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidBox.cc,v 1.2 1999/12/15 14:50:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4BREPSolidBox.hh"
|
||||
#include "G4FPlane.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidCone.cc,v 1.2 1999/12/15 14:50:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#include "G4BREPSolidCone.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidCylinder.cc,v 1.2 1999/12/15 14:50:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#include "G4BREPSolidCylinder.hh"
|
||||
|
||||
@@ -51,5 +51,5 @@ G4BREPSolidOpenPCone::G4BREPSolidOpenPCone (G4String name,
|
||||
|
||||
|
||||
void G4BREPSolidOpenPCone::DescribeYourselfTo (G4VGraphicsScene& scene) const {
|
||||
scene.AddThis ( *fPtrSolidA );
|
||||
scene.AddThis ( *this );
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidPCone.cc,v 1.14 1999/12/15 17:17:16 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// The polyconical solid G4BREPSolidPCone is a shape defined by a set of
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidPolyhedra.cc,v 1.11 1999/12/15 14:50:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// Corrections by S.Giani:
|
||||
// - Xaxis now corresponds to phi=0
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidSphere.cc,v 1.2 1999/12/15 14:50:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#include "G4BREPSolidSphere.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BREPSolidTorus.cc,v 1.2 1999/12/15 14:50:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4BREPSolidTorus.hh"
|
||||
#include "G4ToroidalSurface.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BSplineCurve.cc,v 1.2 1999/12/15 14:50:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4BSplineCurve.hh"
|
||||
#include "G4ControlPoints.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BSplineCurveWithKnots.cc,v 1.2 1999/12/15 14:50:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4BSplineCurveWithKnots.hh"
|
||||
|
||||
|
||||
@@ -5,39 +5,38 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BSplineSurface.cc,v 1.3 1999/12/15 14:50:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4BSplineSurface.cc,v 1.7 2000/02/25 15:58:47 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#include "EntityInst.h"
|
||||
#include "G4BSplineSurface.hh"
|
||||
#include "G4BezierSurface.hh"
|
||||
|
||||
class G4ControlPoints;
|
||||
class G4BoundingBox;
|
||||
#include "G4ControlPoints.hh"
|
||||
#include "G4BoundingBox3D.hh"
|
||||
|
||||
G4BSplineSurface::G4BSplineSurface()
|
||||
{
|
||||
distance = kInfinity;
|
||||
dir=ROW;
|
||||
first_hit = Hit=(G4UVHit*)0;
|
||||
first_hit = Hit = (G4UVHit*)0;
|
||||
ctl_points = (G4ControlPoints*)0;
|
||||
u_knots = v_knots = tmp_knots = (G4KnotVector*)0;
|
||||
}
|
||||
|
||||
|
||||
G4BSplineSurface::G4BSplineSurface(char* nurbfilename, G4Ray& rayref)
|
||||
G4BSplineSurface::G4BSplineSurface(const char* nurbfilename, G4Ray& rayref)
|
||||
{
|
||||
distance = kInfinity;
|
||||
Hit=(G4UVHit*)0;
|
||||
first_hit = Hit;
|
||||
first_hit = Hit = (G4UVHit*)0;
|
||||
ctl_points = (G4ControlPoints*)0;
|
||||
u_knots = v_knots = tmp_knots = (G4KnotVector*)0;
|
||||
}
|
||||
|
||||
|
||||
G4BSplineSurface::G4BSplineSurface(const G4BSplineSurface &tmp)
|
||||
{
|
||||
distance = tmp.distance;
|
||||
Hit=(G4UVHit*)0;
|
||||
first_hit=Hit;
|
||||
first_hit = Hit = (G4UVHit*)0;
|
||||
|
||||
// next=this;
|
||||
order[0] = tmp.order[0];
|
||||
@@ -46,19 +45,23 @@ G4BSplineSurface::G4BSplineSurface(const G4BSplineSurface &tmp)
|
||||
|
||||
u_knots = new G4KnotVector(*tmp.u_knots);
|
||||
v_knots = new G4KnotVector(*tmp.v_knots);
|
||||
tmp_knots = (G4KnotVector*)0;
|
||||
|
||||
ctl_points = new G4ControlPoints(*tmp.ctl_points);
|
||||
}
|
||||
|
||||
|
||||
G4BSplineSurface::G4BSplineSurface(G4int u, G4int v, G4KnotVector& u_kv,
|
||||
G4KnotVector& v_kv,G4ControlPoints& cp)
|
||||
G4KnotVector& v_kv, G4ControlPoints& cp)
|
||||
{
|
||||
first_hit = Hit = (G4UVHit*)0;
|
||||
|
||||
order[0] = u+1;
|
||||
order[1] = v+1;
|
||||
|
||||
u_knots = new G4KnotVector(u_kv);
|
||||
v_knots = new G4KnotVector(v_kv);
|
||||
u_knots = new G4KnotVector(u_kv);
|
||||
v_knots = new G4KnotVector(v_kv);
|
||||
tmp_knots = (G4KnotVector*)0;
|
||||
|
||||
ctl_points = new G4ControlPoints(cp);
|
||||
}
|
||||
@@ -70,13 +73,14 @@ G4BSplineSurface::~G4BSplineSurface()
|
||||
delete v_knots;
|
||||
delete ctl_points;
|
||||
G4UVHit* temphit=Hit;
|
||||
Hit = first_hit;
|
||||
while(Hit!=(G4UVHit*)0)
|
||||
{
|
||||
Hit=Hit->next;
|
||||
delete temphit;
|
||||
temphit=Hit;
|
||||
}
|
||||
delete temphit;// remove last
|
||||
// delete temphit;// remove last
|
||||
|
||||
}
|
||||
|
||||
@@ -166,9 +170,18 @@ G4Point3D G4BSplineSurface::FinalIntersection()
|
||||
// Move to first
|
||||
bezier_list.MoveToFirst();
|
||||
// Find the second last.
|
||||
// What!? Casting a G4Surface* to a G4SurfaceList* !?!?!? - GC
|
||||
//
|
||||
// if(bezier_list.index != bezier_list.last)
|
||||
// while ( ((G4SurfaceList*)bezier_list.index)->next !=
|
||||
// bezier_list.last) bezier_list.Step();
|
||||
//
|
||||
// Try the following instead (if that's the wished behavior)...
|
||||
//
|
||||
if(bezier_list.index != bezier_list.last)
|
||||
while ( ((G4SurfaceList*)bezier_list.index)->next !=
|
||||
bezier_list.last) bezier_list.Step();
|
||||
while (bezier_list.next != bezier_list.last)
|
||||
bezier_list.Step();
|
||||
|
||||
G4BezierSurface* tmp = (G4BezierSurface*) bezier_list.GetSurface();
|
||||
tmp->CalcBBox();
|
||||
|
||||
@@ -335,8 +348,9 @@ void G4BSplineSurface::FindIntersections(const G4Ray& rayref)
|
||||
if(bez_ptr->Distance() < distance) distance = bez_ptr->Distance();
|
||||
|
||||
// Remove the temporary Hit
|
||||
if (first_hit == Hit) first_hit = (G4UVHit*)0;
|
||||
delete Hit;
|
||||
first_hit = Hit = (G4UVHit*)0;
|
||||
Hit = (G4UVHit*)0;
|
||||
|
||||
// Move to next in the List
|
||||
bezier_list.Step();
|
||||
@@ -538,7 +552,8 @@ G4Point3D G4BSplineSurface::BSEvaluate()
|
||||
param = Hit->v;
|
||||
|
||||
// Evaluate the diff_curve...
|
||||
G4PointRat rat_result = (G4PointRat&) InternalEvalCrv(0, diff_curve);
|
||||
// G4PointRat rat_result = (G4PointRat&) InternalEvalCrv(0, diff_curve);
|
||||
G4PointRat rat_result(InternalEvalCrv(0, diff_curve));
|
||||
|
||||
// Calc the 3D values.
|
||||
// L. Broglia
|
||||
@@ -553,7 +568,8 @@ G4Point3D G4BSplineSurface::BSEvaluate()
|
||||
for ( i = 0; i < row_size; i++)
|
||||
{
|
||||
ord = GetOrder(ROW);
|
||||
G4Point3D rtr_pt = (G4Point3D&) InternalEvalCrv(i, curves);
|
||||
// G4Point3D rtr_pt = (G4Point3D&) InternalEvalCrv(i, curves);
|
||||
G4Point3D rtr_pt = (InternalEvalCrv(i, curves)).pt();
|
||||
diff_curve->put(0,i,rtr_pt);
|
||||
}
|
||||
|
||||
@@ -571,7 +587,7 @@ G4Point3D G4BSplineSurface::BSEvaluate()
|
||||
param = Hit->v;
|
||||
|
||||
// Evaluate the diff_curve...
|
||||
result = (G4Point3D&) InternalEvalCrv(0, diff_curve);
|
||||
result = (InternalEvalCrv(0, diff_curve)).pt();
|
||||
}
|
||||
|
||||
delete diff_curve;
|
||||
@@ -592,7 +608,7 @@ G4Point3D G4BSplineSurface::Evaluation(const G4Ray& rayref)
|
||||
temphit=Hit;
|
||||
}
|
||||
|
||||
delete temphit;
|
||||
// delete temphit;
|
||||
|
||||
// Get the real Hit point
|
||||
closest_hit = FinalIntersection();
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4BSplineSurfaceWithKnots.cc,v 1.1 2000/02/25 15:57:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4BSplineSurfaceWithKnots.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4BezierSurface.cc,v 1.2 1999/12/15 14:50:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// L. Broglia, 10/10/98
|
||||
// Error in line 331 and replaced addition of coordinates by
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4CircularCurve.cc,v 1.2 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#include "G4CircularCurve.hh"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// G4Conic
|
||||
|
||||
G4Conic::G4Conic (): pShift(0) {}
|
||||
G4Conic::G4Conic (STEPentity& Ent){};
|
||||
G4Conic::~G4Conic() {}
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ConicalSurface.cc,v 1.2 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4ConicalSurface.cc,v 1.3 2000/02/25 16:00:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
/* /usr/local/gismo/repo/geometry/G4ConicalSurface.cc,v 1.6 1994/08/03 17:15:01 burnett Exp */
|
||||
// File: G4ConicalSurface.cc
|
||||
@@ -61,9 +61,9 @@ G4ConicalSurface::G4ConicalSurface( const G4Point3D& o,
|
||||
*/
|
||||
axis = a*(1/amag);
|
||||
else {
|
||||
G4cerr << "Error in G4ConicalSurface::G4ConicalSurface"
|
||||
<<"--axis has zero length\n"
|
||||
<< "\tDefault axis ( 1.0, 0.0, 0.0 ) is used.\n";
|
||||
G4cerr << "WARNING - G4ConicalSurface::G4ConicalSurface" << G4endl
|
||||
<< "\tAxis has zero length" << G4endl
|
||||
<< "\tDefault axis ( 1.0, 0.0, 0.0 ) is used." << G4endl;
|
||||
|
||||
axis = G4Vector3D( 1.0, 0.0, 0.0 );
|
||||
}
|
||||
@@ -72,10 +72,11 @@ G4ConicalSurface::G4ConicalSurface( const G4Point3D& o,
|
||||
if ( ( e > 0.0 ) && ( e < ( 0.5 * M_PI ) ) )
|
||||
angle = e;
|
||||
else {
|
||||
G4cerr << "Error in G4ConicalSurface::G4ConicalSurface"
|
||||
<< "--asked for angle out of allowed range of 0 to PI/2\n"
|
||||
<< "\tDefault angle of 1.0 is used.\n";
|
||||
|
||||
G4cerr << "WARNING - G4ConicalSurface::G4ConicalSurface" << G4endl
|
||||
<< "\tAsked for angle out of allowed range of 0 to "
|
||||
<< 0.5*M_PI << " (PI/2): " << e << G4endl
|
||||
<< "\tDefault angle of 1.0 is used." << G4endl;
|
||||
|
||||
angle = 1.0;
|
||||
}
|
||||
}
|
||||
@@ -538,15 +539,16 @@ void G4ConicalSurface::SetAngle( G4double e )
|
||||
// Reset the angle of the G4ConicalSurface
|
||||
// Require angle to range from 0 to PI/2
|
||||
// if ( ( e > 0.0 ) && ( e < ( 0.5 * M_PI ) ) )
|
||||
if ( (e > 0.0) && (e <= ( 0.5 * M_PI)) )
|
||||
if ( (e > 0.0) && (e <= ( 0.5 * M_PI )) )
|
||||
angle = e;
|
||||
// use old value (do not change angle) if out of the range,
|
||||
//but Print message
|
||||
else
|
||||
{
|
||||
G4cerr << "Error in G4ConicalSurface::SetAngle"
|
||||
<< "--asked for angle out of allowed range of 0 to PI/2\n"
|
||||
<< "\tDefault angle of " << angle << " is used.\n";
|
||||
G4cerr << "WARNING - G4ConicalSurface::SetAngle" << G4endl
|
||||
<< "\tAsked for angle out of allowed range of 0 to "
|
||||
<< 0.5*M_PI << " (PI/2):" << e << G4endl
|
||||
<< "\tDefault angle of " << angle << " is used." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ControlPoints.cc,v 1.2 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4ControlPoints.cc,v 1.3 2000/01/21 13:47:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// Modif 8 oct 98 : A.Floquet
|
||||
@@ -125,17 +125,3 @@ G4double G4ControlPoints::ClosestDistanceToPoint( const G4Point3D& Pt)
|
||||
|
||||
return PointDist;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Curve.cc,v 1.2 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4Curve.hh"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4CylindricalSurface.cc,v 1.2 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
/* /usr/local/gismo/repo/geometry/G4CylindricalSurface.cc,v 1.24 1994/08/03 17:15:09 burnett Exp */
|
||||
// File: G4CylindricalSurface.cc
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Ellipse.cc,v 1.2 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4Ellipse.cc,v 1.3 2000/05/15 14:16:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#include "G4Ellipse.hh"
|
||||
@@ -34,7 +34,17 @@ G4Curve* G4Ellipse::Project(const G4Transform3D& tr)
|
||||
|
||||
G4Vector3D a = semiAxis1*xPrime;
|
||||
G4Vector3D b = semiAxis2*yPrime;
|
||||
G4double u = atan2( 2*a*b, a.mag2()-b.mag2() ) / 2;
|
||||
|
||||
G4double u;
|
||||
G4double abmag = a.mag2()-b.mag2();
|
||||
G4double prod = 2*a*b;
|
||||
if (abmag < FLT_MAX)
|
||||
if (prod > 0)
|
||||
u = pi/4;
|
||||
else
|
||||
u = -pi/4;
|
||||
else
|
||||
u = atan2(prod,abmag) / 2;
|
||||
|
||||
// get the coordinate axis directions and the semiaxis lengths
|
||||
G4Vector3D sAxis1 = a*cos(u)+b*sin(u);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FConicalSurface.cc,v 1.9 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
/* /usr/local/gismo/repo/geometry/G4FConicalSurface.cc,v 1.2 1993/02/05 00:38:39 alanb Exp */
|
||||
// File: G4FConicalSurface.cc
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FCylindricalSurface.cc,v 1.9 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
/* /usr/local/gismo/repo/geometry/FG4Cylinder.cc,v 1.1 1992/10/27 22:02:29 alanb Exp */
|
||||
// File: FG4Cylinder.cc
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4FPlane.cc,v 1.7 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// Corrections by S.Giani:
|
||||
// - The constructor using iVec now properly stores both the internal and
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Hyperbola.cc,v 1.2 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#include "G4Hyperbola.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4KnotVector.cc,v 1.2 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#include "G4KnotVector.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Line.cc,v 1.4 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4Line.hh"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4OsloMatrix.cc,v 1.2 1999/12/15 14:50:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#include "G4OsloMatrix.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Parabola.cc,v 1.2 1999/12/15 14:50:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4Parabola.hh"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PlacedSolid.cc,v 1.2 1999/12/15 14:50:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4PlacedSolid.hh"
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PointRat.cc,v 1.2 1999/12/15 14:50:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4PointRat.cc,v 1.3 2000/01/21 13:47:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// Modif 8 oct 98 : A.Floquet
|
||||
@@ -34,11 +34,3 @@ void G4PointRat::operator=(const G4Point3D& a)
|
||||
{ pt3d = a;
|
||||
s=1;
|
||||
}
|
||||
|
||||
void G4PointRat::CopyRationalValue(const RealNode& RNode)
|
||||
{
|
||||
s = RNode.value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ProjectedSurface.cc,v 1.3 1999/12/15 14:50:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4ProjectedSurface.hh"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Ray.cc,v 1.2 1999/12/15 14:50:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4Ray.hh"
|
||||
#include "G4PointRat.hh"
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4RectangularTrimmedSurface.cc,v 1.2 1999/12/15 14:50:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4RectangularTrimmedSurface.cc,v 1.3 2000/01/21 13:47:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "SdaiCONFIG_CONTROL_DESIGN.h"
|
||||
|
||||
#include "G4RectangularTrimmedSurface.hh"
|
||||
#include "G4FPlane.hh"
|
||||
#include "G4BSplineSurface.hh"
|
||||
@@ -45,5 +45,3 @@ int G4RectangularTrimmedSurface::Intersect(const G4Ray& Rayref)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Sort.cc,v 1.2 1999/12/15 14:50:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// File: G4Sort.cc
|
||||
// Author: Alan Breakstone
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SphericalSurface.cc,v 1.2 1999/12/15 14:50:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
/* $Header: /private/Net/unixhub/u1/ea/liml/gismo/gismo-0.2/geometry/RCS/G4SphericalSurface.cc,v 1.10 1992/08 */
|
||||
// File: G4SphericalSurface.cc
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SurfaceList.cc,v 1.2 1999/12/15 14:50:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4SurfaceList.cc,v 1.3 2000/02/14 17:49:32 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4SurfaceList.hh"
|
||||
|
||||
G4SurfaceList::G4SurfaceList()
|
||||
{
|
||||
first = index = last = (G4Surface*)0;
|
||||
first = index = last = next = temp = (G4Surface*)0;
|
||||
number_of_elements=0;
|
||||
}
|
||||
|
||||
@@ -239,11 +239,3 @@ void G4SurfaceList::QuickG4Sort(G4Surface** Dist, int left, int right)
|
||||
if( i < right )
|
||||
QuickG4Sort(Dist, i, right);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ThreeMat.cc,v 1.2 1999/12/15 14:50:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
/* G4ThreeMat.cc,v 1.5 1993/08/02 22:21:27 atwood Exp */
|
||||
// File: G4ThreeMat.cc
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ToroidalSurface.cc,v 1.2 1999/12/15 14:50:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
#include "G4ToroidalSurface.hh"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
$Id: History,v 1.5 2000/01/19 19:24:25 gcosmo Exp $
|
||||
$Id: History,v 1.12 2000/06/26 16:16:06 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -20,7 +20,42 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Gen 19 2000 Gabriele Cosmo geom-solid-bool-V01-00-00
|
||||
June 26 2000 Vladimir Grichine geom-solid-bool-V01-01-03
|
||||
|
||||
- Fixed bug in G4SubtractionSolid::DistanceToOut(p,v,...). validNorm
|
||||
flag was uncorrectly set to true. Fixes report #102.
|
||||
|
||||
June 6 2000 John Apostolakis geom-solid-bool-V01-01-02
|
||||
|
||||
- Protecting the use of pointers validNorm and n, if calcNorm is false
|
||||
|
||||
June 6 2000 John Allison geom-solid-bool-V01-01-01
|
||||
|
||||
- Re-enabled CreatePolyhedron() method from G4UnionSolid, G4IntersectionSolid
|
||||
and G4SubtractionSolid. Coworks with greps-V01-01-04.
|
||||
|
||||
May 26 2000 John Allison geom-solid-bool-V01-01-00
|
||||
|
||||
- Disabled CreatePolyhedron() method from G4UnionSolid, G4IntersectionSolid
|
||||
and G4SubtractionSolid. It now temporarly returns a NULL pointer.
|
||||
Visualisation of Boolean solids is therefore temporarly disabled, pending
|
||||
a definitive fix in graphics_reps.
|
||||
Files G4UnionSolid.cc, G4SubtractionSolid.cc and G4IntersectionSolid.cc
|
||||
are included in the branch-tag "boolean_nopoly_branch".
|
||||
|
||||
Apr 27 2000 Gabriele Cosmo
|
||||
|
||||
- Reorganised comments for the Software Reference Manual.
|
||||
- Added CVS headers and standard G4 header where missing.
|
||||
|
||||
Apr 11 2000 John Allison
|
||||
|
||||
- CreatePolyhedron implemented for BooleanSolids.
|
||||
- G4DisplacedSolid: reversed implementation of GetFrameRotation and
|
||||
GetObjectRotation, removing inappropriate invertion.
|
||||
- G4DisplacedSolid::GetConstituentMovedSolid() made const.
|
||||
|
||||
Jan 19 2000 Gabriele Cosmo geom-solid-bool-V01-00-00
|
||||
|
||||
- Syncronized file versions with HEAD (essentially CVS headers changes)
|
||||
- Fixed cases of G4std::min which were not migrated on the HEAD in files:
|
||||
|
||||
@@ -1,11 +1,24 @@
|
||||
// Class Description
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4BooleanSolid.hh,v 1.3 2000/04/27 09:59:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// class G4BooleanSolid
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Abstract base class for solids created by boolean operations
|
||||
// between other solids
|
||||
// between other solids.
|
||||
|
||||
// History:
|
||||
//
|
||||
// 10.09.98 V.Grichine, creation according J. Apostolakis's recommendations
|
||||
// 10.09.98 V.Grichine, creation according J. Apostolakis's recommendations.
|
||||
|
||||
|
||||
#ifndef G4BOOLEANSOLID_HH
|
||||
@@ -19,41 +32,42 @@
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
|
||||
|
||||
class G4BooleanSolid: public G4VSolid
|
||||
class G4BooleanSolid : public G4VSolid
|
||||
{
|
||||
public: // With Description
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
public: // with description
|
||||
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
G4BooleanSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
|
||||
virtual ~G4BooleanSolid() ;
|
||||
virtual ~G4BooleanSolid() ;
|
||||
|
||||
public: // With Description
|
||||
// If Solid is made up from a Boolean operation of two solids,
|
||||
// return the corresponding solid (for no=0 and 1)
|
||||
// If the solid is not a "Boolean", return 0
|
||||
virtual const G4VSolid* GetConstituentSolid(G4int no) const;
|
||||
virtual G4VSolid* GetConstituentSolid(G4int no);
|
||||
// If Solid is made up from a Boolean operation of two solids,
|
||||
// return the corresponding solid (for no=0 and 1)
|
||||
// If the solid is not a "Boolean", return 0.
|
||||
|
||||
protected:
|
||||
G4VSolid* fPtrSolidA ;
|
||||
G4VSolid* fPtrSolidB ;
|
||||
protected:
|
||||
|
||||
G4VSolid* fPtrSolidA ;
|
||||
G4VSolid* fPtrSolidB ;
|
||||
|
||||
private:
|
||||
G4bool createdDisplacedSolid; // If & only if this object
|
||||
// created it, it must delete it
|
||||
private:
|
||||
|
||||
G4bool createdDisplacedSolid;
|
||||
// If & only if this object created it, it must delete it
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
// Class description
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// A displaced solid is a solid that has been shifted from its original
|
||||
// frame of reference to a new one. It is meant to be used only for
|
||||
// simplifying the implementation of "Boolean solids".
|
||||
// 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: G4DisplacedSolid.hh,v 1.7 2000/04/27 09:59:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// class G4DisplacedSolid
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// A displaced solid is a solid that has been shifted from its original
|
||||
// frame of reference to a new one. It is meant to be used only for
|
||||
// simplifying the implementation of "Boolean solids".
|
||||
|
||||
// History:
|
||||
//
|
||||
// 28.10.98 V.Grichine, creation according J. Apostolakis's recommendations
|
||||
@@ -17,36 +30,36 @@
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
|
||||
class G4DisplacedSolid : public G4VSolid
|
||||
class G4DisplacedSolid : public G4VSolid
|
||||
{
|
||||
public: // With description
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
public: // with description
|
||||
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
const G4Transform3D& transform ) ;
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
|
||||
public:
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
const G4AffineTransform directTransform );
|
||||
// For use in instantiating a transient instance from a persistent one:
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
const G4Transform3D& transform ) ;
|
||||
|
||||
public: // With description
|
||||
virtual ~G4DisplacedSolid() ;
|
||||
//
|
||||
// It also has all the methods that a solid requires, eg.
|
||||
EInside Inside( const G4ThreeVector& p ) const ;
|
||||
G4DisplacedSolid( const G4String& pName,
|
||||
G4VSolid* pSolid ,
|
||||
const G4AffineTransform directTransform );
|
||||
// For use in instantiating a transient instance from a persistent one.
|
||||
|
||||
public:
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
|
||||
virtual ~G4DisplacedSolid() ;
|
||||
|
||||
public: // without description
|
||||
|
||||
// It also has all the methods that a solid requires, eg.
|
||||
|
||||
EInside Inside( const G4ThreeVector& p ) const ;
|
||||
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
|
||||
G4ThreeVector SurfaceNormal( const G4ThreeVector& p ) const ;
|
||||
|
||||
@@ -68,43 +81,46 @@ public:
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep ) ;
|
||||
|
||||
public: // With description
|
||||
public: // with description
|
||||
|
||||
virtual G4GeometryType GetEntityType() const
|
||||
{ return G4String("G4DisplacedSolid"); }
|
||||
virtual G4GeometryType GetEntityType() const;
|
||||
|
||||
// If the Solid is a "G4DisplacedSolid", return a self pointer
|
||||
// else return 0
|
||||
virtual const G4DisplacedSolid* GetDisplacedSolidPtr() const ;
|
||||
virtual G4DisplacedSolid* GetDisplacedSolidPtr();
|
||||
// If the Solid is a "G4DisplacedSolid",
|
||||
// return a self pointer else return 0.
|
||||
|
||||
// Access methods
|
||||
G4VSolid* GetConstituentMovedSolid();
|
||||
G4VSolid* GetConstituentMovedSolid() const;
|
||||
G4AffineTransform GetTransform() const;
|
||||
G4AffineTransform GetDirectTransform() const;
|
||||
|
||||
// Get the rotation/translation, as applied to the frame of reference
|
||||
// Access methods.
|
||||
|
||||
G4RotationMatrix GetFrameRotation() const;
|
||||
G4ThreeVector GetFrameTranslation() const;
|
||||
// Get the rotation/translation, as applied to the frame of reference.
|
||||
|
||||
// Get the rotation/translation, as applied to the object
|
||||
G4RotationMatrix GetObjectRotation() const;
|
||||
G4ThreeVector GetObjectTranslation() const;
|
||||
// Get the rotation/translation, as applied to the object.
|
||||
|
||||
public: // without description
|
||||
|
||||
public:
|
||||
// For creating graphical representations (ie for visualisation)
|
||||
void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
|
||||
G4VisExtent GetExtent () const ;
|
||||
G4Polyhedron* CreatePolyhedron () const ;
|
||||
G4NURBS* CreateNURBS () const ;
|
||||
// For creating graphical representations (ie for visualisation).
|
||||
|
||||
protected:
|
||||
G4VSolid* fPtrSolid ;
|
||||
G4AffineTransform* fPtrTransform ;
|
||||
G4AffineTransform* fDirectTransform ;
|
||||
protected:
|
||||
|
||||
G4VSolid* fPtrSolid ;
|
||||
G4AffineTransform* fPtrTransform ;
|
||||
G4AffineTransform* fDirectTransform ;
|
||||
|
||||
private:
|
||||
|
||||
} ;
|
||||
|
||||
inline G4GeometryType G4DisplacedSolid::GetEntityType() const
|
||||
{
|
||||
return G4String("G4DisplacedSolid");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
// Class for description of intersection of two CSG solids
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4IntersectionSolid.hh,v 1.3 2000/04/27 09:59:36 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// class G4IntersectionSolid
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Class for description of intersection of two CSG solids.
|
||||
|
||||
// History:
|
||||
//
|
||||
// 12.09.98 V. Grichine, initial design according to J.Apostolakis's
|
||||
@@ -11,38 +26,41 @@
|
||||
|
||||
#include "G4BooleanSolid.hh"
|
||||
#include "G4VSolid.hh"
|
||||
// #include "G4PlacedSolid.hh"
|
||||
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
|
||||
class G4IntersectionSolid: public G4BooleanSolid
|
||||
class G4IntersectionSolid : public G4BooleanSolid
|
||||
{
|
||||
public:
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
public: // with description
|
||||
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
const G4Transform3D& transform ) ;
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
|
||||
virtual ~G4IntersectionSolid() ;
|
||||
G4IntersectionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB,
|
||||
const G4Transform3D& transform ) ;
|
||||
|
||||
virtual ~G4IntersectionSolid() ;
|
||||
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
virtual G4GeometryType GetEntityType() const;
|
||||
|
||||
public: // without description
|
||||
|
||||
G4bool CalculateExtent( const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
|
||||
EInside Inside( const G4ThreeVector& p ) const ;
|
||||
|
||||
@@ -66,19 +84,16 @@ public:
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep ) ;
|
||||
|
||||
virtual G4GeometryType GetEntityType() const
|
||||
{ return G4String("G4IntersectionSolid"); }
|
||||
|
||||
void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
|
||||
G4VisExtent GetExtent () const ;
|
||||
G4Polyhedron* CreatePolyhedron () const ;
|
||||
G4NURBS* CreateNURBS () const ;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
} ;
|
||||
|
||||
inline G4GeometryType G4IntersectionSolid::GetEntityType() const
|
||||
{
|
||||
return G4String("G4IntersectionSolid");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,16 +1,30 @@
|
||||
// Class for description of subtraction of two CSG solids: A - B !!!
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4SubtractionSolid.hh,v 1.3 2000/04/27 09:59:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// class G4SubtractionSolid
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Class for description of subtraction of two CSG solids: A - B.
|
||||
|
||||
// History:
|
||||
//
|
||||
// 14.10.98 V.Grichine - first implementation
|
||||
//
|
||||
// 14.10.98 V.Grichine - first implementation.
|
||||
|
||||
|
||||
#ifndef G4SUBTRACTIONSOLID_HH
|
||||
#define G4SUBTRACTIONSOLID_HH
|
||||
|
||||
#include "G4BooleanSolid.hh"
|
||||
#include "G4VSolid.hh"
|
||||
// #include "G4PlacedSolid.hh"
|
||||
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
@@ -18,29 +32,32 @@
|
||||
#include "G4AffineTransform.hh"
|
||||
|
||||
|
||||
|
||||
class G4SubtractionSolid: public G4BooleanSolid
|
||||
class G4SubtractionSolid : public G4BooleanSolid
|
||||
{
|
||||
public:
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
public: // with description
|
||||
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
|
||||
virtual ~G4SubtractionSolid() ;
|
||||
G4SubtractionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
|
||||
virtual ~G4SubtractionSolid() ;
|
||||
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
virtual G4GeometryType GetEntityType() const ;
|
||||
|
||||
public: // without description
|
||||
|
||||
G4bool CalculateExtent( const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
@@ -67,19 +84,16 @@ public:
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep ) ;
|
||||
|
||||
virtual G4GeometryType GetEntityType() const
|
||||
{ return G4String("G4SubtractionSolid"); }
|
||||
|
||||
void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
|
||||
G4VisExtent GetExtent () const ;
|
||||
G4Polyhedron* CreatePolyhedron () const ;
|
||||
G4NURBS* CreateNURBS () const ;
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
} ;
|
||||
inline G4GeometryType G4SubtractionSolid::GetEntityType() const
|
||||
{
|
||||
return G4String("G4SubtractionSolid");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,47 +1,64 @@
|
||||
// Class for description of intersection of two CSG solids
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4UnionSolid.hh,v 1.4 2000/04/27 09:59:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// class G4UnionSolid
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Class for description of union of two CSG solids.
|
||||
|
||||
// History:
|
||||
//
|
||||
// 12.09.98 V.Grichine
|
||||
//
|
||||
// 12.09.98 V.Grichine, created.
|
||||
|
||||
#ifndef G4UNIONSOLID_HH
|
||||
#define G4UNIONSOLID_HH
|
||||
|
||||
#include "G4BooleanSolid.hh"
|
||||
#include "G4VSolid.hh"
|
||||
// #include "G4PlacedSolid.hh"
|
||||
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
|
||||
class G4UnionSolid: public G4BooleanSolid
|
||||
class G4UnionSolid : public G4BooleanSolid
|
||||
{
|
||||
public:
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
public: // with description
|
||||
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ) ;
|
||||
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
G4RotationMatrix* rotMatrix,
|
||||
const G4ThreeVector& transVector ) ;
|
||||
|
||||
virtual ~G4UnionSolid() ;
|
||||
G4UnionSolid( const G4String& pName,
|
||||
G4VSolid* pSolidA ,
|
||||
G4VSolid* pSolidB ,
|
||||
const G4Transform3D& transform ) ;
|
||||
|
||||
virtual ~G4UnionSolid() ;
|
||||
|
||||
G4bool CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
virtual G4GeometryType GetEntityType() const ;
|
||||
|
||||
public: // without description
|
||||
|
||||
G4bool CalculateExtent( const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const ;
|
||||
|
||||
EInside Inside( const G4ThreeVector& p ) const ;
|
||||
|
||||
@@ -65,19 +82,16 @@ public:
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep ) ;
|
||||
|
||||
virtual G4GeometryType GetEntityType() const
|
||||
{ return G4String("G4UnionSolid"); }
|
||||
|
||||
void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
|
||||
G4VisExtent GetExtent () const ;
|
||||
G4Polyhedron* CreatePolyhedron () const ;
|
||||
G4NURBS* CreateNURBS () const ;
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
} ;
|
||||
inline G4GeometryType G4UnionSolid::GetEntityType() const
|
||||
{
|
||||
return G4String("G4UnionSolid");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4BooleanSolid.cc,v 1.3 2000/04/27 09:59:39 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// Implementation for the abstract base class for solids created by boolean
|
||||
// operations between other solids
|
||||
//
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4DisplacedSolid.cc,v 1.11 2000/04/27 09:59:39 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// Implementation for G4DisplacedSolid class for boolean
|
||||
// operations between other solids
|
||||
//
|
||||
@@ -18,7 +28,6 @@
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBSbox.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -87,7 +96,7 @@ const G4DisplacedSolid* G4DisplacedSolid::GetDisplacedSolidPtr() const
|
||||
G4DisplacedSolid* G4DisplacedSolid::GetDisplacedSolidPtr()
|
||||
{ return this; }
|
||||
|
||||
G4VSolid* G4DisplacedSolid::GetConstituentMovedSolid()
|
||||
G4VSolid* G4DisplacedSolid::GetConstituentMovedSolid() const
|
||||
{ return fPtrSolid; }
|
||||
|
||||
G4AffineTransform G4DisplacedSolid::GetTransform() const
|
||||
@@ -104,8 +113,7 @@ G4AffineTransform G4DisplacedSolid::GetDirectTransform() const
|
||||
|
||||
G4RotationMatrix G4DisplacedSolid::GetFrameRotation() const
|
||||
{
|
||||
G4RotationMatrix InvRotation= fPtrTransform->NetRotation();
|
||||
InvRotation.invert();
|
||||
G4RotationMatrix InvRotation= fDirectTransform->NetRotation();
|
||||
return InvRotation;
|
||||
}
|
||||
|
||||
@@ -117,7 +125,7 @@ G4ThreeVector G4DisplacedSolid::GetFrameTranslation() const
|
||||
///////////////////////////////////////////////////////////////
|
||||
G4RotationMatrix G4DisplacedSolid::GetObjectRotation() const
|
||||
{
|
||||
G4RotationMatrix Rotation= fDirectTransform->NetRotation();
|
||||
G4RotationMatrix Rotation= fPtrTransform->NetRotation();
|
||||
return Rotation;
|
||||
}
|
||||
|
||||
@@ -245,17 +253,7 @@ G4DisplacedSolid::ComputeDimensions( G4VPVParameterisation* p,
|
||||
void
|
||||
G4DisplacedSolid::DescribeYourselfTo ( G4VGraphicsScene& scene ) const
|
||||
{
|
||||
fPtrSolid->DescribeYourselfTo(scene) ;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
G4VisExtent
|
||||
G4DisplacedSolid::GetExtent () const
|
||||
{
|
||||
return fPtrSolid->GetExtent() ;
|
||||
scene.AddThis (*this);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@@ -265,7 +263,10 @@ G4DisplacedSolid::GetExtent () const
|
||||
G4Polyhedron*
|
||||
G4DisplacedSolid::CreatePolyhedron () const
|
||||
{
|
||||
return fPtrSolid->CreatePolyhedron() ;
|
||||
G4Polyhedron* polyhedron = fPtrSolid->CreatePolyhedron();
|
||||
polyhedron->Transform
|
||||
(G4Transform3D(GetObjectRotation(),GetObjectTranslation()));
|
||||
return polyhedron;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
@@ -275,10 +276,7 @@ G4DisplacedSolid::CreatePolyhedron () const
|
||||
G4NURBS*
|
||||
G4DisplacedSolid::CreateNURBS () const
|
||||
{
|
||||
return fPtrSolid->CreateNURBS() ;
|
||||
// Take into account local transformation - see CreatePolyhedron.
|
||||
// return fPtrSolid->CreateNURBS() ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4IntersectionSolid.cc,v 1.8 2000/06/24 14:27:41 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// Implementation of methods for the class G4IntersectionSolid
|
||||
//
|
||||
// History:
|
||||
@@ -20,7 +30,6 @@
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBSbox.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -123,7 +132,6 @@ EInside G4IntersectionSolid::Inside(const G4ThreeVector& p) const
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
G4ThreeVector
|
||||
G4IntersectionSolid::SurfaceNormal( const G4ThreeVector& p ) const
|
||||
@@ -335,13 +343,36 @@ G4IntersectionSolid::DistanceToOut( const G4ThreeVector& p,
|
||||
G4bool *validNorm,
|
||||
G4ThreeVector *n ) const
|
||||
{
|
||||
G4bool validNormA, validNormB;
|
||||
G4ThreeVector nA, nB;
|
||||
|
||||
if( Inside(p) == kOutside )
|
||||
{
|
||||
G4cout << "Position:" << G4endl << G4endl;
|
||||
G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl;
|
||||
G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl;
|
||||
G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl;
|
||||
G4cout << "Direction:" << G4endl << G4endl;
|
||||
G4cout << "v.x() = " << v.x() << G4endl;
|
||||
G4cout << "v.y() = " << v.y() << G4endl;
|
||||
G4cout << "v.z() = " << v.z() << G4endl << G4endl;
|
||||
G4Exception("Invalid call in G4IntersectionSolid::DistanceToOut(p,v), point p is outside") ;
|
||||
}
|
||||
G4double distA = fPtrSolidA->DistanceToOut(p,v,calcNorm,validNorm,n) ;
|
||||
G4double distB = fPtrSolidB->DistanceToOut(p,v,calcNorm,validNorm,n) ;
|
||||
G4double distA = fPtrSolidA->DistanceToOut(p,v,calcNorm,&validNormA,&nA) ;
|
||||
G4double distB = fPtrSolidB->DistanceToOut(p,v,calcNorm,&validNormB,&nB) ;
|
||||
|
||||
G4double dist = G4std::min(distA,distB) ;
|
||||
|
||||
if( calcNorm ){
|
||||
if (distA < distB ) {
|
||||
*validNorm = validNormA;
|
||||
*n = nA;
|
||||
}else{
|
||||
*validNorm = validNormB;
|
||||
*n = nB;
|
||||
}
|
||||
}
|
||||
|
||||
return dist ;
|
||||
// return G4std::min(fPtrSolidA->DistanceToOut(p,v,calcNorm,validNorm,n),
|
||||
// fPtrSolidB->DistanceToOut(p,v,calcNorm,validNorm,n) ) ;
|
||||
@@ -384,17 +415,7 @@ G4IntersectionSolid::ComputeDimensions( G4VPVParameterisation* p,
|
||||
void
|
||||
G4IntersectionSolid::DescribeYourselfTo ( G4VGraphicsScene& scene ) const
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
G4VisExtent
|
||||
G4IntersectionSolid::GetExtent () const
|
||||
{
|
||||
return G4VisExtent(-1.0,1.0,-1.0,1.0,-1.0,1.0) ;
|
||||
scene.AddThis (*this);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@@ -404,7 +425,12 @@ G4IntersectionSolid::GetExtent () const
|
||||
G4Polyhedron*
|
||||
G4IntersectionSolid::CreatePolyhedron () const
|
||||
{
|
||||
return new G4PolyhedronBox (1.0, 1.0, 1.0);
|
||||
G4Polyhedron* pA = fPtrSolidA->CreatePolyhedron();
|
||||
G4Polyhedron* pB = fPtrSolidB->CreatePolyhedron();
|
||||
G4Polyhedron* resultant = new G4Polyhedron (pA->intersect(*pB));
|
||||
delete pB;
|
||||
delete pA;
|
||||
return resultant;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
@@ -414,10 +440,7 @@ G4IntersectionSolid::CreatePolyhedron () const
|
||||
G4NURBS*
|
||||
G4IntersectionSolid::CreateNURBS () const
|
||||
{
|
||||
return new G4NURBSbox (1.0, 1.0, 1.0);
|
||||
// Take into account boolean operation - see CreatePolyhedron.
|
||||
// return new G4NURBSbox (1.0, 1.0, 1.0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4SubtractionSolid.cc,v 1.8 2000/06/26 16:16:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// Implementation of methods for the class G4IntersectionSolid
|
||||
//
|
||||
// History:
|
||||
@@ -24,7 +34,6 @@
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBSbox.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -268,7 +277,15 @@ G4SubtractionSolid::DistanceToOut( const G4ThreeVector& p,
|
||||
{
|
||||
if( Inside(p) == kOutside )
|
||||
{
|
||||
G4Exception("Invalid call in G4IntersectionSolid::DistanceToOut(p,v), point p is outside") ;
|
||||
G4cout << "Position:" << G4endl << G4endl;
|
||||
G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl;
|
||||
G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl;
|
||||
G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl;
|
||||
G4cout << "Direction:" << G4endl << G4endl;
|
||||
G4cout << "v.x() = " << v.x() << G4endl;
|
||||
G4cout << "v.y() = " << v.y() << G4endl;
|
||||
G4cout << "v.z() = " << v.z() << G4endl << G4endl;
|
||||
G4Exception("Invalid call in G4IntersectionSolid::DistanceToOut(p,v), point p is outside") ;
|
||||
}
|
||||
|
||||
G4double distout;
|
||||
@@ -286,7 +303,6 @@ G4SubtractionSolid::DistanceToOut( const G4ThreeVector& p,
|
||||
else
|
||||
{
|
||||
distout= distA ;
|
||||
*validNorm = true ;
|
||||
}
|
||||
return distout;
|
||||
}
|
||||
@@ -331,17 +347,7 @@ G4SubtractionSolid::ComputeDimensions( G4VPVParameterisation* p,
|
||||
void
|
||||
G4SubtractionSolid::DescribeYourselfTo ( G4VGraphicsScene& scene ) const
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
G4VisExtent
|
||||
G4SubtractionSolid::GetExtent () const
|
||||
{
|
||||
return G4VisExtent(-1.0,1.0,-1.0,1.0,-1.0,1.0) ;
|
||||
scene.AddThis (*this);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@@ -351,7 +357,12 @@ G4SubtractionSolid::GetExtent () const
|
||||
G4Polyhedron*
|
||||
G4SubtractionSolid::CreatePolyhedron () const
|
||||
{
|
||||
return new G4PolyhedronBox (1.0, 1.0, 1.0);
|
||||
G4Polyhedron* pA = fPtrSolidA->CreatePolyhedron();
|
||||
G4Polyhedron* pB = fPtrSolidB->CreatePolyhedron();
|
||||
G4Polyhedron* resultant = new G4Polyhedron (pA->subtract(*pB));
|
||||
delete pB;
|
||||
delete pA;
|
||||
return resultant;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
@@ -361,10 +372,7 @@ G4SubtractionSolid::CreatePolyhedron () const
|
||||
G4NURBS*
|
||||
G4SubtractionSolid::CreateNURBS () const
|
||||
{
|
||||
return new G4NURBSbox (1.0, 1.0, 1.0);
|
||||
// Take into account boolean operation - see CreatePolyhedron.
|
||||
// return new G4NURBSbox (1.0, 1.0, 1.0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
// 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.
|
||||
//
|
||||
// $Id: G4UnionSolid.cc,v 1.9 2000/06/24 14:27:42 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// Implementation of methods for the class G4IntersectionSolid
|
||||
//
|
||||
// History:
|
||||
@@ -22,7 +32,6 @@
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBSbox.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -208,6 +217,14 @@ G4UnionSolid::DistanceToOut( const G4ThreeVector& p,
|
||||
|
||||
if( Inside(p) == kOutside )
|
||||
{
|
||||
G4cout << "Position:" << G4endl << G4endl;
|
||||
G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl;
|
||||
G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl;
|
||||
G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl;
|
||||
G4cout << "Direction:" << G4endl << G4endl;
|
||||
G4cout << "v.x() = " << v.x() << G4endl;
|
||||
G4cout << "v.y() = " << v.y() << G4endl;
|
||||
G4cout << "v.z() = " << v.z() << G4endl << G4endl;
|
||||
G4Exception("Invalid call in G4IntersectionSolid::DistanceToOut(p,v), point p is outside") ;
|
||||
}
|
||||
else
|
||||
@@ -256,7 +273,9 @@ G4UnionSolid::DistanceToOut( const G4ThreeVector& p,
|
||||
*n = *nTmp ;
|
||||
}
|
||||
}
|
||||
*validNorm = false ;
|
||||
if( calcNorm )
|
||||
*validNorm = false ;
|
||||
|
||||
return dist ;
|
||||
}
|
||||
|
||||
@@ -321,17 +340,7 @@ G4UnionSolid::ComputeDimensions( G4VPVParameterisation* p,
|
||||
void
|
||||
G4UnionSolid::DescribeYourselfTo ( G4VGraphicsScene& scene ) const
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
|
||||
G4VisExtent
|
||||
G4UnionSolid::GetExtent () const
|
||||
{
|
||||
return G4VisExtent(-1.0,1.0,-1.0,1.0,-1.0,1.0) ;
|
||||
scene.AddThis (*this);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@@ -341,7 +350,12 @@ G4UnionSolid::GetExtent () const
|
||||
G4Polyhedron*
|
||||
G4UnionSolid::CreatePolyhedron () const
|
||||
{
|
||||
return new G4PolyhedronBox (1.0, 1.0, 1.0);
|
||||
G4Polyhedron* pA = fPtrSolidA->CreatePolyhedron();
|
||||
G4Polyhedron* pB = fPtrSolidB->CreatePolyhedron();
|
||||
G4Polyhedron* resultant = new G4Polyhedron (pA->add(*pB));
|
||||
delete pB;
|
||||
delete pA;
|
||||
return resultant;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
@@ -351,10 +365,7 @@ G4UnionSolid::CreatePolyhedron () const
|
||||
G4NURBS*
|
||||
G4UnionSolid::CreateNURBS () const
|
||||
{
|
||||
return new G4NURBSbox (1.0, 1.0, 1.0);
|
||||
// Take into account boolean operation - see CreatePolyhedron.
|
||||
// return new G4NURBSbox (1.0, 1.0, 1.0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.11 2000/03/03 12:24:06 gcosmo Exp $
|
||||
$Id: History,v 1.19 2000/06/22 15:24:25 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,70 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Jun 22, 00 V. Grichine geom-solids-csg-V01-01-04
|
||||
- G4Box.cc:
|
||||
o added safety against call from outside in DistanceToOut(p)
|
||||
o added more diagnostics before exception in DistanceToOut(p,v,...)
|
||||
o cosmetics changes
|
||||
- G4Torus[.hh.cc]:
|
||||
o added new alternative functions SolveBiQuadratic/CubicNew.
|
||||
o fix in SolveBiQuadratic() for ambiguous expression in looping index
|
||||
detected by Insure++.
|
||||
- Updated unit tests testG4Torus and testG4Trd.
|
||||
|
||||
May 17, 00 V. Grichine geom-solids-csg-V01-01-03
|
||||
|
||||
- G4Tubs.cc:
|
||||
o introduced fix in DistanceToOut(p,v,...) in computation of xi, yi for
|
||||
(sphi >= -0.5*kCarTolerance). This fixes problem reports #76 and #91.
|
||||
o added more diagnostics in case of invalid enum for DistanceToOut.
|
||||
- Updated unit test for G4Tubs.
|
||||
|
||||
May 05, 00 V. Grichine geom-solids-csg-V01-01-02
|
||||
|
||||
- G4Box.cc, G4Trd.cc:
|
||||
o modified DistanceToIn(p,v) to return 0 distance in case computed
|
||||
value is less than 0.5*kCarTolerance.
|
||||
o Cosmetic changes.
|
||||
- Updated unit tests for G4Box and G4Trd.
|
||||
|
||||
Apr 11, 00 J. Allison
|
||||
|
||||
- Removed implementations of GetExtent in most sub-classes of G4VSolid (a
|
||||
default implementation exists in G4VSolid).
|
||||
- All implementations of DescribeYourselfTo (G4VGraphicsScene& scene) const
|
||||
now correctly written: scene.AddThis(*this).
|
||||
|
||||
Apr 05, 00 G. Cosmo geom-solids-csg-V01-01-01
|
||||
- G4Tubs.cc: fixed bug in function Inside(p).
|
||||
Removed (commented) in the code umproper addition of 2PI
|
||||
to Phi-angle particle (V.Grichine)
|
||||
- G4Hype[.hh.cc]: fixed several longstanding issues and bring methods
|
||||
into compliance with specifications (D.Williams)
|
||||
- Moved to "specific" the following classes:
|
||||
G4ClippablePolygon, G4EnclosingCylinder, G4Hype, G4PolyPhiFace,
|
||||
G4Polycone, G4PolyconeSide, G4Polyhedra, G4PolyhedraSide,
|
||||
G4ReduciblePolygon, G4IntersectingCone, G4SolidExtentList,
|
||||
G4VCSGface, G4VCSGfaceted.
|
||||
- Moved testG4Hype.cc and testG4Polycone.cc from CSG/test to
|
||||
specific/test
|
||||
- Moved generic tests "SBT" and "Fred" one level up to solids/test.
|
||||
- Organised class description comments for the Software Reference Manual
|
||||
in all headers.
|
||||
|
||||
Mar 23, 00 G. Cosmo geom-solids-csg-V01-01-00
|
||||
- Tagged.
|
||||
|
||||
Mar 22, 00 D. Williams
|
||||
- G4PolyhedraSide.cc: fixed bug in G4PolyhedraSide::Normal(...).
|
||||
The method Normal(...) (used by G4VCSGfaceted::SurfaceNormal) was not
|
||||
filling in the argument bestDistance. This fixes a bug observed in
|
||||
G4Polyhedra::SurfaceNormal.
|
||||
|
||||
Mar 14, 00 V. Grichine
|
||||
- Added diagnostics in G4Cons, G4Sphere and G4Torus in function
|
||||
DistanceToOut(p,v,...).
|
||||
|
||||
Mar 03, 00 G. Cosmo geom-solids-csg-V01-00-05
|
||||
- Minor fixes to unit tests to make them up-to-date with recent
|
||||
development versions (already included in tag geometry-V01-00-00a).
|
||||
@@ -24,7 +88,6 @@ Mar 03, 00 G. Cosmo geom-solids-csg-V01-00-05
|
||||
to avoid warnings on Linux.
|
||||
|
||||
Jan 19, 00 G. Cosmo geom-solids-csg-01-00-04
|
||||
|
||||
- Fixed bug in DistanceToIn(p,v). Modified files: G4Trap.cc and
|
||||
testG4Trap.cc. (V.Grichine)
|
||||
- Syncronized file versions with HEAD (essentially CVS headers changes).
|
||||
@@ -32,39 +95,27 @@ Jan 19, 00 G. Cosmo geom-solids-csg-01-00-04
|
||||
and test/SBT.
|
||||
|
||||
Nov 17, 99 J. Apostolakis geom-solids-csg-01-00-03
|
||||
|
||||
- Tagged
|
||||
|
||||
Nov 17, 99 V. Grichine
|
||||
|
||||
Added initialisation to Eside "side" variable in DistanceToOut(p,v)
|
||||
in CSG solids.
|
||||
--> Problem report from D.C. Williams, BaBaR
|
||||
|
||||
A check in G4Trap Makeplane added.
|
||||
|
||||
|
||||
- Added initialisation to Eside "side" variable in DistanceToOut(p,v)
|
||||
in CSG solids --> Problem report from D.C. Williams, BaBar
|
||||
- A check in G4Trap Makeplane added.
|
||||
|
||||
Nov 10, 99 J. Apostolakis geom-solids-csg-01-00-02-cand
|
||||
|
||||
- Included David Williams' modifications to
|
||||
G4IntersectingCone.cc, G4PolyconeSide.cc and G4VCSGfaceted.cc
|
||||
|
||||
and to test/SBT/SBT.cc and test/SBT/polycone.geant4
|
||||
|
||||
- Included David Williams' modifications to
|
||||
G4IntersectingCone.cc, G4PolyconeSide.cc and G4VCSGfaceted.cc
|
||||
and to test/SBT/SBT.cc and test/SBT/polycone.geant4
|
||||
|
||||
Nov 10, 99 J. Apostolakis geom-solids-csg-01-00-01
|
||||
- Tagged
|
||||
|
||||
- Tagged
|
||||
May 18, 99 David Williams
|
||||
- Replaced 1/DBL_MAX with DBL_MIN (valid correction, seen in tests for STL)
|
||||
in G4PolyPhiFace.cc, G4PolyconeSide.cc and G4PolyhedraSide.cc
|
||||
|
||||
|
||||
May 18, 99 David Wiliams
|
||||
Replaced 1/DBL_MAX with DBL_MIN (valid correction, seen in tests for STL)
|
||||
in G4PolyPhiFace.cc, G4PolyconeSide.cc and G4PolyhedraSide.cc
|
||||
|
||||
Apr 29, 99 David Wiliams
|
||||
|
||||
G4Polyhedra and G4Polycone (and G4VCSGfaceted) modified:
|
||||
Apr 29, 99 David Williams
|
||||
- G4Polyhedra and G4Polycone (and G4VCSGfaceted) modified:
|
||||
1. Implemented correct copy constructors and assignment operators.
|
||||
2. Fix some leaks for tracks that pass exactly through an edge.
|
||||
Some leaks still remain: particularly if a track passes through
|
||||
@@ -72,41 +123,33 @@ Apr 29, 99 David Wiliams
|
||||
3. G4Polyhedra argument numSide changed to G4int (from G4double)
|
||||
|
||||
Apr 13, 99 Vladimir Grichine and Simone Giani
|
||||
|
||||
Minor consistency fix to 8 basic CSG solids:
|
||||
Tolerance used in calculation of extent but not in one place, and not another
|
||||
- this tripped up the client code.
|
||||
- Minor consistency fix to 8 basic CSG solids:
|
||||
Tolerance used in calculation of extent but not in one place,
|
||||
and not another - this tripped up the client code.
|
||||
|
||||
Feb 16, 99 David Williams
|
||||
|
||||
Repaired bugs in G4Polycone (G4PolyconeSide.cc) as found in
|
||||
test/testG4Polycone and missed in below.
|
||||
|
||||
Updated definition of DistanceToIn(p) and DistanceToOut(p) to
|
||||
return zero when the point p is on the surface of the solid.
|
||||
- Repaired bugs in G4Polycone (G4PolyconeSide.cc) as found in
|
||||
test/testG4Polycone and missed in below.
|
||||
- Updated definition of DistanceToIn(p) and DistanceToOut(p) to
|
||||
return zero when the point p is on the surface of the solid.
|
||||
|
||||
Feb 12, 99 David Williams
|
||||
|
||||
src/G4PolyconeSide.cc updated (revision 1.4) to fix a bug discovered by
|
||||
test/testG4Polycone.
|
||||
- src/G4PolyconeSide.cc updated (revision 1.4) to fix a bug discovered by
|
||||
test/testG4Polycone.
|
||||
|
||||
Feb 9, 99 David C. Williams (davidw@scipp.ucsc.edu)
|
||||
|
||||
I've committed new versions of the CSG Polycone and Polyhedra in the
|
||||
geant4 repository, including a new utility class called
|
||||
G4ReduciblePolygon. The new versions fix several subtle bugs which my
|
||||
"test3" batch geometry testing code uncovered. In addition, the new class
|
||||
G4ReduciblePolygon is used to run strict tests on the validity of input
|
||||
parameters.
|
||||
- I've committed new versions of the CSG Polycone and Polyhedra in the
|
||||
geant4 repository, including a new utility class called
|
||||
G4ReduciblePolygon. The new versions fix several subtle bugs which my
|
||||
"test3" batch geometry testing code uncovered. In addition, the new class
|
||||
G4ReduciblePolygon is used to run strict tests on the validity of input
|
||||
parameters.
|
||||
To fix a bug in Polyhedra, I had to back out some fancy code that
|
||||
allowed it to calculate intersections at a speed that was independent of
|
||||
the number of sides. The new version now runs at a speed proportional to
|
||||
the number of sides, and is thus much slower for polyhedras with many
|
||||
sides. I can fix this, but I thought it would be best to get the bug fixes
|
||||
in as soon as possible.
|
||||
allowed it to calculate intersections at a speed that was independent of
|
||||
the number of sides. The new version now runs at a speed proportional to
|
||||
the number of sides, and is thus much slower for polyhedras with many
|
||||
sides. I can fix this, but I thought it would be best to get the bug fixes
|
||||
in as soon as possible.
|
||||
|
||||
|
||||
Feb 10, 99 John Apostolakis
|
||||
|
||||
History file created.
|
||||
|
||||
Feb 10, 99 John Apostolakis
|
||||
- History file created.
|
||||
|
||||
@@ -5,41 +5,47 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Box.hh,v 1.3 1999/12/15 14:50:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4Box.hh,v 1.4 2000/04/07 12:55:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
//
|
||||
// class G4Box
|
||||
// G4Box
|
||||
//
|
||||
// A Box is a cuboid of given half lengths dx,dy,dz. The Box is
|
||||
// centred on the origin with sides parallel to the x/y/z axes.
|
||||
// Class description:
|
||||
//
|
||||
// Member functions:
|
||||
// A Box is a cuboid of given half lengths dx,dy,dz. The Box is
|
||||
// centred on the origin with sides parallel to the x/y/z axes.
|
||||
//
|
||||
// As inherited from G4CSGSolid +
|
||||
// Member functions:
|
||||
//
|
||||
// G4Box(const G4String& pName, G4double pX,
|
||||
// G4double pY, G4double pZ)
|
||||
// Construct a box with name, and half lengths pX,pY,pZ
|
||||
// As inherited from G4CSGSolid +
|
||||
//
|
||||
// G4double GetXHalfLength() const
|
||||
// G4double GetYHalfLength() const
|
||||
// G4double GetZHalfLength() const
|
||||
// G4Box(const G4String& pName, G4double pX,
|
||||
// G4double pY, G4double pZ)
|
||||
//
|
||||
// Return the respective parameter
|
||||
// - Construct a box with name, and half lengths pX,pY,pZ
|
||||
//
|
||||
// Protected:
|
||||
// G4double GetXHalfLength() const
|
||||
// G4double GetYHalfLength() const
|
||||
// G4double GetZHalfLength() const
|
||||
//
|
||||
// - Return the respective parameter
|
||||
//
|
||||
// Protected:
|
||||
//
|
||||
// G4ThreeVectorList*
|
||||
// CreateRotatedVertices(const G4AffineTransform& pTransform) const
|
||||
// G4ThreeVectorList*
|
||||
// CreateRotatedVertices(const G4AffineTransform& pTransform) const
|
||||
//
|
||||
// Create the List of transformed vertices in the format required
|
||||
// for G4VSolid:: ClipCrossSection and ClipBetweenSections.
|
||||
// - Create the List of transformed vertices in the format required
|
||||
// for G4VSolid:: ClipCrossSection and ClipBetweenSections.
|
||||
//
|
||||
// Member Data: (private)
|
||||
//
|
||||
// fDx,fDy,fDz - The box's half-widths
|
||||
// Member Data: (private)
|
||||
//
|
||||
// fDx,fDy,fDz - The box's half-widths
|
||||
|
||||
// History:
|
||||
// 30.06.95 P.Kent Converted from source code developed end 94
|
||||
// 27.03.96 J.Allison Added virtual functions DescribeYourselfTo and
|
||||
@@ -48,7 +54,7 @@
|
||||
// and SendPolyhedronTo to CreatePolyhedron.
|
||||
// 27.03.98 J.Apostolakis Inherit from G4CSGSolid (not G4VSolid).
|
||||
// 18.11.99 J.Apostolakis, V.Grichine: kUndefined was added to ESide
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#ifndef G4BOX_HH
|
||||
#define G4BOX_HH
|
||||
|
||||
@@ -5,28 +5,35 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4CSGSolid.hh,v 1.2 1999/12/15 14:50:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4CSGSolid.hh,v 1.3 2000/04/07 12:55:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// class G4CSGSolid
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// An abstract class for Constructed Solids. Used primarily to
|
||||
// simplify inheritance tree.
|
||||
// G4CSGSolid
|
||||
//
|
||||
// Member functions:
|
||||
// Class description:
|
||||
//
|
||||
// As inherited from G4VSolid
|
||||
// An abstract class for Constructed Solids.
|
||||
// Used primarily to simplify inheritance tree.
|
||||
//
|
||||
// Member functions:
|
||||
//
|
||||
// As inherited from G4VSolid
|
||||
|
||||
// History:
|
||||
// 27.03.98 J.Apostolakis Created first version.
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#ifndef G4CSGSOLID_HH
|
||||
#define G4CSGSOLID_HH
|
||||
|
||||
#include "G4VSolid.hh"
|
||||
|
||||
class G4CSGSolid : public G4VSolid {
|
||||
class G4CSGSolid : public G4VSolid
|
||||
{
|
||||
public:
|
||||
G4CSGSolid(const G4String& pName);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user