abstract class Eagle::Physics2D::Shape

Overview

A collision shape in a body's local space. Eagle has circles and convex polygons; build concave objects from several convex shapes on one body.

Direct Known Subclasses

Defined in:

eagle/physics/shapes2d.cr

Instance Method Summary

Instance Method Detail

abstract def aabb : Rect #

Bounds in world space. Valid on transformed shapes.


abstract def area : Float32 #

Area in square pixels, used for mass.


abstract def inertia_factor : Float32 #

Moment of inertia per unit mass about the shape's center.


abstract def local_aabb : Rect #

Bounds in the body's local space.


def offset : Vec2 #

Offset from the body's origin.


def offset=(offset : Vec2) #

Offset from the body's origin.


abstract def transformed(t : Transform2D) : Shape #

A world-space copy of the shape.