Skip to content

inzombiak/GJK_EPA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

Releases

No releases published

Packages

No packages published

Languages