Ejemplo n.º 1
0
    def closest(self, position):
        """
		Obtain a Cursor at the point closest to 'position'
		
		Finds the point on this PLine that's closest to the point 'position' and returns a Cursor at that point
		"""
        return PCursor(Cursor.cursorFromClosestPoint(self.line, position))
Ejemplo n.º 2
0
	def closest(self, position):
		"""
		Obtain a Cursor at the point closest to 'position'
		
		Finds the point on this PLine that's closest to the point 'position' and returns a Cursor at that point
		"""
		return PCursor(Cursor.cursorFromClosestPoint(self.line, position))
Ejemplo n.º 3
0
	def minima(self, position):
		"""
		Find minimal points on line.

		returns a list of Cursors that are at all the places where this line reaches points that are minima of the distance function between this line and 'position'
		"""
		ll = Cursor.cursorsFromMinimalApproach(self.line, Vector2(position[0], position[1]))
		return [PCursor(x) for x in ll]
Ejemplo n.º 4
0
    def minima(self, position):
        """
		Find minimal points on line.

		returns a list of Cursors that are at all the places where this line reaches points that are minima of the distance function between this line and 'position'
		"""
        ll = Cursor.cursorsFromMinimalApproach(
            self.line, Vector2(position[0], position[1]))
        return [PCursor(x) for x in ll]
Ejemplo n.º 5
0
	def split(self):
		a,b = Cursor.split(self)
		return (PLine(a), PLine(b))
Ejemplo n.º 6
0
	def __init__(self, *x):
		Cursor.__init__(self, *x)
Ejemplo n.º 7
0
 def split(self):
     a, b = Cursor.split(self)
     return (PLine(a), PLine(b))
Ejemplo n.º 8
0
 def __init__(self, *x):
     Cursor.__init__(self, *x)
Ejemplo n.º 9
0
def cursorAtPosition(self, position):
	"""Returns a 'cursor' object for this line thats closest to this position
        """

	return PCursor(Cursor.cursorFromClosestPoint(self, position))