File indexing completed on 2025-01-18 09:59:21
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 #ifndef G4VFACET_HH
0038 #define G4VFACET_HH
0039
0040 #include <iostream>
0041 #include <vector>
0042
0043 #include "globals.hh"
0044 #include "windefs.hh"
0045 #include "G4ThreeVector.hh"
0046 #include "G4VSolid.hh"
0047
0048 enum G4FacetVertexType { ABSOLUTE, RELATIVE };
0049
0050 class G4VFacet
0051 {
0052 public:
0053
0054 G4VFacet();
0055 virtual ~G4VFacet ();
0056
0057 G4bool operator== (const G4VFacet& right) const;
0058
0059 virtual G4int GetNumberOfVertices () const = 0;
0060 virtual G4ThreeVector GetVertex (G4int i) const = 0;
0061 virtual void SetVertex (G4int i, const G4ThreeVector& val) = 0;
0062 virtual G4GeometryType GetEntityType () const = 0;
0063 virtual G4ThreeVector GetSurfaceNormal () const = 0;
0064 virtual G4bool IsDefined () const = 0;
0065 virtual G4ThreeVector GetCircumcentre () const = 0;
0066 virtual G4double GetRadius () const = 0;
0067 virtual G4VFacet* GetClone () = 0;
0068 virtual G4double Distance (const G4ThreeVector&, G4double) = 0;
0069 virtual G4double Distance (const G4ThreeVector&, G4double,
0070 const G4bool) = 0;
0071 virtual G4double Extent (const G4ThreeVector) = 0;
0072 virtual G4bool Intersect (const G4ThreeVector&, const G4ThreeVector&,
0073 const G4bool, G4double&, G4double&,
0074 G4ThreeVector&) = 0;
0075 virtual G4double GetArea() const = 0;
0076 virtual G4ThreeVector GetPointOnFace() const = 0;
0077
0078 void ApplyTranslation (const G4ThreeVector& v);
0079
0080 std::ostream& StreamInfo(std::ostream& os) const;
0081
0082 G4bool IsInside(const G4ThreeVector& p) const;
0083
0084 virtual G4int AllocatedMemory() = 0;
0085 virtual void SetVertexIndex (G4int i, G4int j) = 0;
0086 virtual G4int GetVertexIndex (G4int i) const = 0;
0087
0088 virtual void SetVertices(std::vector<G4ThreeVector>* vertices) = 0;
0089
0090 protected:
0091
0092 static const G4double dirTolerance;
0093 G4double kCarTolerance;
0094 };
0095
0096 #endif