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


Download files

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

Source Distribution

kivy_garden.collider-0.1.2.tar.gz (11.8 kB view hashes)

Uploaded Source

Built Distributions

kivy_garden.collider-0.1.2-cp310-cp310-win_amd64.whl (43.7 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

kivy_garden.collider-0.1.2-cp310-cp310-win32.whl (38.9 kB view hashes)

Uploaded CPython 3.10 Windows x86

kivy_garden.collider-0.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (243.3 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

kivy_garden.collider-0.1.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (245.0 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

kivy_garden.collider-0.1.2-cp310-cp310-macosx_11_0_arm64.whl (43.8 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

kivy_garden.collider-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl (48.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

kivy_garden.collider-0.1.2-cp310-cp310-macosx_10_9_universal2.whl (86.5 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

kivy_garden.collider-0.1.2-cp39-cp39-win_amd64.whl (43.7 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

kivy_garden.collider-0.1.2-cp39-cp39-win32.whl (38.8 kB view hashes)

Uploaded CPython 3.9 Windows x86

kivy_garden.collider-0.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (243.5 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

kivy_garden.collider-0.1.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (245.4 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

kivy_garden.collider-0.1.2-cp39-cp39-macosx_11_0_arm64.whl (43.8 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

kivy_garden.collider-0.1.2-cp39-cp39-macosx_10_9_x86_64.whl (48.3 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

kivy_garden.collider-0.1.2-cp39-cp39-macosx_10_9_universal2.whl (86.5 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

kivy_garden.collider-0.1.2-cp38-cp38-win_amd64.whl (43.7 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

kivy_garden.collider-0.1.2-cp38-cp38-win32.whl (38.7 kB view hashes)

Uploaded CPython 3.8 Windows x86

kivy_garden.collider-0.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (240.5 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

kivy_garden.collider-0.1.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (243.0 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

kivy_garden.collider-0.1.2-cp38-cp38-macosx_11_0_arm64.whl (43.1 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

kivy_garden.collider-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl (46.6 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

kivy_garden.collider-0.1.2-cp38-cp38-macosx_10_9_universal2.whl (84.4 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

kivy_garden.collider-0.1.2-cp37-cp37m-win_amd64.whl (42.9 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

kivy_garden.collider-0.1.2-cp37-cp37m-win32.whl (38.6 kB view hashes)

Uploaded CPython 3.7m Windows x86

kivy_garden.collider-0.1.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (220.4 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

kivy_garden.collider-0.1.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (224.9 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

kivy_garden.collider-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl (46.0 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page