Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -45,7 +45,7 @@ G4Curve* G4CompositeCurve::Project(const G4Transform3D& tr)
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void G4CompositeCurve::IntersectRay2D(const G4Ray& ray,
|
||||
G4CurveRayIntersection& is)
|
||||
{
|
||||
@@ -62,7 +62,26 @@ void G4CompositeCurve::IntersectRay2D(const G4Ray& ray,
|
||||
|
||||
lastIntersection= is;
|
||||
}
|
||||
*/
|
||||
|
||||
G4int G4CompositeCurve::IntersectRay2D(const G4Ray& ray)
|
||||
{
|
||||
G4int nbinter = 0, temp = 0;
|
||||
|
||||
for (G4int i=0; i<segments.entries(); i++)
|
||||
{
|
||||
G4Curve& c= *(segments(i));
|
||||
temp = c.IntersectRay2D(ray);
|
||||
|
||||
// test if the point is on the composite curve
|
||||
if( temp==999 )
|
||||
return 999;
|
||||
else
|
||||
nbinter+= temp;
|
||||
}
|
||||
|
||||
return nbinter;
|
||||
}
|
||||
|
||||
G4bool G4CompositeCurve::Tangent(G4CurvePoint& cp, G4Vector3D& v)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user