83 const EAxis IgnoreMe )
109 if (noLeft == 0)
return false;
119 for(
G4int i=1; i<noLeft; ++i )
122 if (component <
min )
124 else if (component >
max )
146 for(
G4int i=1; i<noLeft; ++i )
174 for(
G4int i=1; i<noLeft; ++i )
209 if (noLeft==0)
return false;
211 if (other.
Empty())
return true;
217 const G4double minOther = minPointOther->operator()(axis);
242 if (std::fabs(normalOther(axis)) > std::fabs(
normal(axis)))
273 if (noLeft==0)
return false;
275 if (other.
Empty())
return true;
281 const G4double maxOther = maxPointOther->operator()(axis);
306 if (std::fabs(normalOther(axis)) > std::fabs(
normal(axis)))
342 if (noLeft == 0)
return false;
352 for(
G4int i=1; i<noLeft; ++i )
355 if (component <
min )
357 else if (component >
max )
387 if (tempPolygon.size() == 0)
416 G4int noVertices = pPolygon.size();
419 outputPolygon.clear();
421 for (
G4int i=0; i<noVertices; ++i)
433 if (pVoxelLimit.
Inside(vStart))
435 if (pVoxelLimit.
Inside(vEnd))
439 outputPolygon.push_back(vEnd);
446 outputPolygon.push_back(vEnd);
451 if (pVoxelLimit.
Inside(vEnd))
456 outputPolygon.push_back(vStart);
457 outputPolygon.push_back(vEnd);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
double dot(const Hep3Vector &) const
virtual G4bool GetPlanerExtent(const G4ThreeVector &pointOnPlane, const G4ThreeVector &planeNormal, G4double &min, G4double &max) const
virtual G4bool Clip(const G4VoxelLimits &voxelLimit)
virtual G4bool PartialClip(const G4VoxelLimits &voxelLimit, const EAxis IgnoreMe)
G4ThreeVectorList vertices
void ClipToSimpleLimits(G4ThreeVectorList &pPolygon, G4ThreeVectorList &outputPolygon, const G4VoxelLimits &pVoxelLimit)
virtual const G4ThreeVector * GetMinPoint(const EAxis axis) const
std::vector< G4ThreeVector > G4ThreeVectorList
virtual ~G4ClippablePolygon()
virtual void AddVertexInOrder(const G4ThreeVector vertex)
virtual G4bool GetExtent(const EAxis axis, G4double &min, G4double &max) const
virtual void ClearAllVertices()
virtual void ClipAlongOneAxis(const G4VoxelLimits &voxelLimit, const EAxis axis)
virtual G4bool InFrontOf(const G4ClippablePolygon &other, EAxis axis) const
virtual G4bool BehindOf(const G4ClippablePolygon &other, EAxis axis) const
const G4ThreeVector GetNormal() const
virtual const G4ThreeVector * GetMaxPoint(const EAxis axis) const
G4double GetSurfaceTolerance() const
static G4GeometryTolerance * GetInstance()
G4double GetMinExtent(const EAxis pAxis) const
G4bool ClipToLimits(G4ThreeVector &pStart, G4ThreeVector &pEnd) const
void AddLimit(const EAxis pAxis, const G4double pMin, const G4double pMax)
G4double GetMaxExtent(const EAxis pAxis) const
G4bool Inside(const G4ThreeVector &pVec) const
static const G4double kInfinity
static double normal(HepRandomEngine *eptr)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments