Ignore:
Timestamp:
Feb 16, 2009, 10:14:30 AM (16 years ago)
Author:
garnier
Message:

en test de gl2ps. Problemes de libraries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/geometry/solids/CSG/include/G4Cons.hh

    r850 r921  
    2525//
    2626//
    27 // $Id: G4Cons.hh,v 1.18 2007/05/18 07:38:00 gcosmo Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4Cons.hh,v 1.21 2008/11/06 11:04:00 gcosmo Exp $
     28// GEANT4 tag $Name: geant4-09-02-cand-01 $
    2929//
    3030//
     
    5454//  fDPhi  delta angle of the segment in radians
    5555//
     56//  fPhiFullCone   Boolean variable used for indicate the Phi Section
     57//
    5658//   Note:
    5759//      Internally fSPhi & fDPhi are adjusted so that fDPhi<=2PI,
     
    7375  public:  // with description
    7476
    75         G4Cons(const G4String& pName,
    76                      G4double pRmin1, G4double pRmax1,
    77                      G4double pRmin2, G4double pRmax2,
    78                      G4double pDz,
    79                      G4double pSPhi, G4double pDPhi);
     77    G4Cons(const G4String& pName,
     78                 G4double pRmin1, G4double pRmax1,
     79                 G4double pRmin2, G4double pRmax2,
     80                 G4double pDz,
     81                 G4double pSPhi, G4double pDPhi);
    8082         
    81         virtual ~G4Cons() ;
    82 
    83   // Accessors
    84 
    85         inline G4double    GetInnerRadiusMinusZ() const;
    86         inline G4double    GetOuterRadiusMinusZ() const;
    87         inline G4double    GetInnerRadiusPlusZ()  const;
    88         inline G4double    GetOuterRadiusPlusZ()  const;
    89  
    90         inline G4double    GetZHalfLength()       const;
    91  
    92         inline G4double    GetStartPhiAngle () const;
    93         inline G4double    GetDeltaPhiAngle () const;
    94  
    95   // Modifiers
    96 
    97         inline void    SetInnerRadiusMinusZ( G4double Rmin1 );
    98         inline void    SetOuterRadiusMinusZ( G4double Rmax1 );
    99         inline void    SetInnerRadiusPlusZ ( G4double Rmin2 );
    100         inline void    SetOuterRadiusPlusZ ( G4double Rmax2 );
     83    virtual ~G4Cons() ;
     84
     85    // Accessors
     86
     87    inline G4double    GetInnerRadiusMinusZ() const;
     88    inline G4double    GetOuterRadiusMinusZ() const;
     89    inline G4double    GetInnerRadiusPlusZ()  const;
     90    inline G4double    GetOuterRadiusPlusZ()  const;
     91 
     92    inline G4double    GetZHalfLength()       const;
     93 
     94    inline G4double    GetStartPhiAngle () const;
     95    inline G4double    GetDeltaPhiAngle () const;
     96 
     97    // Modifiers
     98
     99    inline void    SetInnerRadiusMinusZ( G4double Rmin1 );
     100    inline void    SetOuterRadiusMinusZ( G4double Rmax1 );
     101    inline void    SetInnerRadiusPlusZ ( G4double Rmin2 );
     102    inline void    SetOuterRadiusPlusZ ( G4double Rmax2 );
    101103         
    102         inline void    SetZHalfLength      ( G4double newDz );
    103         inline void    SetStartPhiAngle    ( G4double newSPhi);
    104         inline void    SetDeltaPhiAngle    ( G4double newDPhi);
    105 
    106   // Other methods for solid
    107 
    108         inline G4double    GetCubicVolume();
    109         inline G4double    GetSurfaceArea();
    110 
    111         void ComputeDimensions(G4VPVParameterisation* p,
    112                                const G4int n,
    113                                const G4VPhysicalVolume* pRep);
    114 
    115         G4bool CalculateExtent(const EAxis pAxis,
    116                                const G4VoxelLimits& pVoxelLimit,
    117                                const G4AffineTransform& pTransform,
    118                                      G4double& pmin, G4double& pmax) const;         
    119 
    120         EInside Inside(const G4ThreeVector& p) const;
    121 
    122         G4ThreeVector SurfaceNormal(const G4ThreeVector& p) const;
    123 
    124         G4double DistanceToIn(const G4ThreeVector& p,
    125                                const G4ThreeVector& v) const;
    126         G4double DistanceToIn(const G4ThreeVector& p) const;
    127         G4double DistanceToOut(const G4ThreeVector& p,
    128                                const G4ThreeVector& v,
    129                                const G4bool calcNorm=G4bool(false),
    130                                      G4bool *validNorm=0,
    131                                      G4ThreeVector *n=0) const;             
    132         G4double DistanceToOut(const G4ThreeVector& p) const;
    133 
    134         G4GeometryType  GetEntityType() const;
     104    inline void    SetZHalfLength      ( G4double newDz );
     105    inline void    SetStartPhiAngle    ( G4double newSPhi);
     106    inline void    SetDeltaPhiAngle    ( G4double newDPhi);
     107
     108    // Other methods for solid
     109
     110    inline G4double    GetCubicVolume();
     111    inline G4double    GetSurfaceArea();
     112
     113    void ComputeDimensions(G4VPVParameterisation* p,
     114                           const G4int n,
     115                           const G4VPhysicalVolume* pRep);
     116
     117    G4bool CalculateExtent(const EAxis pAxis,
     118                           const G4VoxelLimits& pVoxelLimit,
     119                           const G4AffineTransform& pTransform,
     120                                 G4double& pmin, G4double& pmax) const;         
     121
     122    EInside Inside(const G4ThreeVector& p) const;
     123
     124    G4ThreeVector SurfaceNormal(const G4ThreeVector& p) const;
     125
     126    G4double DistanceToIn (const G4ThreeVector& p,
     127                           const G4ThreeVector& v) const;
     128    G4double DistanceToIn (const G4ThreeVector& p) const;
     129    G4double DistanceToOut(const G4ThreeVector& p,
     130                           const G4ThreeVector& v,
     131                           const G4bool calcNorm=G4bool(false),
     132                                 G4bool *validNorm=0,
     133                                 G4ThreeVector *n=0) const;             
     134    G4double DistanceToOut(const G4ThreeVector& p) const;
     135
     136    G4GeometryType  GetEntityType() const;
    135137       
    136         G4ThreeVector GetPointOnSurface() const;
     138    G4ThreeVector GetPointOnSurface() const;
    137139       
    138         std::ostream& StreamInfo(std::ostream& os) const;
    139 
    140   // Visualisation functions
    141 
    142         void          DescribeYourselfTo( G4VGraphicsScene& scene ) const;
    143         G4Polyhedron* CreatePolyhedron() const;
    144         G4NURBS*      CreateNURBS() const;
     140    std::ostream& StreamInfo(std::ostream& os) const;
     141
     142    // Visualisation functions
     143
     144    void          DescribeYourselfTo( G4VGraphicsScene& scene ) const;
     145    G4Polyhedron* CreatePolyhedron() const;
     146    G4NURBS*      CreateNURBS() const;
    145147
    146148  public:  // without description
    147149       
    148         G4Cons(__void__&);
    149           // Fake default constructor for usage restricted to direct object
    150           // persistency for clients requiring preallocation of memory for
    151           // persistifiable objects.
    152 
    153         //  Old access functions
    154 
    155         inline G4double    GetRmin1() const;
    156         inline G4double    GetRmax1() const;
    157         inline G4double    GetRmin2() const;
    158         inline G4double    GetRmax2() const;
    159  
    160         inline G4double    GetDz()    const;
    161  
    162         inline G4double    GetSPhi() const;
    163         inline G4double    GetDPhi() const;
     150    G4Cons(__void__&);
     151      //
     152      // Fake default constructor for usage restricted to direct object
     153      // persistency for clients requiring preallocation of memory for
     154      // persistifiable objects.
     155
     156    //  Old access functions
     157
     158    inline G4double    GetRmin1() const;
     159    inline G4double    GetRmax1() const;
     160    inline G4double    GetRmin2() const;
     161    inline G4double    GetRmax2() const;
     162 
     163    inline G4double    GetDz()    const;
     164 
     165    inline G4double    GetSPhi() const;
     166    inline G4double    GetDPhi() const;
    164167
    165168  protected:
    166169 
    167         G4ThreeVectorList*
    168         CreateRotatedVertices(const G4AffineTransform& pTransform) const;
    169  
    170         // Used by distanceToOut
    171  
    172         enum ESide {kNull,kRMin,kRMax,kSPhi,kEPhi,kPZ,kMZ};
    173  
    174         // used by normal
    175  
    176         enum ENorm {kNRMin,kNRMax,kNSPhi,kNEPhi,kNZ};
     170    G4ThreeVectorList*
     171    CreateRotatedVertices(const G4AffineTransform& pTransform) const;
     172 
     173    G4double fRmin1, fRmin2, fRmax1, fRmax2, fDz, fSPhi, fDPhi;
     174    G4bool fPhiFullCone;
     175
     176    // Used by distanceToOut
     177 
     178    enum ESide {kNull,kRMin,kRMax,kSPhi,kEPhi,kPZ,kMZ};
     179 
     180    // used by normal
     181 
     182    enum ENorm {kNRMin,kNRMax,kNSPhi,kNEPhi,kNZ};
    177183
    178184  private:
    179185
    180         G4ThreeVector ApproxSurfaceNormal(const G4ThreeVector& p) const;
    181           // Algorithm for SurfaceNormal() following the original
    182           // specification for points not on the surface
     186    inline void Initialise();
     187      // Reset relevant values to zero
     188
     189    inline void InitializeTrigonometry();
     190      //
     191      // Recompute relevant trigonometric values and cache them
     192
     193    G4ThreeVector ApproxSurfaceNormal(const G4ThreeVector& p) const;
     194      //
     195      // Algorithm for SurfaceNormal() following the original
     196      // specification for points not on the surface
    183197
    184198  private:
    185199
    186         G4double kRadTolerance, kAngTolerance;
    187 
    188         G4double fRmin1,fRmin2,
    189                  fRmax1,fRmax2,
    190                  fDz,
    191                  fSPhi,fDPhi;
     200    G4double kRadTolerance, kAngTolerance;
     201      //
     202      // Radial and angular tolerances
     203
     204    G4double sinCPhi, cosCPhi, cosHDPhiOT, cosHDPhiIT,
     205             sinSPhi, cosSPhi, sinEPhi, cosEPhi;
     206      //
     207      // Cached trigonometric values
    192208};
    193209
Note: See TracChangeset for help on using the changeset viewer.