88#ifndef G4TESSELLATEDSOLID_HH
89#define G4TESSELLATEDSOLID_HH 1
93#if defined(G4GEOM_USE_USOLIDS)
94#define G4GEOM_USE_UTESSELLATEDSOLID 1
97#if defined(G4GEOM_USE_UTESSELLATEDSOLID)
98 #define G4UTessellatedSolid G4TessellatedSolid
165 G4bool aAccurate =
false)
const;
167 G4bool aAccurate =
false)
const;
170 virtual std::ostream&
StreamInfo(std::ostream& os)
const;
218 G4double DistanceToInCandidates(
const std::vector<G4int>& candidates,
221 void DistanceToOutCandidates(
const std::vector<G4int>& candidates,
226 G4int& minCandidate)
const;
230 void SetExtremeFacets();
237 void CreateVertexList();
239 void PrecalculateInsides();
241 void SetRandomVectors();
250 G4int SetAllUsingStack(
const std::vector<G4int>& voxel,
251 const std::vector<G4int>& max,
254 void DeleteObjects ();
257 static G4bool CompareSortedVoxel(
const std::pair<G4int, G4double>& l,
258 const std::pair<G4int, G4double>& r);
272 mutable G4bool fRebuildPolyhedron =
false;
275 std::vector<G4VFacet*> fFacets;
276 std::set<G4VFacet*> fExtremeFacets;
283 std::vector<G4ThreeVector> fVertexList;
285 std::set<G4VertexInfo,G4VertexComparator> fFacetList;
289 G4bool fSolidClosed =
false;
291 std::vector<G4ThreeVector> fRandir;
322 return ( p.
x() < fMinExtent.
x() - tolerance
323 || p.
x() > fMaxExtent.
x() + tolerance
324 || p.
y() < fMinExtent.
y() - tolerance
325 || p.
y() > fMaxExtent.
y() + tolerance
326 || p.
z() < fMinExtent.
z() - tolerance
327 || p.
z() > fMaxExtent.
z() + tolerance);
virtual G4bool Normal(const G4ThreeVector &p, G4ThreeVector &n) const
G4double GetMinYExtent() const
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4int CheckStructure() const
virtual G4Polyhedron * GetPolyhedron() const
virtual G4double GetSurfaceArea()
G4double GetMinZExtent() const
virtual std::ostream & StreamInfo(std::ostream &os) const
G4TessellatedSolid & operator=(const G4TessellatedSolid &right)
G4double kCarToleranceHalf
G4TessellatedSolid & operator+=(const G4TessellatedSolid &right)
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4bool AddFacet(G4VFacet *aFacet)
void DisplayAllocatedMemory()
G4int GetNumberOfFacets() const
G4double GetMaxYExtent() const
G4double GetMaxZExtent() const
G4double GetMaxXExtent() const
G4bool GetSolidClosed() const
virtual G4double DistanceToOut(const G4ThreeVector &p) const
G4VFacet * GetFacet(G4int i) const
virtual G4double SafetyFromInside(const G4ThreeVector &p, G4bool aAccurate=false) const
G4double GetMinXExtent() const
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
void SetSolidClosed(const G4bool t)
G4int AllocatedMemoryWithoutVoxels()
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
virtual G4VisExtent GetExtent() const
virtual G4Polyhedron * CreatePolyhedron() const
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4Voxelizer & GetVoxels()
virtual G4GeometryType GetEntityType() const
virtual EInside Inside(const G4ThreeVector &p) const
G4int GetFacetIndex(const G4ThreeVector &p) const
virtual G4double SafetyFromOutside(const G4ThreeVector &p, G4bool aAccurate=false) const
void SetMaxVoxels(G4int max)
virtual ~G4TessellatedSolid()
virtual G4double GetCubicVolume()
virtual G4VSolid * Clone() const
virtual G4ThreeVector GetPointOnSurface() const
G4bool operator()(const G4VertexInfo &l, const G4VertexInfo &r) const
void SetMaxVoxels(G4int max)