mosp :: collide :: Point :: Class Point
[hide private]
[frames] | no frames]

Class Point

source code


A collidable point.


Author: P. Tute

Instance Methods [hide private]
 
__init__(self, x, y)
initializes the collidable point.
source code
 
collide_circle(self, x, y, radius)
Checks if this point collides with the given circle.
source code
 
collide_rectangle(self, x_min, y_min, x_max, y_max)
Checks if this point collides with the given rectangle.
source code
 
collide_polygon(corners)
Checks if this point collides with the given polygon.
source code
 
get_points(self)
Yields the coordinates (x, y) of the point.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, x, y)
(Constructor)

source code 

initializes the collidable point.

x and y are its coordinates.

Overrides: object.__init__

collide_polygon(corners)

source code 

Checks if this point collides with the given polygon.

Status: not implemented