struct Eagle::Physics2D::Manifold

Overview

The result of a collision test: which way to separate, how deep the overlap is, and where the shapes touch.

Defined in:

eagle/physics/collision2d.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(normal : Eagle::Vec2, penetration : Float32, contacts : Array(Eagle::Vec2)) #

Creates a manifold.


Instance Method Detail

def contacts : Array(Vec2) #

Contact points in world space.


def normal : Vec2 #

Unit normal pointing from shape A to shape B.


def penetration : Float32 #

Overlap depth along the normal.