13#include "G4CSGSolid.hh"
14#include "G4Polyhedron.hh"
63 return u.x * v.
x + u.y * v.
y;
76 BelleLathe(
const G4String& pName,
double phi0,
double dphi,
int n,
double* z,
double* rin,
double* rout);
78 BelleLathe(
const G4String& pName,
double,
double,
const std::vector<zr_t>&);
88 const G4VPhysicalVolume* pRep);
92 const G4VoxelLimits& pVoxelLimit,
93 const G4AffineTransform& pTransform,
94 G4double& pMin, G4double& pMax)
const;
97 EInside
Inside(
const G4ThreeVector& p)
const;
103 G4double
DistanceToIn(
const G4ThreeVector& p,
const G4ThreeVector& v)
const;
109 G4double
DistanceToOut(
const G4ThreeVector& p,
const G4ThreeVector& v,
110 const G4bool calcNorm =
false,
111 G4bool* validNorm = 0, G4ThreeVector* n = 0)
const;
129 G4VSolid*
Clone()
const;
132 void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax)
const;
135 std::ostream&
StreamInfo(std::ostream& os)
const;
157 bool insector(
double,
double)
const;
164 std::vector<double>
linecross(
const G4ThreeVector&,
const G4ThreeVector&)
const;
168 void Init(
const std::vector<zr_t>&,
double,
double);
173 std::vector<double>
fz;
197 mutable std::vector<G4ThreeVector>
fsurf;
double fzmax
maximal z value
void getvolarea()
get volume area
double fphi
starting angle
std::vector< double > fz
vector of z values
G4GeometryType GetEntityType() const
Get entity type.
std::vector< int > findx
vector of indices
std::vector< triangle_t > ftlist
vector of triangle structs
void DescribeYourselfTo(G4VGraphicsScene &scene) const
Visualisation function.
void Init(const std::vector< zr_t > &, double, double)
initialize
bool ftwopi
bound within +- 2pi?
std::vector< double > farea
vector of area values
G4Polyhedron * CreatePolyhedron() const
create polyhedron
std::vector< int > fseg
vector of segments
double fdphi
finishing angle
std::vector< double > linecross(const G4ThreeVector &, const G4ThreeVector &) const
calculate all ray solid's surface intersection return ordered vector
BelleLathe & operator=(const BelleLathe &rhs)
assignment operator
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
Two vectors define an axis-parallel bounding box for the shape.
virtual ~BelleLathe()
Destructor.
std::vector< zr_t > fcontour
vector of zr structs
bool fgtpi
greater than pi?
G4double GetCubicVolume()
Get cubic volume.
std::vector< cachezr_t > fcache
vector of cached zr structs
double mindist(const zr_t &) const
minimal distance
double fzmin
minimal z value
zr_t normal(const zr_t &, double &) const
return normal
bool insector(double, double) const
True if (x,y) is within the shape rotation.
G4ThreeVector GetPointOnSurface() const
Get point on surface.
double frmax
maximal r value
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
calculate the extent of the volume
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
Calculate side nearest to p, and return normal.
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
Calculate distance to shape from outside - return kInfinity if no intersection.
double frmin
minimal r value
void eartrim() const
ear trim
std::vector< G4ThreeVector > fsurf
vector of surfaces
G4VSolid * Clone() const
Make a clone of the object.
std::ostream & StreamInfo(std::ostream &os) const
Stream object contents to an output stream.
int wn_poly(const zr_t &) const
wn_poly
EInside Inside(const G4ThreeVector &p) const
Return whether point inside/outside/on surface, using tolerance.
G4double GetSurfaceArea()
Get surface area.
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
compute the dimensions
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
Calculate distance to surface of shape from inside.
virtual ~PolyhedronBelleLathe()
destructor
Abstract base class for different kinds of events.
double s2
squared distance
bool isconvex
is shape convex?
double is2
inverted distance squared
double r2min
minimal r value squared
double zmin
minimal z value
double ta
ratio of dr over dz
double zmax
maximal z value
double r2max
maximal r value squared
struct for a three vector
simple struct with z and r coordinates