Beispiel #1
0
 def intersect_torus_point(self, direction, point, start=None):
     if start is None:
         start = self.location
     (ccp, cp, l) = intersect_torus_point(
         padd(psub(start, self.location),
              self.center), self.axis, self.distance_majorradius,
         self.distance_minorradius, self.distance_majorradiussq,
         self.distance_minorradiussq, direction, point)
     if ccp:
         cl = padd(point, psub(start, ccp))
         return (cl, ccp, point, l)
     return (None, None, None, INFINITE)
Beispiel #2
0
 def intersect_torus_point(self, direction, point, start=None):
     if start is None:
         start = self.location
     (ccp, cp, l) = intersect_torus_point(
             padd(psub(start, self.location), self.center),
             self.axis, self.distance_majorradius, self.distance_minorradius,
             self.distance_majorradiussq, self.distance_minorradiussq,
             direction, point)
     if ccp:
         cl = padd(point, psub(start, ccp))
         return (cl, ccp, point, l)
     return (None, None, None, INFINITE)