public Interval getProjection(Vector axis) { float radius = _extents[0] * Math.Abs(axis.Dot(axes[0])) + _extents[1] * Math.Abs(axis.Dot(axes[1])); float c = samp.Dot(axis); interval.min = c - radius; interval.max = c + radius; return interval; }
public Collision getComponents(Vector collisionNormal) { Vector vel = this.Velocity; float vdotn = collisionNormal.Dot(vel); collision.vn = collisionNormal * vdotn; collision.vt = vel - collision.vn; return collision; }