46 #ifndef __G4VTWISTEDFACETED__
47 #define __G4VTWISTEDFACETED__
95 const G4bool calcnorm =
false,
115 virtual std::ostream &
StreamInfo(std::ostream& os)
const;
162 void CreateSurfaces();
208 p.
set(kInfinity,kInfinity,kInfinity); inside =
kOutside;
211 LastState(
const LastState&
r) : p(r.p), inside(r.inside){}
214 if (
this == &r) {
return *
this; }
215 p = r.p; inside = r.inside;
228 p.
set(kInfinity,kInfinity,kInfinity);
229 vec.set(kInfinity,kInfinity,kInfinity);
236 LastVector(
const LastVector&
r) : p(r.p), vec(r.vec)
239 surface[0] = r.surface[0];
243 if (&r ==
this) {
return *
this; }
244 p = r.p; vec = r.vec;
246 surface[0] = r.surface[0];
260 p.
set(kInfinity,kInfinity,kInfinity);
264 LastValue(
const LastValue&
r) : p(r.p),
value(r.
value){}
267 if (
this == &r) {
return *
this; }
268 p = r.p;
value = r.value;
276 class LastValueWithDoubleVector
279 LastValueWithDoubleVector()
281 p.
set(kInfinity,kInfinity,kInfinity);
282 vec.set(kInfinity,kInfinity,kInfinity);
285 ~LastValueWithDoubleVector(){}
286 LastValueWithDoubleVector(
const LastValueWithDoubleVector&
r)
288 LastValueWithDoubleVector&
operator=(
const LastValueWithDoubleVector&
r)
290 if (
this == &r) {
return *
this; }
291 p = r.p; vec = r.vec;
value = r.value;
300 LastState fLastInside;
301 LastVector fLastNormal;
302 LastValue fLastDistanceToIn;
303 LastValue fLastDistanceToOut;
304 LastValueWithDoubleVector fLastDistanceToInWithV;
305 LastValueWithDoubleVector fLastDistanceToOutWithV;
314 if(fCubicVolume != 0.) ;
315 else fCubicVolume = 2 * fDz
316 * ( ( fDx1 + fDx2 ) * fDy1 + ( fDx3 + fDx4 ) * fDy2 );
323 if(fSurfaceArea != 0.) ;
331 return ( fDx4 + fDx2 + ( fDx4 - fDx2 ) * ( 2 * phi ) / fPhiTwist ) ;
337 return ( fDx3 + fDx1 + ( fDx3 - fDx1 ) * ( 2 * phi ) / fPhiTwist ) ;
343 return ( fDy2 + fDy1 + ( fDy2 - fDy1 ) * ( 2 * phi ) / fPhiTwist ) ;
void set(double x, double y, double z)
virtual void ComputeDimensions(G4VPVParameterisation *, const G4int, const G4VPhysicalVolume *)
virtual G4double GetSurfaceArea()
G4ThreeVectorList * CreateRotatedVertices(const G4AffineTransform &pTransform) const
virtual G4double GetCubicVolume()
G4VTwistedFaceted(const G4String &pname, G4double PhiTwist, G4double pDz, G4double pTheta, G4double pPhi, G4double pDy1, G4double pDx1, G4double pDx2, G4double pDy2, G4double pDx3, G4double pDx4, G4double pAlph)
virtual G4GeometryType GetEntityType() const
G4ThreeVector GetPointOnSurface() const
G4ThreeVector GetPointInSolid(G4double z) const
virtual G4Polyhedron * CreatePolyhedron() const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4VTwistedFaceted & operator=(const G4VTwistedFaceted &rhs)
G4double GetTwistAngle() const
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4double Xcoef(G4double u, G4double phi, G4double ftg) const
G4double GetValueD(G4double phi) const
G4double GetTheta() const
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
virtual ~G4VTwistedFaceted()
G4double GetValueB(G4double phi) const
std::vector< G4ThreeVector > G4ThreeVectorList
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcnorm=false, G4bool *validnorm=0, G4ThreeVector *n=0) const
virtual G4Polyhedron * GetPolyhedron() const
virtual G4VisExtent GetExtent() const
virtual EInside Inside(const G4ThreeVector &p) const
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
G4double GetAlpha() const
const XML_Char int const XML_Char * value
virtual std::ostream & StreamInfo(std::ostream &os) const
virtual G4double GetSurfaceArea()
G4double GetValueA(G4double phi) const