G4CompositeCurve.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // ----------------------------------------------------------------------
00030 // Class G4CompositeCurve
00031 //
00032 // Class description:
00033 // 
00034 // Definition of a generic composition of curves.
00035 
00036 // Authors: J.Sulkimo, P.Urban.
00037 // Revisions by: L.Broglia, G.Cosmo.
00038 // ----------------------------------------------------------------------
00039 #ifndef __G4COMPOSITCURVE_H
00040 #define __G4COMPOSITCURVE_H
00041 
00042 #include "G4Curve.hh"
00043 #include "G4CurveVector.hh"
00044 #include "G4CurveRayIntersection.hh"
00045 #include "G4Point3DVector.hh"
00046 
00047 
00048 class G4CompositeCurve : public G4Curve
00049 {
00050 
00051 public:  // with description
00052 
00053   G4CompositeCurve();
00054   virtual ~G4CompositeCurve();
00055     // Default constructor & destructor
00056 
00057   G4CompositeCurve(const G4Point3DVector& vertices);
00058     // Constructor creating closed polygons, given the vertices.
00059     // No call to Init and SetBounds is needed after calling this
00060     // constructor.
00061 
00062   virtual G4String GetEntityType() const;
00063     // Returns entity type identifier.
00064 
00065   virtual G4Curve* Project(const G4Transform3D& tr = G4Transform3D::Identity);
00066     // Project along trasformation tr.
00067         
00068   virtual G4bool Tangent(G4CurvePoint& cp, G4Vector3D& v);
00069     // Tangent computed from the 3D point representation.
00070 
00071   virtual G4double  GetPMax() const;
00072   virtual G4Point3D GetPoint(G4double param) const;
00073   virtual G4double  GetPPoint(const G4Point3D& p) const;
00074   const G4CurveVector& GetSegments() const;
00075     // Acccessors for the geometric data
00076 
00077   void Init(const G4CurveVector& segments0);
00078     // Initialises geometric data.
00079     // The object is not responsible for deleting the curves;
00080     // only a shallow copy of the CurveVector is made.
00081 
00082 public:  // without description
00083 
00084   // virtual void IntersectRay2D(const G4Ray& ray, G4CurveRayIntersection& is);
00085   virtual G4int IntersectRay2D(const G4Ray& ray);
00086 
00087 protected:  // with description
00088   
00089   virtual void InitBounded();
00090     // Compute bounding box.
00091 
00092 private:
00093 
00094   G4CompositeCurve(const G4CompositeCurve&);
00095   G4CompositeCurve& operator=(const G4CompositeCurve&);
00096      // Private copy-constructor and assignment operator.
00097 
00098 private:
00099   
00100   G4CurveVector segments;
00101   G4CurveRayIntersection lastIntersection;
00102     // geometric data
00103 
00104 };
00105 
00106 #include "G4CompositeCurve.icc"
00107 
00108 #endif

Generated on Mon May 27 17:47:56 2013 for Geant4 by  doxygen 1.4.7