Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4BREPSolidCone Class Reference

#include <G4BREPSolidCone.hh>

+ Inheritance diagram for G4BREPSolidCone:

Public Member Functions

 G4BREPSolidCone (const G4String &name, const G4ThreeVector &origin, const G4ThreeVector &axis, const G4ThreeVector &direction, G4double length, G4double radius, G4double large_radius)
 
 ~G4BREPSolidCone ()
 
void Initialize ()
 
EInside Inside (register const G4ThreeVector &Pt) const
 
G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const
 
G4double DistanceToIn (const G4ThreeVector &p) const
 
G4double DistanceToIn (register const G4ThreeVector &p, register const G4ThreeVector &v) const
 
G4double DistanceToOut (register const G4ThreeVector &p, register const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
 
G4double DistanceToOut (const G4ThreeVector &p) const
 
G4VSolidClone () const
 
std::ostream & StreamInfo (std::ostream &os) const
 
 G4BREPSolidCone (__void__ &)
 
 G4BREPSolidCone (const G4BREPSolidCone &rhs)
 
G4BREPSolidConeoperator= (const G4BREPSolidCone &rhs)
 
- Public Member Functions inherited from G4BREPSolid
 G4BREPSolid (const G4String &name)
 
 G4BREPSolid (const G4String &, G4Surface **, G4int)
 
virtual ~G4BREPSolid ()
 
virtual void Initialize ()
 
G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
 
virtual EInside Inside (register const G4ThreeVector &Pt) const
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &) const
 
virtual G4double DistanceToIn (const G4ThreeVector &) const
 
virtual G4double DistanceToIn (register const G4ThreeVector &Pt, register const G4ThreeVector &V) const
 
virtual G4double DistanceToOut (const G4ThreeVector &) const
 
virtual G4double DistanceToOut (register const G4ThreeVector &Pt, register const G4ThreeVector &V, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
 
G4Point3D Scope () const
 
virtual G4String GetEntityType () const
 
virtual G4VSolidClone () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const
 
void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
G4PolyhedronCreatePolyhedron () const
 
G4NURBSCreateNURBS () const
 
virtual G4PolyhedronGetPolyhedron () const
 
G4int Intersect (register const G4Ray &) const
 
G4SurfaceGetSurface (G4int) const
 
void Active (G4int) const
 
G4int Active () const
 
G4double GetShortestDistance () const
 
G4int GetId () const
 
void SetId (G4int)
 
const G4StringGetName () const
 
void SetName (const G4String &name)
 
G4int GetNumberOfFaces () const
 
G4int GetNumberOfSolids () const
 
const G4Axis2Placement3DGetPlace () const
 
const G4BoundingBox3DGetBBox () const
 
G4int GetCubVolStatistics () const
 
G4double GetCubVolEpsilon () const
 
void SetCubVolStatistics (G4int st)
 
void SetCubVolEpsilon (G4double ep)
 
G4int GetAreaStatistics () const
 
G4double GetAreaAccuracy () const
 
void SetAreaStatistics (G4int st)
 
void SetAreaAccuracy (G4double ep)
 
G4double GetCubicVolume ()
 
G4double GetSurfaceArea ()
 
G4double IntersectionDistance () const
 
void IntersectionDistance (G4double) const
 
virtual void Reset () const
 
 G4BREPSolid (__void__ &)
 
 G4BREPSolid (const G4BREPSolid &rhs)
 
G4BREPSolidoperator= (const G4BREPSolid &rhs)
 
- Public Member Functions inherited from G4VSolid
 G4VSolid (const G4String &name)
 
virtual ~G4VSolid ()
 
G4bool operator== (const G4VSolid &s) const
 
G4String GetName () const
 
void SetName (const G4String &name)
 
G4double GetTolerance () const
 
virtual G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
 
virtual EInside Inside (const G4ThreeVector &p) const =0
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p) const =0
 
virtual void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
virtual G4double GetCubicVolume ()
 
