qml-box2d:qml-box2d-folibis.git
3 years agoFixed RevoluteJoint (adjusted linear units to pixels), added OnInitialized event...
Ruslan [Fri, 3 Jan 2014 13:24:35 +0000 (00:24 +1100)]
Fixed RevoluteJoint (adjusted linear units to pixels), added OnInitialized event to World

3 years agoAdded example of using MotorJoint
Ruslan [Wed, 1 Jan 2014 08:52:49 +0000 (19:52 +1100)]
Added example of using MotorJoint

3 years agoFixed RevoluteJoint (added localAnchorB, angular units changed to use degree)
Ruslan [Wed, 1 Jan 2014 08:50:44 +0000 (19:50 +1100)]
Fixed RevoluteJoint (added localAnchorB, angular units changed to use degree)

3 years agoCorrected instalation rules for Qt5
Ruslan [Sun, 29 Dec 2013 10:19:18 +0000 (21:19 +1100)]
Corrected instalation rules for Qt5

3 years agoFixed DebugDraw module for correct work in Qt5
Ruslan [Sun, 29 Dec 2013 09:42:48 +0000 (20:42 +1100)]
Fixed DebugDraw module for correct work in Qt5

3 years agoAdded MotorJoint wrapper to new b2MotorJoint
Ruslan [Sun, 29 Dec 2013 09:34:58 +0000 (20:34 +1100)]
Added MotorJoint wrapper to new b2MotorJoint

3 years agoUpdated to Box2D 2.3.0
Ruslan [Sun, 29 Dec 2013 08:57:03 +0000 (19:57 +1100)]
Updated to Box2D 2.3.0

4 years agoChanges for Qt 5 release
Tommi Asp [Wed, 23 Jan 2013 12:56:50 +0000 (14:56 +0200)]
Changes for Qt 5 release

4 years agoMerge branch 'master' into qt5
Thorbjørn Lindeijer [Sat, 26 Jan 2013 16:25:28 +0000 (17:25 +0100)]
Merge branch 'master' into qt5

4 years agoUpdated to Box2D v2.2.1
Tommi Asp [Wed, 23 Jan 2013 12:44:16 +0000 (14:44 +0200)]
Updated to Box2D v2.2.1

5 years agoBuild fixes for Qt 5.0.0-beta1
Jarno Seppänen [Fri, 12 Oct 2012 20:07:31 +0000 (23:07 +0300)]
Build fixes for Qt 5.0.0-beta1

5 years agoUpdated the COPYING file with the new license
Thorbjørn Lindeijer [Thu, 23 Aug 2012 20:34:43 +0000 (22:34 +0200)]
Updated the COPYING file with the new license

5 years agoChanged license from LGPL to the zlib license
Thorbjørn Lindeijer [Thu, 23 Aug 2012 19:54:10 +0000 (21:54 +0200)]
Changed license from LGPL to the zlib license

The license of these bindings now match the license of Box2D itself.
This change makes it possible to embed this code in commercial
applications without restrictions. This was mainly done because shipping
dynamic libraries can be problematic on mobile platforms.

All contributors have agreed to this licensing change.

5 years agoIntroduce Qt 5 required changes
Donald Carr [Wed, 1 Feb 2012 17:31:08 +0000 (17:31 +0000)]
Introduce Qt 5 required changes

5 years agoAdded running property to Box2DWorld
Adriano Rezende [Sat, 14 Jan 2012 18:19:55 +0000 (18:19 +0000)]
Added running property to Box2DWorld

This property should be used to pause and resume the world.

6 years agoMoved toBox2DFixture to box2dfixture.h so that it can be reused
Thorbjørn Lindeijer [Thu, 21 Apr 2011 12:12:53 +0000 (14:12 +0200)]
Moved toBox2DFixture to box2dfixture.h so that it can be reused

Also introduced a similar helper function toBox2DJoint.

6 years agoFix for crash caused by ContactListener when destroying a body which is in contact...
Joonas Erkinheimo [Wed, 13 Apr 2011 21:13:30 +0000 (00:13 +0300)]
Fix for crash caused by ContactListener when destroying a body which is in contact with another.

