Sha256: 905c1f87829fae06d85643ef846814d438a6c397bead3dad1e3c665517e0f2ef
Contents?: true
Size: 957 Bytes
Versions: 1
Compression:
Stored size: 957 Bytes
Contents
working_directory = File.join(File.dirname(__FILE__)) $LOAD_PATH << working_directory unless $LOAD_PATH.include?(working_directory) Dir[File.join(working_directory, '*.jar')].each do |jar| require jar end ContactListener = Java::OrgJbox2dCallbacks::ContactListener def import_class_list(list, string) list.each { |d| java_import format(string, d) } end common = %w( Vec2 Transform ) common_format = 'org.jbox2d.common.%s' import_class_list(common, common_format) shape = %w( PolygonShape CircleShape ChainShape Shape ) shape_format = 'org.jbox2d.collision.shapes.%s' import_class_list(shape, shape_format) world = %w( Body BodyDef BodyType World FixtureDef ) world_format = 'org.jbox2d.dynamics.%s' import_class_list(world, world_format) joint = %w( Joint JointDef DistanceJointDef RevoluteJoint RevoluteJointDef MouseJointDef) joint_format = 'org.jbox2d.dynamics.joints.%s' import_class_list(joint, joint_format) require_relative 'pbox2d/box2d.rb'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pbox2d-0.4.1-java | lib/pbox2d.rb |