[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: G4Ellipse.hh,v 1.10 2006/06/29 18:39:16 gunter Exp $ |
---|
[1337] | 28 | // GEANT4 tag $Name: geant4-09-04-beta-01 $ |
---|
[831] | 29 | // |
---|
| 30 | // ---------------------------------------------------------------------- |
---|
| 31 | // Class G4Ellipse |
---|
| 32 | // |
---|
| 33 | // Class description: |
---|
| 34 | // |
---|
| 35 | // Definition of a generic ellipse curve. |
---|
| 36 | |
---|
| 37 | // Authors: J.Sulkimo, P.Urban. |
---|
| 38 | // Revisions by: L.Broglia, G.Cosmo. |
---|
| 39 | // ---------------------------------------------------------------------- |
---|
| 40 | #ifndef __ELLIPTICCURVE_H |
---|
| 41 | #define __ELLIPTICCURVE_H |
---|
| 42 | |
---|
| 43 | #include "G4CircularCurve.hh" |
---|
| 44 | |
---|
| 45 | class G4Ellipse : public G4Conic |
---|
| 46 | { |
---|
| 47 | |
---|
| 48 | public: // with description |
---|
| 49 | |
---|
| 50 | G4Ellipse(); |
---|
| 51 | virtual ~G4Ellipse(); |
---|
| 52 | // Constructor & destructor. |
---|
| 53 | |
---|
| 54 | G4Ellipse(const G4Ellipse& right); |
---|
| 55 | G4Ellipse& operator=(const G4Ellipse& right); |
---|
| 56 | // Copy constructor and assignment operator. |
---|
| 57 | |
---|
| 58 | G4Curve* Project(const G4Transform3D& tr= |
---|
| 59 | HepGeom::Transform3D::Identity); |
---|
| 60 | // Transforms and projects the curve. |
---|
| 61 | |
---|
| 62 | G4bool Tangent(G4CurvePoint& cp, G4Vector3D& v); |
---|
| 63 | // Returns tangent to curve at a given point, if existing. |
---|
| 64 | // The tangent is computed from the 3D point representation. |
---|
| 65 | |
---|
| 66 | inline G4double GetPMax() const; |
---|
| 67 | inline G4Point3D GetPoint(G4double param) const; |
---|
| 68 | inline G4double GetPPoint(const G4Point3D& p) const; |
---|
| 69 | // Accessors methods. |
---|
| 70 | |
---|
| 71 | inline G4double GetSemiAxis1() const; |
---|
| 72 | inline G4double GetSemiAxis2() const; |
---|
| 73 | inline void Init(const G4Axis2Placement3D& position0, |
---|
| 74 | G4double semiAxis10, G4double semiAxis20); |
---|
| 75 | // Get/Set methods for the geometric data. |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | public: |
---|
| 79 | |
---|
| 80 | inline G4int IntersectRay2D(const G4Ray& ray); |
---|
| 81 | // void IntersectRay2D(const G4Ray& ray, G4CurveRayIntersection& is); |
---|
| 82 | |
---|
| 83 | protected: |
---|
| 84 | |
---|
| 85 | void InitBounded(); |
---|
| 86 | |
---|
| 87 | private: |
---|
| 88 | |
---|
| 89 | // geometric data |
---|
| 90 | |
---|
| 91 | G4double semiAxis1; |
---|
| 92 | G4double semiAxis2; |
---|
| 93 | G4double ratioAxis2Axis1; |
---|
| 94 | |
---|
| 95 | G4Transform3D toUnitCircle; |
---|
| 96 | |
---|
| 97 | G4double forTangent; // -R_1^2/R_2^2 |
---|
| 98 | }; |
---|
| 99 | |
---|
| 100 | #include "G4Ellipse.icc" |
---|
| 101 | |
---|
| 102 | #endif |
---|