Added support for defining the fixtures of a body
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Tue, 7 Dec 2010 10:36:51 +0000 (11:36 +0100)
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Tue, 7 Dec 2010 10:47:01 +0000 (11:47 +0100)
commitb57ed56659abd76e865ba72be6f1909dd0acc617
treeeaed4185014d590b98acc47a76ed2dc175a244f8
parent97a68bd911f436d0e8c0e7b1d73bb1d4231cd9c0
Added support for defining the fixtures of a body

In Box2D, one body is made up of one or more fixtures, where each
fixture has its own density, friction and restitution. Also, fixtures
can be either a convex polygon or a circle.

This change adds support for defining these fixtures in QML, allowing
multiple boxes to be used to make up a single body as well as adding
support for circular shapes. There is no way to define an arbitrary
convex polygon yet, though.

It is now also possible to specify whether a fixture is a sensor, though
no hooks are provided yet to obtain any collision information.
12 files changed:
box2d.pro
box2dbody.cpp
box2dbody.h
box2dfixture.cpp [new file with mode: 0644]
box2dfixture.h [new file with mode: 0644]
box2dplugin.cpp
examples/accelerometer/Wall.qml [new file with mode: 0644]
examples/accelerometer/WoodenBox.qml
examples/accelerometer/accelerometer.qml
examples/boxes/Wall.qml [new file with mode: 0644]
examples/boxes/WoodenBox.qml
examples/boxes/boxes.qml