6 years agoSpelling fix in example name
Thorbjørn Lindeijer [Mon, 11 Apr 2011 20:28:47 +0000 (22:28 +0200)]
Spelling fix in example name

6 years agoAdded enchantments to demolishion example. New graphics, and dynamically
Antti Krats [Mon, 11 Apr 2011 07:37:49 +0000 (10:37 +0300)]
Added enchantments to demolishion example. New graphics, and dynamically
addable wheels which can be rotated by adding torque.

6 years agoAdded missing joints to box2d-static.pri.
Antti Krats [Mon, 11 Apr 2011 07:35:20 +0000 (10:35 +0300)]
Added missing joints to box2d-static.pri.

6 years agoProper solution for deleting dynamically created bodies and joints.
Joonas Erkinheimo [Thu, 7 Apr 2011 08:58:45 +0000 (11:58 +0300)]
Proper solution for deleting dynamically created bodies and joints.

6 years agoAdded the localAnchorA property to the revolute joint
Markus Kivioja [Tue, 5 Apr 2011 06:56:36 +0000 (09:56 +0300)]
Added the localAnchorA property to the revolute joint

6 years agoAdded applyTorque to Box2DBody
Antti Krats [Mon, 21 Mar 2011 10:47:45 +0000 (12:47 +0200)]
Added applyTorque to Box2DBody

6 years agoAdded revolute joint and example for it
Joonas Erkinheimo [Thu, 10 Mar 2011 10:12:21 +0000 (12:12 +0200)]
Added revolute joint and example for it

6 years agoMade joints easier to create
Joonas Erkinheimo [Thu, 10 Mar 2011 08:20:43 +0000 (10:20 +0200)]
Made joints easier to create

bodyA and bodyB can be defined in the joint now, no longer required to
set it in the bodies' Component.onCompleted slot. Modified the examples
accordingly.

6 years agoAdded distance and prismatic joints and examples for both
Joonas Erkinheimo [Wed, 9 Mar 2011 14:31:39 +0000 (16:31 +0200)]
Added distance and prismatic joints and examples for both

6 years agoFixed Visual Studio compile issues
Alessandro Portale [Thu, 31 Mar 2011 20:20:40 +0000 (22:20 +0200)]
Fixed Visual Studio compile issues

- M_PI -> b2_pi
- Fixed compilation in Box2DPolygon::createShape()
- Fixed class/struct mismatch warning

6 years agoReduce the amount of symbols exported from the plugin
Thorbjørn Lindeijer [Fri, 25 Mar 2011 21:06:12 +0000 (22:06 +0100)]
Reduce the amount of symbols exported from the plugin

6 years agoAdded README file about the pictures used in the Monera example
Thorbjørn Lindeijer [Fri, 25 Mar 2011 22:31:37 +0000 (23:31 +0100)]
Added README file about the pictures used in the Monera example

6 years agoAdd monera example
Daker Fernandes Pinheiro [Fri, 25 Mar 2011 00:26:52 +0000 (21:26 -0300)]
Add monera example

Add iteractive example of interactive application using mouse.

Signed-off-by: Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org>
6 years agoAdd linear impulse example
Antonio Aloisio [Thu, 17 Feb 2011 16:33:13 +0000 (18:33 +0200)]
Add linear impulse example

6 years agoAdd active body's property
Antonio Aloisio [Thu, 17 Feb 2011 15:36:11 +0000 (17:36 +0200)]
Add active body's property

6 years agoForces are automatically cleared by default
Thorbjørn Lindeijer [Thu, 10 Feb 2011 16:15:54 +0000 (17:15 +0100)]
Forces are automatically cleared by default

No need to manually call ClearForces after each step.

6 years agoAdded a pri file to help using the Box2D bindings statically
Thorbjørn Lindeijer [Tue, 25 Jan 2011 19:41:32 +0000 (20:41 +0100)]
Added a pri file to help using the Box2D bindings statically