virtual G4double GetSurfaceArea ()
 
virtual G4GeometryType GetEntityType () const =0
 
virtual G4ThreeVector GetPointOnSurface () const
 
virtual G4VSolidClone () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const =0
 
void DumpInfo () const
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const =0
 
virtual G4VisExtent GetExtent () const
 
virtual G4PolyhedronCreatePolyhedron () const
 
virtual G4NURBSCreateNURBS () const
 
virtual G4PolyhedronGetPolyhedron () const
 
virtual const G4VSolidGetConstituentSolid (G4int no) const
 
virtual G4VSolidGetConstituentSolid (G4int no)
 
virtual const G4DisplacedSolidGetDisplacedSolidPtr () const
 
virtual G4DisplacedSolidGetDisplacedSolidPtr ()
 
 G4VSolid (__void__ &)
 
 G4VSolid (const G4VSolid &rhs)
 
G4VSolidoperator= (const G4VSolid &rhs)
 

Additional Inherited Members

- Protected Member Functions inherited from G4BREPSolid
G4ThreeVectorListCreateRotatedVertices (const G4AffineTransform &) const
 
G4bool IsConvex ()
 
virtual void CalcBBoxes ()
 
void CheckSurfaceNormals ()
 
void RemoveHiddenFaces (register const G4Ray &G4Rayref, G4int) const
 
void TestSurfaceBBoxes (register const G4Ray &) const
 
G4int StartInside () const
 
void StartInside (G4int si) const
 
void QuickSort (register G4Surface **SrfVec, register G4int left, register G4int right) const
 
