- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/geometry/solids/specific/src/G4PolyhedraSide.cc
r1228 r1315 25 25 // 26 26 // 27 // $Id: G4PolyhedraSide.cc,v 1.1 5 2008/05/15 11:41:59 gcosmo Exp $28 // GEANT4 tag $Name: geant4-09-0 3$27 // $Id: G4PolyhedraSide.cc,v 1.17 2010/02/24 11:31:49 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 64 64 G4bool isAllBehind ) 65 65 { 66 67 66 kCarTolerance = G4GeometryTolerance::GetInstance()->GetSurfaceTolerance(); 68 67 fSurfaceArea=0.; 68 fPhi.first = G4ThreeVector(0,0,0); 69 fPhi.second= 0.0; 70 69 71 // 70 72 // Record values … … 561 563 // Try the closest phi segment first 562 564 // 563 G4int iPhi = ClosestPhiSegment( p.phi() );565 G4int iPhi = ClosestPhiSegment( GetPhi(p) ); 564 566 565 567 G4ThreeVector pdotc = p - vecs[iPhi].center; … … 594 596 // Which phi segment is closest to this point? 595 597 // 596 G4int iPhi = ClosestPhiSegment( p.phi() );598 G4int iPhi = ClosestPhiSegment( GetPhi(p) ); 597 599 598 600 G4double norm; … … 624 626 // Which phi segment is closest to this point? 625 627 // 626 G4int iPhi = ClosestPhiSegment( p.phi() );628 G4int iPhi = ClosestPhiSegment( GetPhi(p) ); 627 629 628 630 // … … 656 658 // Which phi segment, if any, does the axis belong to 657 659 // 658 iPhi = PhiSegment( axis.phi() );660 iPhi = PhiSegment( GetPhi(axis) ); 659 661 660 662 if (iPhi < 0) … … 971 973 972 974 // 975 // GetPhi 976 // 977 // Calculate Phi for a given 3-vector (point), if not already cached for the 978 // same point, in the attempt to avoid consecutive computation of the same 979 // quantity 980 // 981 G4double G4PolyhedraSide::GetPhi( const G4ThreeVector& p ) 982 { 983 G4double val=0.; 984 985 if (fPhi.first != p) 986 { 987 val = p.phi(); 988 fPhi.first = p; 989 fPhi.second = val; 990 } 991 else 992 { 993 val = fPhi.second; 994 } 995 return val; 996 } 997 998 999 // 973 1000 // DistanceToOneSide 974 1001 //
Note: See TracChangeset
for help on using the changeset viewer.