16 #include "G4CSGSolid.hh"
17 #include "G4Polyhedron.hh"
47 inline double dotxy(
const vector_t& u,
const vector_t& v)
49 return u.x * v.x + u.y * v.y;
61 BelleLathe(
const G4String& pName,
double phi0,
double dphi,
int n,
double* z,
double* rin,
double* rout);
63 BelleLathe(
const G4String& pName,
double,
double,
const std::vector<zr_t>&);
73 const G4VPhysicalVolume* pRep);
77 const G4VoxelLimits& pVoxelLimit,
78 const G4AffineTransform& pTransform,
79 G4double& pMin, G4double& pMax)
const;
81 EInside Inside(
const G4ThreeVector& p)
const;
83 G4ThreeVector SurfaceNormal(
const G4ThreeVector& p)
const;
85 G4double DistanceToIn(
const G4ThreeVector& p,
const G4ThreeVector& v)
const;
87 G4double DistanceToIn(
const G4ThreeVector& p)
const;
89 G4double DistanceToOut(
const G4ThreeVector& p,
const G4ThreeVector& v,
90 const G4bool calcNorm =
false,
91 G4bool* validNorm = 0, G4ThreeVector* n = 0)
const;
93 G4double DistanceToOut(
const G4ThreeVector& p)
const;
95 G4GeometryType GetEntityType()
const;
97 G4ThreeVector GetPointOnSurface()
const;
99 G4double GetCubicVolume() {
return fCubicVolume;}
101 G4double GetSurfaceArea() {
return fSurfaceArea;}
103 G4VSolid* Clone()
const;
106 void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax)
const;
108 std::ostream& StreamInfo(std::ostream& os)
const;
112 void DescribeYourselfTo(G4VGraphicsScene& scene)
const;
113 G4Polyhedron* CreatePolyhedron()
const;
130 bool insector(
double,
double)
const;
134 int wn_poly(
const zr_t&)
const;
135 double mindist(
const zr_t&)
const;
136 std::vector<double> linecross(
const G4ThreeVector&,
const G4ThreeVector&)
const;
137 void eartrim()
const;
138 zr_t normal(
const zr_t&,
double&)
const ;
140 void Init(
const std::vector<zr_t>&,
double,
double);
143 std::vector<zr_t> fcontour;
144 std::vector<cachezr_t> fcache;
145 std::vector<double> fz;
146 std::vector<int> findx, fseg;
147 mutable std::vector<double> farea;
148 mutable std::vector<triangle_t> ftlist;
151 double fs0, fc0, fs1, fc1;
152 double fn0x, fn0y, fn1x, fn1y;
153 double frmin, frmax, fzmin, fzmax;
157 mutable std::vector<G4ThreeVector> fsurf;
161 class PolyhedronBelleLathe:
public G4Polyhedron {