# File lib/as_physics.rb, line 37 def initialize(*objs) @shapes = objs @body = CP::Body.new(0.0, 0.0) mass = 0.0 moment = 0.0 @shapes.each do|shape| mass += shape.body.m moment += shape.body.i shape.body = @body end @body.m = mass @body.i = moment end