pyj2d :: sprite :: collide_circle_ratio :: Class collide_circle_ratio

Class collide_circle_ratio

object --+
         |
        collide_circle_ratio

pyj2d.sprite.collide_circle_ratio

Return a callable that checks two sprites intersect by checking by intersection of circle around their centers. The ratio attribute will determine scaling of the circle, where 1.0 is same size. Will use sprite radius attribute or circle will encompass rect attribute. Can be used as spritecollide callback function.

Instance Methods
 
__init__(self, ratio)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__call__(self, sprite1, sprite2)

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

Properties

Inherited from object: __class__

Method Details

__init__(self, ratio)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)