Often it's easier to compile the sources file directly into an
application rather than relying on a plugin to be installed on the
system.

The current Box2D plugin license (LGPL) only allows this kind of usage
for free software projects (licensed as LGPL or GPL), though.

6 years agoAdd a movingBox example to demonstrate linear velocity changes
Tan Miaoqing [Sun, 6 Feb 2011 13:57:06 +0000 (15:57 +0200)]
Add a movingBox example to demonstrate linear velocity changes

This example demonstrates Body's new linearVelocity property and two
newly added methods: applyLinearImpulse() and getWorldCenter().

6 years agoAllow changing body velocity and applying linear impulses
Tan Miaoqing [Fri, 4 Feb 2011 19:02:50 +0000 (21:02 +0200)]
Allow changing body velocity and applying linear impulses

* Added linearVelocity property
* Added applyLinearImpulse and getWorldCenter methods

6 years agoAdded an example that demonstrates creating bodies dynamically
Thorbjørn Lindeijer [Sat, 5 Feb 2011 14:44:13 +0000 (15:44 +0100)]
Added an example that demonstrates creating bodies dynamically

6 years agoFixed assertion failure when creating bodies with Component.createObject
Thorbjørn Lindeijer [Sat, 5 Feb 2011 14:16:04 +0000 (15:16 +0100)]
Fixed assertion failure when creating bodies with Component.createObject

QDeclarativeComponent::createObject causes the parent to be set before a
component is complete. In that case the anchors have not been evaluated
yet, which caused an assertion failure when using anchors with a Box
component, since its polygon was still invalid.

Solved this issue by delaying the creation of the internal body until
the Body component is complete.

6 years agoExporting fixed rotation property into Box2DBody.
Daker Fernandes Pinheiro [Fri, 4 Feb 2011 18:13:18 +0000 (15:13 -0300)]
Exporting fixed rotation property into Box2DBody.

- Also added fixed rotation example on the same test of filtering properties.

Signed-off-by: Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org>
6 years agoAdded an assert to help Qt Creator realize the intended import name
Thorbjørn Lindeijer [Tue, 25 Jan 2011 19:41:55 +0000 (20:41 +0100)]
Added an assert to help Qt Creator realize the intended import name

This makes "import Box2D 1.0" be recognized in the QML editor in
Qt Creator. It does restrict the name to "Box2D" at least for debug
builds, but that can also be considered a feature.

6 years agoFiltering Collision Support
Daker Fernandes Pinheiro [Thu, 13 Jan 2011 13:54:11 +0000 (10:54 -0300)]
Filtering Collision Support

- Added filtering collision support by:
    - Category
    - Group Index

- Refactored Box2DFixture class by moving it's members directly to a
    fixtureDef member.

Signed-off-by: Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org>
6 years agoWarn instead of crash when the number of vertices is wrong
Thorbjørn Lindeijer [Wed, 12 Jan 2011 23:53:36 +0000 (00:53 +0100)]
Warn instead of crash when the number of vertices is wrong

Also did some small cleanups, like using a QVariantList directly.

6 years agoFixed the Polygon vertex coordinates to be in QML coordinate space
Thorbjørn Lindeijer [Wed, 12 Jan 2011 23:07:19 +0000 (00:07 +0100)]
Fixed the Polygon vertex coordinates to be in QML coordinate space

6 years agoAdding generic Polygon fixture support
Daker Fernandes Pinheiro [Mon, 10 Jan 2011 22:23:28 +0000 (19:23 -0300)]
Adding generic Polygon fixture support

Signed-off-by: Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org>
6 years agoChanged the way QML Body item properties are synchronized to Box2D
Thorbjørn Lindeijer [Tue, 21 Dec 2010 14:29:20 +0000 (15:29 +0100)]
Changed the way QML Body item properties are synchronized to Box2D

Now using geometryChanged and rotationChanged rather than relying on
itemChange. This is supposed to be a little more efficient (at least for
position changes) since the values don't pass through QVariant (and it
also avoids an unneeded call with ItemPositionChange).

