Exemple #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))
Exemple #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))
Exemple #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]
Exemple #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]
Exemple #5
0
	def split(self):
		a,b = Cursor.split(self)
		return (PLine(a), PLine(b))
Exemple #6
0
	def __init__(self, *x):
		Cursor.__init__(self, *x)
Exemple #7
0
 def split(self):
     a, b = Cursor.split(self)
     return (PLine(a), PLine(b))
Exemple #8
0
 def __init__(self, *x):
     Cursor.__init__(self, *x)
Exemple #9
0
def cursorAtPosition(self, position):
	"""Returns a 'cursor' object for this line thats closest to this position
        """

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