00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef G4ReflectedSolid_HH
00043 #define G4ReflectedSolid_HH
00044
00045 #include "G4VSolid.hh"
00046 #include "G4RotationMatrix.hh"
00047 #include "G4ThreeVector.hh"
00048 #include "G4Transform3D.hh"
00049 #include "G4AffineTransform.hh"
00050
00051 class G4ReflectedSolid : public G4VSolid
00052 {
00053 public:
00054
00055 G4ReflectedSolid( const G4String& pName,
00056 G4VSolid* pSolid ,
00057 const G4Transform3D& transform ) ;
00058
00059
00060 virtual ~G4ReflectedSolid() ;
00061
00062
00063 public:
00064
00065
00066
00067 EInside Inside( const G4ThreeVector& p ) const;
00068
00069 G4bool CalculateExtent( const EAxis pAxis,
00070 const G4VoxelLimits& pVoxelLimit,
00071 const G4AffineTransform& pTransform,
00072 G4double& pMin, G4double& pMax) const;
00073
00074 G4ThreeVector SurfaceNormal( const G4ThreeVector& p ) const;
00075
00076 G4double DistanceToIn( const G4ThreeVector& p,
00077 const G4ThreeVector& v ) const;
00078
00079 G4double DistanceToIn( const G4ThreeVector& p) const;
00080
00081 G4double DistanceToOut( const G4ThreeVector& p,
00082 const G4ThreeVector& v,
00083 const G4bool calcNorm=false,
00084 G4bool *validNorm=0,
00085 G4ThreeVector *n=0 ) const;
00086
00087 G4double DistanceToOut( const G4ThreeVector& p ) const ;
00088
00089 void ComputeDimensions( G4VPVParameterisation* p,
00090 const G4int n,
00091 const G4VPhysicalVolume* pRep );
00092
00093 G4ThreeVector GetPointOnSurface() const;
00094
00095 G4VSolid* Clone() const;
00096
00097 public:
00098
00099 virtual G4GeometryType GetEntityType() const;
00100
00101 virtual const G4ReflectedSolid* GetReflectedSolidPtr() const;
00102 virtual G4ReflectedSolid* GetReflectedSolidPtr();
00103
00104
00105
00106 G4VSolid* GetConstituentMovedSolid() const;
00107
00108 G4Transform3D GetTransform3D() const;
00109 void SetTransform3D(G4Transform3D&);
00110 G4Transform3D GetDirectTransform3D() const;
00111 void SetDirectTransform3D(G4Transform3D&);
00112
00113
00114 std::ostream& StreamInfo(std::ostream& os) const;
00115
00116 public:
00117
00118 G4ReflectedSolid(const G4ReflectedSolid& rhs);
00119 G4ReflectedSolid& operator=(const G4ReflectedSolid& rhs);
00120
00121
00122 void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
00123 G4Polyhedron* CreatePolyhedron () const ;
00124 G4NURBS* CreateNURBS () const ;
00125 G4Polyhedron* GetPolyhedron () const;
00126
00127
00128 protected:
00129
00130 G4AffineTransform GetTransform() const;
00131 void SetTransform(G4AffineTransform&);
00132 G4AffineTransform GetDirectTransform() const;
00133 void SetDirectTransform(G4AffineTransform&);
00134 G4RotationMatrix GetFrameRotation() const;
00135 void SetFrameRotation(const G4RotationMatrix&);
00136 G4ThreeVector GetFrameTranslation() const;
00137 void SetFrameTranslation(const G4ThreeVector&);
00138
00139
00140
00141 G4RotationMatrix GetObjectRotation() const;
00142 void SetObjectRotation(const G4RotationMatrix&);
00143 G4ThreeVector GetObjectTranslation() const;
00144 void SetObjectTranslation(const G4ThreeVector&);
00145
00146
00147 G4VSolid* fPtrSolid ;
00148 G4AffineTransform* fPtrTransform ;
00149 G4AffineTransform* fDirectTransform ;
00150
00151 G4Transform3D* fPtrTransform3D ;
00152 G4Transform3D* fDirectTransform3D ;
00153
00154 mutable G4Polyhedron* fpPolyhedron;
00155
00156 } ;
00157
00158 #endif