35#ifndef G4VTWISTEDFACETED_HH
36#define G4VTWISTEDFACETED_HH
86 const G4bool calcnorm =
false,
87 G4bool* validnorm =
nullptr,
106 virtual std::ostream &
StreamInfo(std::ostream& os)
const;
151 void CreateSurfaces();
195 p.
set(kInfinity,kInfinity,kInfinity); inside =
kOutside;
198 LastState(
const LastState& r) : p(r.p), inside(r.inside){}
199 LastState& operator=(
const LastState& r)
201 if (
this == &r) {
return *
this; }
202 p = r.p; inside = r.inside;
215 p.
set(kInfinity,kInfinity,kInfinity);
216 vec.set(kInfinity,kInfinity,kInfinity);
223 LastVector(
const LastVector& r) : p(r.p), vec(r.vec)
226 surface[0] = r.surface[0];
228 LastVector& operator=(
const LastVector& r)
230 if (&r ==
this) {
return *
this; }
231 p = r.p; vec = r.vec;
233 surface[0] = r.surface[0];
247 p.
set(kInfinity,kInfinity,kInfinity);
251 LastValue(
const LastValue& r) : p(r.p), value(r.value){}
252 LastValue& operator=(
const LastValue& r)
254 if (
this == &r) {
return *
this; }
255 p = r.p; value = r.value;
263 class LastValueWithDoubleVector
266 LastValueWithDoubleVector()
268 p.
set(kInfinity,kInfinity,kInfinity);
269 vec.set(kInfinity,kInfinity,kInfinity);
272 ~LastValueWithDoubleVector(){}
273 LastValueWithDoubleVector(
const LastValueWithDoubleVector& r)
274 : p(r.p), vec(r.vec), value(r.value){}
275 LastValueWithDoubleVector& operator=(
const LastValueWithDoubleVector& r)
277 if (
this == &r) {
return *
this; }
278 p = r.p; vec = r.vec; value = r.value;
287 LastState fLastInside;
288 LastVector fLastNormal;
289 LastValue fLastDistanceToIn;
290 LastValue fLastDistanceToOut;
291 LastValueWithDoubleVector fLastDistanceToInWithV;
292 LastValueWithDoubleVector fLastDistanceToOutWithV;
300 if(fCubicVolume != 0.) ;
301 else fCubicVolume = 2 * fDz
302 * ( ( fDx1 + fDx2 ) * fDy1 + ( fDx3 + fDx4 ) * fDy2 );
309 if(fSurfaceArea != 0.) ;
317 return ( fDx4 + fDx2 + ( fDx4 - fDx2 ) * ( 2 * phi ) / fPhiTwist ) ;
323 return ( fDx3 + fDx1 + ( fDx3 - fDx1 ) * ( 2 * phi ) / fPhiTwist ) ;
329 return ( fDy2 + fDy1 + ( fDy2 - fDy1 ) * ( 2 * phi ) / fPhiTwist ) ;
void set(double x, double y, double z)
virtual G4double GetSurfaceArea()
G4double GetValueD(G4double phi) const
virtual G4double GetCubicVolume()
virtual void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4double GetValueA(G4double phi) const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4double GetTheta() const
G4VTwistedFaceted & operator=(const G4VTwistedFaceted &rhs)
G4Polyhedron * fpPolyhedron
virtual G4Polyhedron * GetPolyhedron() const
G4ThreeVector GetPointOnSurface() const
virtual G4GeometryType GetEntityType() const
G4double GetTwistAngle() const
G4bool fRebuildPolyhedron
G4ThreeVector GetPointInSolid(G4double z) const
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4double GetAlpha() const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcnorm=false, G4bool *validnorm=nullptr, G4ThreeVector *n=nullptr) const
virtual EInside Inside(const G4ThreeVector &p) const
virtual std::ostream & StreamInfo(std::ostream &os) const
virtual ~G4VTwistedFaceted()
virtual void ComputeDimensions(G4VPVParameterisation *, const G4int, const G4VPhysicalVolume *)
virtual G4VisExtent GetExtent() const
virtual G4Polyhedron * CreatePolyhedron() const
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
G4double GetValueB(G4double phi) const
G4double Xcoef(G4double u, G4double phi, G4double ftg) const
virtual G4double GetSurfaceArea()