Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(6)  |  Derive(0)  |  Import(1)

src/w/r/Wrappyr-HEAD/tests/test_box2d.py   Wrappyr(Download)
#!/usr/bin/env python2.6
from wrappyr.runtime import arrayof
 
from Box2D.common import b2Vec2
from Box2D.collision.shapes import b2PolygonShape
        return 1.0
 
gravity = b2Vec2(0.0, -9.8)
world = b2World(gravity, False)
 
groundBodyDef = b2BodyDef()
groundBodyDef.position = b2Vec2(0.0, -10.0)
bodyDef = b2BodyDef()
bodyDef.type = 2
bodyDef.position = b2Vec2(0.0, 4.0)
body = world.CreateBody(bodyDef)
 
 
slopeBodyDef = b2BodyDef()
slopeBodyDef.position = b2Vec2(0.0, -9.0)
slopeBody = world.CreateBody(slopeBodyDef)