[831] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // |
---|
| 27 | // $Id: G4CompositeCurve.hh,v 1.8 2006/06/29 18:38:35 gunter Exp $ |
---|
[1228] | 28 | // GEANT4 tag $Name: geant4-09-03 $ |
---|
[831] | 29 | // |
---|
| 30 | // ---------------------------------------------------------------------- |
---|
| 31 | // Class G4CompositeCurve |
---|
| 32 | // |
---|
| 33 | // Class description: |
---|
| 34 | // |
---|
| 35 | // Definition of a generic composition of curves. |
---|
| 36 | |
---|
| 37 | // Authors: J.Sulkimo, P.Urban. |
---|
| 38 | // Revisions by: L.Broglia, G.Cosmo. |
---|
| 39 | // ---------------------------------------------------------------------- |
---|
| 40 | #ifndef __G4COMPOSITCURVE_H |
---|
| 41 | #define __G4COMPOSITCURVE_H |
---|
| 42 | |
---|
| 43 | #include "G4Curve.hh" |
---|
| 44 | #include "G4CurveVector.hh" |
---|
| 45 | #include "G4CurveRayIntersection.hh" |
---|
| 46 | #include "G4Point3DVector.hh" |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | class G4CompositeCurve : public G4Curve |
---|
| 50 | { |
---|
| 51 | |
---|
| 52 | public: // with description |
---|
| 53 | |
---|
| 54 | G4CompositeCurve(); |
---|
| 55 | virtual ~G4CompositeCurve(); |
---|
| 56 | // Default constructor & destructor |
---|
| 57 | |
---|
| 58 | G4CompositeCurve(const G4Point3DVector& vertices); |
---|
| 59 | // Constructor creating closed polygons, given the vertices. |
---|
| 60 | // No call to Init and SetBounds is needed after calling this |
---|
| 61 | // constructor. |
---|
| 62 | |
---|
| 63 | virtual G4String GetEntityType() const; |
---|
| 64 | // Returns entity type identifier. |
---|
| 65 | |
---|
| 66 | virtual G4Curve* Project(const G4Transform3D& tr = |
---|
| 67 | HepGeom::Transform3D::Identity); |
---|
| 68 | // Project along trasformation tr. |
---|
| 69 | |
---|
| 70 | virtual G4bool Tangent(G4CurvePoint& cp, G4Vector3D& v); |
---|
| 71 | // Tangent computed from the 3D point representation. |
---|
| 72 | |
---|
| 73 | virtual G4double GetPMax() const; |
---|
| 74 | virtual G4Point3D GetPoint(G4double param) const; |
---|
| 75 | virtual G4double GetPPoint(const G4Point3D& p) const; |
---|
| 76 | const G4CurveVector& GetSegments() const; |
---|
| 77 | // Acccessors for the geometric data |
---|
| 78 | |
---|
| 79 | void Init(const G4CurveVector& segments0); |
---|
| 80 | // Initialises geometric data. |
---|
| 81 | // The object is not responsible for deleting the curves; |
---|
| 82 | // only a shallow copy of the CurveVector is made. |
---|
| 83 | |
---|
| 84 | public: // without description |
---|
| 85 | |
---|
| 86 | // virtual void IntersectRay2D(const G4Ray& ray, G4CurveRayIntersection& is); |
---|
| 87 | virtual G4int IntersectRay2D(const G4Ray& ray); |
---|
| 88 | |
---|
| 89 | protected: // with description |
---|
| 90 | |
---|
| 91 | virtual void InitBounded(); |
---|
| 92 | // Compute bounding box. |
---|
| 93 | |
---|
| 94 | private: |
---|
| 95 | |
---|
| 96 | G4CompositeCurve(const G4CompositeCurve&); |
---|
| 97 | G4CompositeCurve& operator=(const G4CompositeCurve&); |
---|
| 98 | // Private copy-constructor and assignment operator. |
---|
| 99 | |
---|
| 100 | private: |
---|
| 101 | |
---|
| 102 | G4CurveVector segments; |
---|
| 103 | G4CurveRayIntersection lastIntersection; |
---|
| 104 | // geometric data |
---|
| 105 | |
---|
| 106 | }; |
---|
| 107 | |
---|
| 108 | #include "G4CompositeCurve.icc" |
---|
| 109 | |
---|
| 110 | #endif |
---|