Genbox / VelcroPhysics

High performance 2D collision detection system with realistic physics responses.
MIT License
666 stars 113 forks source link

Refactor DistanceProxy #23

Closed Genbox closed 7 years ago

Genbox commented 7 years ago

It basically wraps vertices by copying over the data from shapes. Distance calculation should not have anything to do with shapes or proxies, so we could simplify the code by reducing the proxies to vertices and radius in a struct. The mapping between shapes such as CircleShape could then be simplified by enforcing Shape to have Vertices, where CircleShape would just have 1 vertex (its position).