def intersect_cylinder_line(self, direction, edge, start=None): if start is None: start = self.location (ccp, cp, l) = intersect_cylinder_line( start.sub(self.location).add(self.center), self.axis, self.distance_radius, self.distance_radiussq, direction, edge) # offset intersection if ccp: cl = start.add(cp.sub(ccp)) return (cl, ccp, cp, l) return (None, None, None, INFINITE)
def intersect_cylinder_line(self, direction, edge, start=None): if start is None: start = self.location (ccp, cp, l) = intersect_cylinder_line( padd(psub(start, self.location), self.center), self.axis, self.distance_radius, self.distance_radiussq, direction, edge) # offset intersection if ccp: cl = padd(start, psub(cp, ccp)) return (cl, ccp, cp, l) return (None, None, None, INFINITE)