102 const EAxis IgnoreMe )
129 if (noLeft == 0)
return false;
134 min = max =
vertices[0].operator()( axis );
140 for( i=1; i<noLeft; i++ )
143 if (component < min )
145 else if (component > max )
170 for( i=1; i<noLeft; i++ )
201 for( i=1; i<noLeft; i++ )
238 if (noLeft==0)
return false;
240 if (other.
Empty())
return true;
246 const G4double minOther = minPointOther->operator()(axis);
271 if (std::fabs(normalOther(axis)) > std::fabs(
normal(axis)))
303 if (noLeft==0)
return false;
305 if (other.
Empty())
return true;
311 const G4double maxOther = maxPointOther->operator()(axis);
336 if (std::fabs(normalOther(axis)) > std::fabs(
normal(axis)))
374 if (noLeft == 0)
return false;
379 min = max = planeNormal.dot(
vertices[0]-pointOnPlane);
385 for( i=1; i<noLeft; i++ )
388 if (component < min )
390 else if (component > max )
420 if (tempPolygon.size() == 0)
450 G4int noVertices=pPolygon.size();
453 outputPolygon.clear();
455 for (i=0;i<noVertices;i++)
467 if (pVoxelLimit.
Inside(vStart))
469 if (pVoxelLimit.
Inside(vEnd))
473 outputPolygon.push_back(vEnd);
480 outputPolygon.push_back(vEnd);
485 if (pVoxelLimit.
Inside(vEnd))
490 outputPolygon.push_back(vStart);
491 outputPolygon.push_back(vEnd);
virtual G4bool InFrontOf(const G4ClippablePolygon &other, EAxis axis) const
static const G4double kInfinity
CLHEP::Hep3Vector G4ThreeVector
virtual void ClipAlongOneAxis(const G4VoxelLimits &voxelLimit, const EAxis axis)
virtual G4bool GetPlanerExtent(const G4ThreeVector &pointOnPlane, const G4ThreeVector &planeNormal, G4double &min, G4double &max) const
G4double GetSurfaceTolerance() const
virtual G4bool PartialClip(const G4VoxelLimits &voxelLimit, const EAxis IgnoreMe)
virtual void AddVertexInOrder(const G4ThreeVector vertex)
virtual void ClearAllVertices()
virtual const G4ThreeVector * GetMinPoint(const EAxis axis) const
virtual G4bool BehindOf(const G4ClippablePolygon &other, EAxis axis) const
const G4ThreeVector GetNormal() const
virtual G4bool GetExtent(const EAxis axis, G4double &min, G4double &max) const
static double normal(HepRandomEngine *eptr)
virtual const G4ThreeVector * GetMaxPoint(const EAxis axis) const
virtual G4bool Clip(const G4VoxelLimits &voxelLimit)
void AddLimit(const EAxis pAxis, const G4double pMin, const G4double pMax)
std::vector< G4ThreeVector > G4ThreeVectorList
G4ThreeVectorList vertices
G4bool Inside(const G4ThreeVector &pVec) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
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
void ClipToSimpleLimits(G4ThreeVectorList &pPolygon, G4ThreeVectorList &outputPolygon, const G4VoxelLimits &pVoxelLimit)
virtual ~G4ClippablePolygon()
G4double GetMaxExtent(const EAxis pAxis) const
G4double GetMinExtent(const EAxis pAxis) const
static G4GeometryTolerance * GetInstance()
G4bool ClipToLimits(G4ThreeVector &pStart, G4ThreeVector &pEnd) const