class Engine::Body

Direct Known Subclasses

Defined in:

engine/physics.cr

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Constructor Detail

def self.new(x : Float64 = 0_f64, y : Float64 = 0_f64, vx : Float64 = 0_f64, vy : Float64 = 0_f64, angle : Float64 = 0_f64, omega : Float64 = 0_f64) #

[View source]

Class Method Detail

def self.body_type #

[View source]

Instance Method Detail

def add_box(box) #

[View source]
def add_circle(offset, r) #

[View source]
def add_line(p1, p2) #

[View source]
def add_poly(poly : Polygon) #

[View source]
def angle : Float64 #

[View source]
def angle=(angle : Float64) #

[View source]
def apply_control(target, max_speed, max_force) #

[View source]
def apply_force(force, offset, torque) #

[View source]
def finalize #

[View source]
def free #

[View source]
def omega : Float64 #

[View source]
def omega=(omega : Float64) #

[View source]
def owner #

[View source]
def pos #

[View source]
def process #

[View source]
def to_unsafe #

[View source]
def update_coords(mode : LibEngine::PhysicCoordinatesMode = LibEngine::PhysicCoordinatesMode::ReadWrite) #

[View source]
def vx : Float64 #

[View source]
def vx=(vx : Float64) #

[View source]
def vy : Float64 #

[View source]
def vy=(vy : Float64) #

[View source]
def warp_to(*, x = nil, y = nil, vx = nil, vy = nil, angle = nil, omega = nil) #

[View source]
def x : Float64 #

[View source]
def x=(x : Float64) #

[View source]
def y : Float64 #

[View source]
def y=(y : Float64) #

[View source]

Macro Detail

macro can_collide(klass, &) #

[View source]
macro collide(klass) #

[View source]
macro detect_collide(klass, &) #

[View source]
macro detect_pass(klass, &) #

[View source]
macro material(density, friction, elasticity, default_radius = 0) #

[View source]
macro pass(klass) #

[View source]