Giter Site home page Giter Site logo

gjk_epa's Introduction

GJK/EPA

Implementation of GJK (Gilbert–Johnson–Keerthi) and EPA (Expanding Polytope Algorithm) algorithm's in 2D

Note: A lot of the functions are not optimized. I'll try to mark them at some point, but in general be aware that this is not an optimal implementation, just an implementation.

Note 2: Have not added support for concave shapes, although you can draw them.

Controls:

  • Q - switches between drawing and selecting mode. When drawing, a little red dot will follow the cursor
  • Drawing Mode:
    • Left Click - place vertex
    • Space - links the vertices in the order they were placed. Note: There is no testing for non-simple polygons yet, so KISS
  • Selecting Mode:
    • Left Click and Drag - move a shape around
    • Hold Left Click + Delete/Backspace - delete shape
    • Ctrl + Left Click - marks a shape. If 2 shapes are selected B replaces A and the new shape becomes B
    • Space - Calculates if intersecting

Build Requirements:

SFML 2.4.2 for rendering

References:

See Also:

gjk_epa's People

Contributors

inzombiak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

wyb314 jiang13

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.