6 years agoAdded some initial signals that give information about contacts
Thorbjørn Lindeijer [Tue, 21 Dec 2010 14:27:31 +0000 (15:27 +0100)]
Added some initial signals that give information about contacts

Not entirely sure yet whether this is the right approach, but it's a
start.

6 years agoChanged the interpretations of the accelerometer values
Thorbjørn Lindeijer [Wed, 1 Dec 2010 17:02:40 +0000 (18:02 +0100)]
Changed the interpretations of the accelerometer values

This should work on available devices like the N900, hopefully also N8.

6 years agoAdded a README file
Thorbjørn Lindeijer [Wed, 1 Dec 2010 17:00:54 +0000 (18:00 +0100)]
Added a README file

6 years agoFixed crash when initializing the gravity in QML
Thorbjørn Lindeijer [Thu, 9 Dec 2010 18:48:22 +0000 (19:48 +0100)]
Fixed crash when initializing the gravity in QML

6 years agoAllow changing fixture properties dynamically
Thorbjørn Lindeijer [Thu, 9 Dec 2010 17:12:37 +0000 (18:12 +0100)]
Allow changing fixture properties dynamically

By updating the Box2D fixture instance when the properties are changed.

6 years agoAllow the position and angle of bodies to be changed from QML
Thorbjørn Lindeijer [Thu, 9 Dec 2010 17:01:24 +0000 (18:01 +0100)]
Allow the position and angle of bodies to be changed from QML

Synchronize position and angle changes to the Box2D state when they
don't happen because of synchronizing from Box2D to QML.

6 years agoAdded support for linearDamping, angularDamping and bullet properties
Thorbjørn Lindeijer [Wed, 8 Dec 2010 19:21:51 +0000 (20:21 +0100)]
Added support for linearDamping, angularDamping and bullet properties

6 years agoAdded support for defining the fixtures of a body
Thorbjørn Lindeijer [Tue, 7 Dec 2010 10:36:51 +0000 (11:36 +0100)]
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.

6 years agoFixed compile on Windows
Thorbjørn Lindeijer [Tue, 30 Nov 2010 08:23:52 +0000 (09:23 +0100)]
Fixed compile on Windows

Needs the root directory to be explicitly added to the include path.

6 years agoMade a separate example that uses the accelerometer
Thorbjørn Lindeijer [Fri, 26 Nov 2010 14:38:10 +0000 (15:38 +0100)]
Made a separate example that uses the accelerometer

So that the basic boxes example will run without having Qt Mobility
installed.

6 years agoReduced version to 1.0
Thorbjørn Lindeijer [Fri, 26 Nov 2010 14:29:41 +0000 (15:29 +0100)]
Reduced version to 1.0

Since 2.0 was cause of Box2D, but on the other hand we're using Box2D
2.1 now. But the version of qml-box2d has nothing to do with Box2D
itself at the moment.

6 years agoAdded support for drawing debug information
Thorbjørn Lindeijer [Fri, 26 Nov 2010 14:21:05 +0000 (15:21 +0100)]
Added support for drawing debug information

Press on the example app to toggle the debug information.

6 years agoMade Repeater work correctly for creating Box2D bodies
Thorbjørn Lindeijer [Mon, 22 Nov 2010 20:04:14 +0000 (21:04 +0100)]
Made Repeater work correctly for creating Box2D bodies

This required reversing the body/world relationship, since the Repeater
creates the bodies outside of the world, and then reparents them into
the world. This change should also allow for dynamic creation of bodies
in general.

7 years agoChanged license from GPL to LGPL
Thorbjørn Lindeijer [Fri, 19 Nov 2010 21:15:41 +0000 (22:15 +0100)]
Changed license from GPL to LGPL

The GPL license was not really suitable since this is a plugin. Now the
plugin no longer affects the license of applications using it.

7 years agoAdded a boxes example
Thorbjørn Lindeijer [Fri, 19 Nov 2010 21:03:04 +0000 (22:03 +0100)]
Added a boxes example

Demonstrates some simple boxes driven by Box2D. Also uses QtMobility to
connect the world's gravity to the accelerometer.

