Geant4  10.00.p01
UVCSGface.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * This Software is part of the AIDA Unified Solids Library package *
4 // * See: https://aidasoft.web.cern.ch/USolids *
5 // ********************************************************************
6 //
7 // $Id:$
8 //
9 // --------------------------------------------------------------------
10 //
11 // UVCSGface
12 //
13 // Class description:
14 //
15 // Definition of the virtual base class UVCSGface, one side (or face)
16 // of a CSG-like solid. It should be possible to build a CSG entirely out of
17 // connecting CSG faces.
18 // Each face has an inside and outside surface, the former represents
19 // the inside of the volume, the latter, the outside.
20 //
21 // 19.09.13 Marek Gayer
22 // Created from original implementation in Geant4
23 // --------------------------------------------------------------------
24 
25 #ifndef UVCSGface_hh
26 #define UVCSGface_hh
27 
28 #include "UTypes.hh"
29 #include "VUSolid.hh"
30 
31 class UVoxelLimits;
32 class UAffineTransform;
33 class USolidExtentList;
34 
35 class UVCSGface
36 {
37  public: // with description
38 
39  UVCSGface() {}
40  virtual ~UVCSGface() {}
41 
42  virtual bool Distance(const UVector3& p, const UVector3& v,
43  bool outgoing, double surfTolerance,
44  double& distance, double& distFromSurface,
45  UVector3& normal, bool& allBehind) = 0;
46 
47  virtual double Safety(const UVector3& p, bool outgoing) = 0;
48 
49  virtual VUSolid::EnumInside Inside(const UVector3& p, double tolerance,
50  double* bestDistance) = 0;
51 
52  virtual UVector3 Normal(const UVector3& p,
53  double* bestDistance) = 0;
54 
55  virtual double Extent(const UVector3 axis) = 0;
56 
57  /* virtual void CalculateExtent( const EAxisType axis,
58  const UVoxelLimits &voxelLimit,
59  const UAffineTransform &tranform,
60  USolidExtentList &extentList ) = 0;*/
61 
62  virtual UVCSGface* Clone() = 0;
63 
64  virtual double SurfaceArea() = 0;
65  virtual UVector3 GetPointOnFace() = 0;
66 };
67 
68 #endif
virtual UVector3 GetPointOnFace()=0
virtual ~UVCSGface()
Definition: UVCSGface.hh:40
virtual bool Distance(const UVector3 &p, const UVector3 &v, bool outgoing, double surfTolerance, double &distance, double &distFromSurface, UVector3 &normal, bool &allBehind)=0
virtual UVCSGface * Clone()=0
static double normal(HepRandomEngine *eptr)
Definition: RandPoisson.cc:77
virtual VUSolid::EnumInside Inside(const UVector3 &p, double tolerance, double *bestDistance)=0
EnumInside
Definition: VUSolid.hh:23
virtual double Safety(const UVector3 &p, bool outgoing)=0
virtual double Extent(const UVector3 axis)=0
virtual UVector3 Normal(const UVector3 &p, double *bestDistance)=0
virtual double SurfaceArea()=0