Import Geant4 3.0.0 source tree
This commit is contained in:
@@ -1,3 +1,23 @@
|
||||
// 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: G4SurfaceBoundary.hh,v 1.5 2000/11/08 14:22:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4SurfaceBoundary
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Definition of a surface boundary.
|
||||
|
||||
// Authors: J.Sulkimo, P.Urban.
|
||||
// Revisions by: L.Broglia, G.Cosmo.
|
||||
// ----------------------------------------------------------------------
|
||||
#ifndef included_G4SurfaceBoundary
|
||||
#define included_G4SurfaceBoundary
|
||||
|
||||
@@ -12,92 +32,87 @@
|
||||
class G4Ray;
|
||||
class G4CylindricalSurface;
|
||||
|
||||
class G4SurfaceBoundary {
|
||||
class G4SurfaceBoundary
|
||||
{
|
||||
|
||||
public:
|
||||
public: // with description
|
||||
|
||||
// Initialize with a set of closed curves,
|
||||
// each of which is an (inner or outer) boundary.
|
||||
// no responsibility to delete the curves is taken.
|
||||
// shallow copy of G4Curve-s.
|
||||
|
||||
G4SurfaceBoundary();
|
||||
~G4SurfaceBoundary();
|
||||
// Constructor & destructor.
|
||||
|
||||
void Init(const G4CurveVector& bounds0);
|
||||
// Initializes with a set of closed curves, each of which is an
|
||||
// (inner or outer) boundary. No responsibility to delete the curves
|
||||
// is taken.
|
||||
|
||||
const G4CurveVector& GetBounds() const { return bounds; }
|
||||
|
||||
virtual ~G4SurfaceBoundary();
|
||||
inline const G4CurveVector& GetBounds() const;
|
||||
// Returns closed curve boundaries.
|
||||
|
||||
inline const G4BoundingBox3D& BBox() const;
|
||||
// Returns the bounding-box.
|
||||
|
||||
// projection onto the xy plane after transformation tr
|
||||
// the returned object is allocated dynamically;
|
||||
// it is the caller's responsibility to delete it
|
||||
// in case the projection maps a line into a point,
|
||||
// 0 is returned
|
||||
G4SurfaceBoundary* Project(const G4Transform3D& tr=
|
||||
G4Transform3D::Identity);
|
||||
// Projection onto the xy plane after transformation tr.
|
||||
// The returned object is allocated dynamically; it is the caller's
|
||||
// responsibility to delete it.
|
||||
// In case the projection maps a line into a point, 0 is returned.
|
||||
|
||||
G4SurfaceBoundary* Project(const G4Transform3D& tr=G4Transform3D::Identity);
|
||||
|
||||
|
||||
// intersect a 2D boundary (probably obtained with Project) with a ray.
|
||||
// the ray is projected onto the xy plane.
|
||||
// no intersection: return false
|
||||
// intersection: return true, and set intersection0
|
||||
// the intersection point is ray.start+ray.dir*intersection0
|
||||
//void IntersectRay2D(const G4Ray& ray, G4CurveRayIntersection& is);
|
||||
G4int IntersectRay2D(const G4Ray& ray);
|
||||
|
||||
// tangent vector to a curve at the point with parameter u
|
||||
// true if exists
|
||||
// vector comes into v
|
||||
// Intersects a 2D boundary with a ray. The ray is projected onto the
|
||||
// xy plane. If no intersection 0 is returned, otherwise 1 is returned.
|
||||
// and the intersection set to intersection0.
|
||||
// The intersection point is: ray.start+ray.dir*intersection0.
|
||||
|
||||
G4bool Tangent(G4CurvePoint& cp, G4Vector3D& v);
|
||||
// Tangent vector to a curve at the point with parameter u.
|
||||
// Returns true if exists. The vector is stored in v.
|
||||
|
||||
|
||||
// split a boundary with a plane containing p0 with normal n.
|
||||
// pointers to the resulting boundaries are put into new1 and new2.
|
||||
// it is the caller's responsibility to delete them.
|
||||
public: // without description
|
||||
|
||||
void SplitWithPlane(const G4Point3D& p0,
|
||||
const G4Vector3D& n,
|
||||
G4SurfaceBoundary*& new1,
|
||||
G4SurfaceBoundary*& new2 );
|
||||
|
||||
|
||||
// Splits a boundary with a plane containing p0 with normal n.
|
||||
// Pointers to the resulting boundaries are put into new1 and new2.
|
||||
// It is the caller's responsibility to delete them.
|
||||
// To be implemented yet.
|
||||
|
||||
void SplitWithCylinder(const G4CylindricalSurface& c,
|
||||
G4SurfaceBoundary*& new1,
|
||||
G4SurfaceBoundary*& new2 );
|
||||
G4SurfaceBoundary*& new2 );
|
||||
// Splits a boundary with a cylindrical surface.
|
||||
// Pointers to the resulting boundaries are put into new1 and new2.
|
||||
// It is the caller's responsibility to delete them.
|
||||
// To be implemented yet.
|
||||
|
||||
inline G4int GetNumberOfPoints() const;
|
||||
inline const G4Point3D& GetPoint(G4int Count) const;
|
||||
// Functions probably not used and should be removed in the future
|
||||
|
||||
const G4BoundingBox3D& BBox() const { return bBox; }
|
||||
|
||||
// the following functions are probably not used
|
||||
// and should be removed in the future
|
||||
|
||||
G4Point3DVector points;
|
||||
inline int GetNumberOfPoints(){return points.length();}
|
||||
|
||||
inline const G4Point3D& GetPoint(const int Count){return points.ref(Count);}
|
||||
|
||||
// void IntersectRay2D(const G4Ray& ray, G4CurveRayIntersection& is);
|
||||
|
||||
private:
|
||||
|
||||
// copy disabled
|
||||
G4SurfaceBoundary(const G4SurfaceBoundary&);
|
||||
G4SurfaceBoundary& operator=(const G4SurfaceBoundary&);
|
||||
// Private copy constructor and assignment operator.
|
||||
|
||||
private:
|
||||
|
||||
G4Point3DVector points;
|
||||
G4CurveVector bounds;
|
||||
G4BoundingBox3D bBox;
|
||||
|
||||
// to speed up the tangent computation
|
||||
G4CurveRayIntersection lastIntersection;
|
||||
|
||||
};
|
||||
|
||||
#include "G4SurfaceBoundary.icc"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user