7 years agoAdded a .gitignore file
Thorbjørn Lindeijer [Fri, 19 Nov 2010 21:00:47 +0000 (22:00 +0100)]
Added a .gitignore file

7 years agoAdded an 'install' target that installs to Qt/imports
Thorbjørn Lindeijer [Fri, 19 Nov 2010 20:59:40 +0000 (21:59 +0100)]
Added an 'install' target that installs to Qt/imports

7 years agoExtended Box2DBody with bodyType and sleepingAllowed properties
Thorbjørn Lindeijer [Fri, 19 Nov 2010 19:06:31 +0000 (20:06 +0100)]
Extended Box2DBody with bodyType and sleepingAllowed properties

bodyType allows using all three Box2D body types rather than just static
and dynamic. sleepingAllowed makes it possible to tell an object not to
fall asleep. The properties can be changed dynamically.

7 years agoMade World::gravity a property that can be changed
Thorbjørn Lindeijer [Fri, 19 Nov 2010 17:56:56 +0000 (18:56 +0100)]
Made World::gravity a property that can be changed

7 years agoFixed use of anchors to position the world and body items
Thorbjørn Lindeijer [Fri, 19 Nov 2010 17:54:56 +0000 (18:54 +0100)]
Fixed use of anchors to position the world and body items

Anchors didn't work due to a missing call to the base implementation of
QDeclarativeItem::componentComplete.

7 years agoRemove mentioning of QmlArcade in the sources
Thorbjørn Lindeijer [Mon, 13 Sep 2010 15:18:55 +0000 (17:18 +0200)]
Remove mentioning of QmlArcade in the sources

It's just a work-in-progress name, and the sources are two independent
plugins.

7 years agoAdapted to Box2D 2.1 API changes
Thorbjørn Lindeijer [Tue, 20 Apr 2010 15:32:37 +0000 (17:32 +0200)]
Adapted to Box2D 2.1 API changes

7 years agoUpdated Box2D to 2.1.2
Thorbjørn Lindeijer [Tue, 20 Apr 2010 15:25:58 +0000 (17:25 +0200)]
Updated Box2D to 2.1.2

7 years agoCopy over the qmldir files from source to build location
Thorbjørn Lindeijer [Tue, 20 Apr 2010 14:20:04 +0000 (16:20 +0200)]
Copy over the qmldir files from source to build location

In an attempt to improve the situation when doing a shadow build. The
working directory will still need to be the repository rather than the
build location.

7 years agoUse 'CONFIG += plugin' to avoid generating versioned .so file links
Thorbjørn Lindeijer [Tue, 20 Apr 2010 14:18:56 +0000 (16:18 +0200)]
Use 'CONFIG += plugin' to avoid generating versioned .so file links

7 years agoDo fuzzy comparisions to avoid small inaccuracies causing repaints
Thorbjørn Lindeijer [Wed, 10 Mar 2010 15:35:11 +0000 (16:35 +0100)]
Do fuzzy comparisions to avoid small inaccuracies causing repaints

Also fixed compiler warning about initialization order.

7 years agoMade simple Box2D rectangular bodies functional
Thorbjørn Lindeijer [Wed, 3 Mar 2010 16:44:40 +0000 (17:44 +0100)]
Made simple Box2D rectangular bodies functional

Defined the Body item, which can only be used as a child of a World
item. The standard x, y, width and height properties can be used to
define its position and size, and it will automatically determine its
mass.

The World item has been extended with properties to set the time step,
the number of iterations for each time step and the time between each
frame.

7 years agoDon't forget to clean up the world afterwards
Thorbjørn Lindeijer [Tue, 2 Mar 2010 16:46:23 +0000 (17:46 +0100)]
Don't forget to clean up the world afterwards

7 years agoAdded a start on the Box2D QML plugin
Thorbjørn Lindeijer [Tue, 2 Mar 2010 16:29:54 +0000 (17:29 +0100)]
Added a start on the Box2D QML plugin

Based on the Box2D 2.0.1 release.