Skip to main content

Collides a point with a space defined by a curve.

Project description

Coverage Status Github Build Status

See https://kivy-garden.github.io/collider/ for the rendered collider docs.

Please see the garden instructions for how to use kivy garden flowers.

Collider

See http://kivy-garden.github.io/garden.collider/index.html for html docs.

The collider module contains classes which can be used to test membership of a point in some space. See individual class documentation for details.

For example, using the Collide2DPoly class we can test whether points fall within a general polygon, e.g. a simple triangle::

>>> collider = Collide2DPoly([10., 10., 20., 30., 30., 10.],\
                             cache=True)
>>> (0.0, 0.0) in collider
False
>>> (20.0, 20.0) in collider
True

Install

To install with pip::

pip install kivy_garden.collider

To build or re-build locally::

PYTHONPATH=.:$PYTHONPATH python setup.py build_ext --inplace

Or to install as editable (package is installed, but can be edited in its original location)::

pip install -e .

CI

Every push or pull request run the GitHub Action CI. It tests the code on various OS and also generates wheels that can be released on PyPI upon a tag. Docs are also generated and uploaded to the repo as well as artifacts of the CI.

TODO

  • add your code

Contributing

Check out our contribution guide and feel free to improve the flower.

License

This software is released under the terms of the MIT License. Please see the LICENSE.txt file.

How to release

  • update __version__ in kivy-garden/collider/__init__.py to the latest version.
  • update CHANGELOG.md and commit the changes
  • call git tag -a x.y.z -m "Tagging version x.y.z"
  • for each python version you want to release call python setup.py bdist_wheel, which generates the wheels. Call once python setup.py sdist to generate the sdist. They are saved in the dist/* directory
  • Make sure the dist directory contains the files to be uploaded to pypi and call twine check dist/*
  • then call twine upload dist/* to upload to pypi.
  • call git push origin master --tags to push the latest changes and the tags to github.

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for kivy-garden.collider, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size kivy_garden.collider-0.1.0-cp35-cp35m-macosx_10_13_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (47.2 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp35-cp35m-manylinux1_x86_64.whl (185.4 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp35-cp35m-manylinux2010_x86_64.whl (185.4 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp36-cp36m-macosx_10_13_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (48.8 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp36-cp36m-manylinux1_x86_64.whl (190.1 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp36-cp36m-manylinux2010_x86_64.whl (190.1 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp36-cp36m-win32.whl (45.6 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp36-cp36m-win_amd64.whl (52.4 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp37-cp37m-macosx_10_13_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (47.6 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp37-cp37m-manylinux1_x86_64.whl (189.0 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp37-cp37m-manylinux2010_x86_64.whl (189.0 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp37-cp37m-win32.whl (40.3 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp37-cp37m-win_amd64.whl (47.8 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp38-cp38-macosx_10_13_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (48.2 kB) File type Wheel Python version cp38 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp38-cp38-manylinux1_x86_64.whl (211.0 kB) File type Wheel Python version cp38 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp38-cp38-manylinux2010_x86_64.whl (211.0 kB) File type Wheel Python version cp38 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp38-cp38-win32.whl (41.2 kB) File type Wheel Python version cp38 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0-cp38-cp38-win_amd64.whl (48.6 kB) File type Wheel Python version cp38 Upload date Hashes View hashes
Filename, size kivy_garden.collider-0.1.0.tar.gz (10.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page