- Protected Member Functions inherited from G4VSolid
void CalculateClippedPolygonExtent (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipCrossSection (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipBetweenSections (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipPolygon (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 
- Protected Attributes inherited from G4BREPSolid
G4int Box
 
G4int Convex
 
G4int AxisBox
 
G4int PlaneSolid
 
G4Axis2Placement3Dplace
 
G4BoundingBox3Dbbox
 
G4double intersectionDistance
 
G4int active
 
G4int startInside
 
G4int nb_of_surfaces
 
G4Point3D intersection_point
 
G4Surface ** SurfaceVec
 
G4double RealDist
 
G4String solidname
 
G4int Id
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 
- Static Protected Attributes inherited from G4BREPSolid
static G4int NumberOfSolids =0
 
static G4Ray Track
 
static G4double ShortestDistance = kInfinity
 

Detailed Description

Definition at line 52 of file G4BREPSolidCone.hh.

Constructor & Destructor Documentation

◆ G4BREPSolidCone() [1/3]

G4BREPSolidCone::G4BREPSolidCone ( const G4String name,
const G4ThreeVector origin,
const G4ThreeVector axis,
const G4ThreeVector direction,
G4double  length,
G4double  radius,
G4double  large_radius 
)

Definition at line 41 of file G4BREPSolidCone.cc.

48 : G4BREPSolid(name)
49{
51 active=1;
52
53 // Save constructor parameters
54 constructorParams.origin = origin;
55 constructorParams.axis = axis;
56 constructorParams.direction = direction;
57 constructorParams.length = length;
58 constructorParams.radius = radius;
59 constructorParams.large_radius = large_radius;
60
61 InitializeCone();
62}
G4int nb_of_surfaces
Definition: G4BREPSolid.hh:229

◆ ~G4BREPSolidCone()

G4BREPSolidCone::~G4BREPSolidCone ( )

Definition at line 69 of file G4BREPSolidCone.cc.

70{
71}

◆ G4BREPSolidCone() [2/3]

G4BREPSolidCone::G4BREPSolidCone ( __void__ &  a)

Definition at line 64 of file G4BREPSolidCone.cc.

65 : G4BREPSolid(a)
66{
67}

◆ G4BREPSolidCone() [3/3]

G4BREPSolidCone::G4BREPSolidCone ( const G4BREPSolidCone rhs)

Definition at line 73 of file G4BREPSolidCone.cc.

74 : G4BREPSolid(rhs)
75{
76 constructorParams.origin = rhs.constructorParams.origin;
77 constructorParams.axis = rhs.constructorParams.axis;
78 constructorParams.direction = rhs.constructorParams.direction;
79 constructorParams.length = rhs.constructorParams.length;
80 constructorParams.radius = rhs.constructorParams.radius;
81 constructorParams.large_radius = rhs.constructorParams.large_radius;
82
83 InitializeCone();
84}

Member Function Documentation

◆ Clone()

G4VSolid * G4BREPSolidCone::Clone ( ) const
virtual

Reimplemented from G4BREPSolid.

Definition at line 268 of file G4BREPSolidCone.cc.

269{
270 return new G4BREPSolidCone(*this);
271}

◆ DistanceToIn() [1/2]

G4double G4BREPSolidCone::DistanceToIn ( const G4ThreeVector p) const
virtual

Reimplemented from G4BREPSolid.

Definition at line 207 of file G4BREPSolidCone.cc.

208{
209 G4double dist1 = std::fabs(SurfaceVec[0]->HowNear(Pt));
210 G4double dist2 = std::fabs(SurfaceVec[1]->ClosestDistanceToPoint(Pt));
211 G4double dist3 = std::fabs(SurfaceVec[2]->ClosestDistanceToPoint(Pt));
212 if(dist1 > dist2) dist1 = dist2;
213 if(dist1 > dist3) dist1 = dist3;
214 return dist1;
215
216}
double G4double
Definition: G4Types.hh:64
G4Surface ** SurfaceVec
Definition: G4BREPSolid.hh:231

◆ DistanceToIn() [2/2]

G4double G4BREPSolidCone::DistanceToIn ( register const G4ThreeVector p,
register const G4ThreeVector v 
) const
virtual

Reimplemented from G4BREPSolid.

Definition at line 218 of file G4BREPSolidCone.cc.

220{
221 Reset();
222 G4Vector3D Pttmp(Pt);
223 G4Vector3D Vtmp(V);
224 // G4double kInfinity = 10e20;
225 G4Ray r(Pttmp, Vtmp);
226
227 if(SurfaceVec[0]->Intersect( r ))
228 {
230 return ShortestDistance;
231 }
232 return kInfinity;
233}
G4int Intersect(register const G4Ray &) const
virtual void Reset() const
Definition: G4BREPSolid.cc:201
static G4double ShortestDistance
Definition: G4BREPSolid.hh:221
Definition: G4Ray.hh:49
G4double GetDistance() const

◆ DistanceToOut() [1/2]

G4double G4BREPSolidCone::DistanceToOut ( const G4ThreeVector p) const
virtual

Reimplemented from G4BREPSolid.

Definition at line 258 of file G4BREPSolidCone.cc.

259{
260 G4double dist1 = std::fabs(SurfaceVec[0]->HowNear(Pt));
261 G4double dist2 = std::fabs(SurfaceVec[1]->ClosestDistanceToPoint(Pt));
262 G4double dist3 = std::fabs(SurfaceVec[2]->ClosestDistanceToPoint(Pt));
263 if(dist1 > dist2) dist1 = dist2;
264 if(dist1 > dist3) dist1 = dist3;
265 return dist1;
266}

◆ DistanceToOut() [2/2]

G4double G4BREPSolidCone::DistanceToOut ( register const G4ThreeVector p,
register const G4ThreeVector v,
const G4bool  calcNorm = false,
G4bool validNorm = 0,
G4ThreeVector n = 0 
) const
virtual

Reimplemented from G4BREPSolid.

Definition at line 235 of file G4BREPSolidCone.cc.

240{
241 if(validNorm)
242 *validNorm = false;
243 Reset();
244
245 G4Vector3D Pttmp(Pt);
246 G4Vector3D Vtmp(V);
247 // G4double kInfinity = 10e20;
248
249 G4Ray r(Pttmp, Vtmp);
250 if(SurfaceVec[0]->Intersect( r ))
251 {
253 return ShortestDistance;
254 }
255 return kInfinity;
256}

◆ Initialize()

void G4BREPSolidCone::Initialize ( )
virtual

Reimplemented from G4BREPSolid.

Definition at line 177 of file G4BREPSolidCone.cc.

178{
179 // Calc bounding box for solids and surfaces
180 // Convert concave planes to convex
181 //
182 ShortestDistance=1000000;
184 if(!Box || !AxisBox) { IsConvex(); }
185 CalcBBoxes();
186}
G4bool IsConvex()
Definition: G4BREPSolid.cc:460
void CheckSurfaceNormals()
Definition: G4BREPSolid.cc:213
virtual void CalcBBoxes()

◆ Inside()

EInside G4BREPSolidCone::Inside ( register const G4ThreeVector Pt) const
virtual

Reimplemented from G4BREPSolid.

Definition at line 188 of file G4BREPSolidCone.cc.

189{
190 G4double dist1 = SurfaceVec[0]->HowNear(Pt);
193 if(dist1 > dist2) dist1 = dist2;
194 if(dist1 > dist3) dist1 = dist3;
195 if(dist1 > 0) return kInside;
196 if(dist1 < 0) return kOutside;
197 return kSurface;
198}
virtual G4double ClosestDistanceToPoint(const G4Point3D &Pt)
Definition: G4Surface.cc:203
virtual G4double HowNear(const G4Vector3D &x) const
Definition: G4Surface.cc:283
@ kInside
Definition: geomdefs.hh:58
@ kOutside
Definition: geomdefs.hh:58
@ kSurface
Definition: geomdefs.hh:58

◆ operator=()

G4BREPSolidCone & G4BREPSolidCone::operator= ( const G4BREPSolidCone rhs)

Definition at line 86 of file G4BREPSolidCone.cc.

87{
88 // Check assignment to self
89 //
90 if (this == &rhs) { return *this; }
91
92 // Copy base class data
93 //
95
96 // Copy data
97 //
98 constructorParams.origin = rhs.constructorParams.origin;
99 constructorParams.axis = rhs.constructorParams.axis;
100 constructorParams.direction = rhs.constructorParams.direction;
101 constructorParams.length = rhs.constructorParams.length;
102 constructorParams.radius = rhs.constructorParams.radius;
103 constructorParams.large_radius = rhs.constructorParams.large_radius;
104
105 InitializeCone();
106
107 return *this;
108}
G4BREPSolid & operator=(const G4BREPSolid &rhs)
Definition: G4BREPSolid.cc:138

◆ StreamInfo()

std::ostream & G4BREPSolidCone::StreamInfo ( std::ostream &  os) const
virtual

Reimplemented from G4BREPSolid.

Definition at line 273 of file G4BREPSolidCone.cc.

274{
275 // Streams solid contents to output stream.
276
278 << "\n origin: " << constructorParams.origin
279 << "\n axis: " << constructorParams.axis
280 << "\n direction: " << constructorParams.direction
281 << "\n length: " << constructorParams.length
282 << "\n radius: " << constructorParams.radius
283 << "\n large_radius: " << constructorParams.large_radius
284 << "\n-----------------------------------------------------------\n";
285
286 return os;
287}
virtual std::ostream & StreamInfo(std::ostream &os) const

◆ SurfaceNormal()

G4ThreeVector G4BREPSolidCone::SurfaceNormal ( const G4ThreeVector p) const
virtual

Reimplemented from G4BREPSolid.

Definition at line 200 of file G4BREPSolidCone.cc.

201{
202 G4Vector3D n = SurfaceVec[0]->Normal(Pt);
203 G4ThreeVector norm(n.x(), n.y(), n.z());
204 return norm;
205}
virtual G4Vector3D Normal(const G4Vector3D &p) const
Definition: G4Surface.cc:162

The documentation for this class was generated from the following files: