From: dsc Date: Thu, 5 May 2011 05:36:52 +0000 (-0700) Subject: Checkpoint on box2d as a lib X-Git-Tag: box2d-testbed~12 X-Git-Url: http://git.less.ly:3516/?a=commitdiff_plain;h=80632b5906c874abb5041213623a8f6657b86e61;p=tanks-ios.git Checkpoint on box2d as a lib --- diff --git a/libs/box2d/.gitignore b/libs/box2d/.gitignore new file mode 100644 index 0000000..20ea569 --- /dev/null +++ b/libs/box2d/.gitignore @@ -0,0 +1,2 @@ +Box2D/ +Contributions/ diff --git a/libs/box2d/box2d-ios.xcodeproj/project.pbxproj b/libs/box2d/box2d-ios.xcodeproj/project.pbxproj new file mode 100644 index 0000000..edca52a --- /dev/null +++ b/libs/box2d/box2d-ios.xcodeproj/project.pbxproj @@ -0,0 +1,541 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 491330C81372616300DFB46D /* Box2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913307B1372616300DFB46D /* Box2D.h */; }; + 491330C91372616300DFB46D /* b2BroadPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4913307D1372616300DFB46D /* b2BroadPhase.cpp */; }; + 491330CA1372616300DFB46D /* b2BroadPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913307E1372616300DFB46D /* b2BroadPhase.h */; }; + 491330CB1372616300DFB46D /* b2CollideCircle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4913307F1372616300DFB46D /* b2CollideCircle.cpp */; }; + 491330CC1372616300DFB46D /* b2CollidePolygon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330801372616300DFB46D /* b2CollidePolygon.cpp */; }; + 491330CD1372616300DFB46D /* b2Collision.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330811372616300DFB46D /* b2Collision.cpp */; }; + 491330CE1372616300DFB46D /* b2Collision.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330821372616300DFB46D /* b2Collision.h */; }; + 491330CF1372616300DFB46D /* b2Distance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330831372616300DFB46D /* b2Distance.cpp */; }; + 491330D01372616300DFB46D /* b2Distance.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330841372616300DFB46D /* b2Distance.h */; }; + 491330D11372616300DFB46D /* b2DynamicTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330851372616300DFB46D /* b2DynamicTree.cpp */; }; + 491330D21372616300DFB46D /* b2DynamicTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330861372616300DFB46D /* b2DynamicTree.h */; }; + 491330D31372616300DFB46D /* b2TimeOfImpact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330871372616300DFB46D /* b2TimeOfImpact.cpp */; }; + 491330D41372616300DFB46D /* b2TimeOfImpact.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330881372616300DFB46D /* b2TimeOfImpact.h */; }; + 491330D51372616300DFB46D /* b2CircleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4913308A1372616300DFB46D /* b2CircleShape.cpp */; }; + 491330D61372616300DFB46D /* b2CircleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913308B1372616300DFB46D /* b2CircleShape.h */; }; + 491330D71372616300DFB46D /* b2PolygonShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4913308C1372616300DFB46D /* b2PolygonShape.cpp */; }; + 491330D81372616300DFB46D /* b2PolygonShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913308D1372616300DFB46D /* b2PolygonShape.h */; }; + 491330D91372616300DFB46D /* b2Shape.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913308E1372616300DFB46D /* b2Shape.h */; }; + 491330DA1372616300DFB46D /* b2BlockAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330901372616300DFB46D /* b2BlockAllocator.cpp */; }; + 491330DB1372616300DFB46D /* b2BlockAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330911372616300DFB46D /* b2BlockAllocator.h */; }; + 491330DC1372616300DFB46D /* b2Math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330921372616300DFB46D /* b2Math.cpp */; }; + 491330DD1372616300DFB46D /* b2Math.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330931372616300DFB46D /* b2Math.h */; }; + 491330DE1372616300DFB46D /* b2Settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330941372616300DFB46D /* b2Settings.cpp */; }; + 491330DF1372616300DFB46D /* b2Settings.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330951372616300DFB46D /* b2Settings.h */; }; + 491330E01372616300DFB46D /* b2StackAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330961372616300DFB46D /* b2StackAllocator.cpp */; }; + 491330E11372616300DFB46D /* b2StackAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330971372616300DFB46D /* b2StackAllocator.h */; }; + 491330E21372616300DFB46D /* b2Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330991372616300DFB46D /* b2Body.cpp */; }; + 491330E31372616300DFB46D /* b2Body.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913309A1372616300DFB46D /* b2Body.h */; }; + 491330E41372616300DFB46D /* b2ContactManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4913309B1372616300DFB46D /* b2ContactManager.cpp */; }; + 491330E51372616300DFB46D /* b2ContactManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913309C1372616300DFB46D /* b2ContactManager.h */; }; + 491330E61372616300DFB46D /* b2Fixture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4913309D1372616300DFB46D /* b2Fixture.cpp */; }; + 491330E71372616300DFB46D /* b2Fixture.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913309E1372616300DFB46D /* b2Fixture.h */; }; + 491330E81372616300DFB46D /* b2Island.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4913309F1372616300DFB46D /* b2Island.cpp */; }; + 491330E91372616300DFB46D /* b2Island.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330A01372616300DFB46D /* b2Island.h */; }; + 491330EA1372616300DFB46D /* b2TimeStep.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330A11372616300DFB46D /* b2TimeStep.h */; }; + 491330EB1372616300DFB46D /* b2World.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330A21372616300DFB46D /* b2World.cpp */; }; + 491330EC1372616300DFB46D /* b2World.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330A31372616300DFB46D /* b2World.h */; }; + 491330ED1372616300DFB46D /* b2WorldCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330A41372616300DFB46D /* b2WorldCallbacks.cpp */; }; + 491330EE1372616300DFB46D /* b2WorldCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330A51372616300DFB46D /* b2WorldCallbacks.h */; }; + 491330EF1372616300DFB46D /* b2CircleContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330A71372616300DFB46D /* b2CircleContact.cpp */; }; + 491330F01372616300DFB46D /* b2CircleContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330A81372616300DFB46D /* b2CircleContact.h */; }; + 491330F11372616300DFB46D /* b2Contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330A91372616300DFB46D /* b2Contact.cpp */; }; + 491330F21372616300DFB46D /* b2Contact.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330AA1372616300DFB46D /* b2Contact.h */; }; + 491330F31372616300DFB46D /* b2ContactSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330AB1372616300DFB46D /* b2ContactSolver.cpp */; }; + 491330F41372616300DFB46D /* b2ContactSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330AC1372616300DFB46D /* b2ContactSolver.h */; }; + 491330F51372616300DFB46D /* b2PolygonAndCircleContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330AD1372616300DFB46D /* b2PolygonAndCircleContact.cpp */; }; + 491330F61372616300DFB46D /* b2PolygonAndCircleContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330AE1372616300DFB46D /* b2PolygonAndCircleContact.h */; }; + 491330F71372616300DFB46D /* b2PolygonContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330AF1372616300DFB46D /* b2PolygonContact.cpp */; }; + 491330F81372616300DFB46D /* b2PolygonContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330B01372616300DFB46D /* b2PolygonContact.h */; }; + 491330F91372616300DFB46D /* b2TOISolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330B11372616300DFB46D /* b2TOISolver.cpp */; }; + 491330FA1372616300DFB46D /* b2TOISolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330B21372616300DFB46D /* b2TOISolver.h */; }; + 491330FB1372616300DFB46D /* b2DistanceJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330B41372616300DFB46D /* b2DistanceJoint.cpp */; }; + 491330FC1372616300DFB46D /* b2DistanceJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330B51372616300DFB46D /* b2DistanceJoint.h */; }; + 491330FD1372616300DFB46D /* b2FrictionJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330B61372616300DFB46D /* b2FrictionJoint.cpp */; }; + 491330FE1372616300DFB46D /* b2FrictionJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330B71372616300DFB46D /* b2FrictionJoint.h */; }; + 491330FF1372616300DFB46D /* b2GearJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330B81372616300DFB46D /* b2GearJoint.cpp */; }; + 491331001372616300DFB46D /* b2GearJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330B91372616300DFB46D /* b2GearJoint.h */; }; + 491331011372616300DFB46D /* b2Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330BA1372616300DFB46D /* b2Joint.cpp */; }; + 491331021372616300DFB46D /* b2Joint.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330BB1372616300DFB46D /* b2Joint.h */; }; + 491331031372616300DFB46D /* b2LineJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330BC1372616300DFB46D /* b2LineJoint.cpp */; }; + 491331041372616300DFB46D /* b2LineJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330BD1372616300DFB46D /* b2LineJoint.h */; }; + 491331051372616300DFB46D /* b2MouseJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330BE1372616300DFB46D /* b2MouseJoint.cpp */; }; + 491331061372616300DFB46D /* b2MouseJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330BF1372616300DFB46D /* b2MouseJoint.h */; }; + 491331071372616300DFB46D /* b2PrismaticJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330C01372616300DFB46D /* b2PrismaticJoint.cpp */; }; + 491331081372616300DFB46D /* b2PrismaticJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330C11372616300DFB46D /* b2PrismaticJoint.h */; }; + 491331091372616300DFB46D /* b2PulleyJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330C21372616300DFB46D /* b2PulleyJoint.cpp */; }; + 4913310A1372616300DFB46D /* b2PulleyJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330C31372616300DFB46D /* b2PulleyJoint.h */; }; + 4913310B1372616300DFB46D /* b2RevoluteJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330C41372616300DFB46D /* b2RevoluteJoint.cpp */; }; + 4913310C1372616300DFB46D /* b2RevoluteJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330C51372616300DFB46D /* b2RevoluteJoint.h */; }; + 4913310D1372616300DFB46D /* b2WeldJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491330C61372616300DFB46D /* b2WeldJoint.cpp */; }; + 4913310E1372616300DFB46D /* b2WeldJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 491330C71372616300DFB46D /* b2WeldJoint.h */; }; + 49133123137262F200DFB46D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49133122137262F200DFB46D /* Foundation.framework */; }; + 491331281372630700DFB46D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 491331271372630700DFB46D /* UIKit.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 4913305F1372610400DFB46D /* libBox2D.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBox2D.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 4913307B1372616300DFB46D /* Box2D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Box2D.h; sourceTree = ""; }; + 4913307D1372616300DFB46D /* b2BroadPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2BroadPhase.cpp; sourceTree = ""; }; + 4913307E1372616300DFB46D /* b2BroadPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2BroadPhase.h; sourceTree = ""; }; + 4913307F1372616300DFB46D /* b2CollideCircle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CollideCircle.cpp; sourceTree = ""; }; + 491330801372616300DFB46D /* b2CollidePolygon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CollidePolygon.cpp; sourceTree = ""; }; + 491330811372616300DFB46D /* b2Collision.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Collision.cpp; sourceTree = ""; }; + 491330821372616300DFB46D /* b2Collision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Collision.h; sourceTree = ""; }; + 491330831372616300DFB46D /* b2Distance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Distance.cpp; sourceTree = ""; }; + 491330841372616300DFB46D /* b2Distance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Distance.h; sourceTree = ""; }; + 491330851372616300DFB46D /* b2DynamicTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2DynamicTree.cpp; sourceTree = ""; }; + 491330861372616300DFB46D /* b2DynamicTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2DynamicTree.h; sourceTree = ""; }; + 491330871372616300DFB46D /* b2TimeOfImpact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2TimeOfImpact.cpp; sourceTree = ""; }; + 491330881372616300DFB46D /* b2TimeOfImpact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2TimeOfImpact.h; sourceTree = ""; }; + 4913308A1372616300DFB46D /* b2CircleShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CircleShape.cpp; sourceTree = ""; }; + 4913308B1372616300DFB46D /* b2CircleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2CircleShape.h; sourceTree = ""; }; + 4913308C1372616300DFB46D /* b2PolygonShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PolygonShape.cpp; sourceTree = ""; }; + 4913308D1372616300DFB46D /* b2PolygonShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PolygonShape.h; sourceTree = ""; }; + 4913308E1372616300DFB46D /* b2Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Shape.h; sourceTree = ""; }; + 491330901372616300DFB46D /* b2BlockAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2BlockAllocator.cpp; sourceTree = ""; }; + 491330911372616300DFB46D /* b2BlockAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2BlockAllocator.h; sourceTree = ""; }; + 491330921372616300DFB46D /* b2Math.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Math.cpp; sourceTree = ""; }; + 491330931372616300DFB46D /* b2Math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Math.h; sourceTree = ""; }; + 491330941372616300DFB46D /* b2Settings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Settings.cpp; sourceTree = ""; }; + 491330951372616300DFB46D /* b2Settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Settings.h; sourceTree = ""; }; + 491330961372616300DFB46D /* b2StackAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2StackAllocator.cpp; sourceTree = ""; }; + 491330971372616300DFB46D /* b2StackAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2StackAllocator.h; sourceTree = ""; }; + 491330991372616300DFB46D /* b2Body.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Body.cpp; sourceTree = ""; }; + 4913309A1372616300DFB46D /* b2Body.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Body.h; sourceTree = ""; }; + 4913309B1372616300DFB46D /* b2ContactManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2ContactManager.cpp; sourceTree = ""; }; + 4913309C1372616300DFB46D /* b2ContactManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2ContactManager.h; sourceTree = ""; }; + 4913309D1372616300DFB46D /* b2Fixture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Fixture.cpp; sourceTree = ""; }; + 4913309E1372616300DFB46D /* b2Fixture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Fixture.h; sourceTree = ""; }; + 4913309F1372616300DFB46D /* b2Island.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Island.cpp; sourceTree = ""; }; + 491330A01372616300DFB46D /* b2Island.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Island.h; sourceTree = ""; }; + 491330A11372616300DFB46D /* b2TimeStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2TimeStep.h; sourceTree = ""; }; + 491330A21372616300DFB46D /* b2World.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2World.cpp; sourceTree = ""; }; + 491330A31372616300DFB46D /* b2World.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2World.h; sourceTree = ""; }; + 491330A41372616300DFB46D /* b2WorldCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2WorldCallbacks.cpp; sourceTree = ""; }; + 491330A51372616300DFB46D /* b2WorldCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2WorldCallbacks.h; sourceTree = ""; }; + 491330A71372616300DFB46D /* b2CircleContact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CircleContact.cpp; sourceTree = ""; }; + 491330A81372616300DFB46D /* b2CircleContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2CircleContact.h; sourceTree = ""; }; + 491330A91372616300DFB46D /* b2Contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Contact.cpp; sourceTree = ""; }; + 491330AA1372616300DFB46D /* b2Contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Contact.h; sourceTree = ""; }; + 491330AB1372616300DFB46D /* b2ContactSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2ContactSolver.cpp; sourceTree = ""; }; + 491330AC1372616300DFB46D /* b2ContactSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2ContactSolver.h; sourceTree = ""; }; + 491330AD1372616300DFB46D /* b2PolygonAndCircleContact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PolygonAndCircleContact.cpp; sourceTree = ""; }; + 491330AE1372616300DFB46D /* b2PolygonAndCircleContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PolygonAndCircleContact.h; sourceTree = ""; }; + 491330AF1372616300DFB46D /* b2PolygonContact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PolygonContact.cpp; sourceTree = ""; }; + 491330B01372616300DFB46D /* b2PolygonContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PolygonContact.h; sourceTree = ""; }; + 491330B11372616300DFB46D /* b2TOISolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2TOISolver.cpp; sourceTree = ""; }; + 491330B21372616300DFB46D /* b2TOISolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2TOISolver.h; sourceTree = ""; }; + 491330B41372616300DFB46D /* b2DistanceJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2DistanceJoint.cpp; sourceTree = ""; }; + 491330B51372616300DFB46D /* b2DistanceJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2DistanceJoint.h; sourceTree = ""; }; + 491330B61372616300DFB46D /* b2FrictionJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2FrictionJoint.cpp; sourceTree = ""; }; + 491330B71372616300DFB46D /* b2FrictionJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2FrictionJoint.h; sourceTree = ""; }; + 491330B81372616300DFB46D /* b2GearJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2GearJoint.cpp; sourceTree = ""; }; + 491330B91372616300DFB46D /* b2GearJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2GearJoint.h; sourceTree = ""; }; + 491330BA1372616300DFB46D /* b2Joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Joint.cpp; sourceTree = ""; }; + 491330BB1372616300DFB46D /* b2Joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Joint.h; sourceTree = ""; }; + 491330BC1372616300DFB46D /* b2LineJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2LineJoint.cpp; sourceTree = ""; }; + 491330BD1372616300DFB46D /* b2LineJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2LineJoint.h; sourceTree = ""; }; + 491330BE1372616300DFB46D /* b2MouseJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2MouseJoint.cpp; sourceTree = ""; }; + 491330BF1372616300DFB46D /* b2MouseJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2MouseJoint.h; sourceTree = ""; }; + 491330C01372616300DFB46D /* b2PrismaticJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PrismaticJoint.cpp; sourceTree = ""; }; + 491330C11372616300DFB46D /* b2PrismaticJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PrismaticJoint.h; sourceTree = ""; }; + 491330C21372616300DFB46D /* b2PulleyJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PulleyJoint.cpp; sourceTree = ""; }; + 491330C31372616300DFB46D /* b2PulleyJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PulleyJoint.h; sourceTree = ""; }; + 491330C41372616300DFB46D /* b2RevoluteJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2RevoluteJoint.cpp; sourceTree = ""; }; + 491330C51372616300DFB46D /* b2RevoluteJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2RevoluteJoint.h; sourceTree = ""; }; + 491330C61372616300DFB46D /* b2WeldJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2WeldJoint.cpp; sourceTree = ""; }; + 491330C71372616300DFB46D /* b2WeldJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2WeldJoint.h; sourceTree = ""; }; + 49133122137262F200DFB46D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 491331271372630700DFB46D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4913305C1372610400DFB46D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 491331281372630700DFB46D /* UIKit.framework in Frameworks */, + 49133123137262F200DFB46D /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 491330541372610400DFB46D = { + isa = PBXGroup; + children = ( + 4913307A1372616300DFB46D /* Box2D */, + 491331291372630F00DFB46D /* Frameworks */, + 491330601372610400DFB46D /* Products */, + ); + sourceTree = ""; + }; + 491330601372610400DFB46D /* Products */ = { + isa = PBXGroup; + children = ( + 4913305F1372610400DFB46D /* libBox2D.a */, + ); + name = Products; + sourceTree = ""; + }; + 4913307A1372616300DFB46D /* Box2D */ = { + isa = PBXGroup; + children = ( + 4913307B1372616300DFB46D /* Box2D.h */, + 4913307C1372616300DFB46D /* Collision */, + 4913308F1372616300DFB46D /* Common */, + 491330981372616300DFB46D /* Dynamics */, + ); + name = Box2D; + path = src/Box2D; + sourceTree = ""; + }; + 4913307C1372616300DFB46D /* Collision */ = { + isa = PBXGroup; + children = ( + 4913307D1372616300DFB46D /* b2BroadPhase.cpp */, + 4913307E1372616300DFB46D /* b2BroadPhase.h */, + 4913307F1372616300DFB46D /* b2CollideCircle.cpp */, + 491330801372616300DFB46D /* b2CollidePolygon.cpp */, + 491330811372616300DFB46D /* b2Collision.cpp */, + 491330821372616300DFB46D /* b2Collision.h */, + 491330831372616300DFB46D /* b2Distance.cpp */, + 491330841372616300DFB46D /* b2Distance.h */, + 491330851372616300DFB46D /* b2DynamicTree.cpp */, + 491330861372616300DFB46D /* b2DynamicTree.h */, + 491330871372616300DFB46D /* b2TimeOfImpact.cpp */, + 491330881372616300DFB46D /* b2TimeOfImpact.h */, + 491330891372616300DFB46D /* Shapes */, + ); + path = Collision; + sourceTree = ""; + }; + 491330891372616300DFB46D /* Shapes */ = { + isa = PBXGroup; + children = ( + 4913308A1372616300DFB46D /* b2CircleShape.cpp */, + 4913308B1372616300DFB46D /* b2CircleShape.h */, + 4913308C1372616300DFB46D /* b2PolygonShape.cpp */, + 4913308D1372616300DFB46D /* b2PolygonShape.h */, + 4913308E1372616300DFB46D /* b2Shape.h */, + ); + path = Shapes; + sourceTree = ""; + }; + 4913308F1372616300DFB46D /* Common */ = { + isa = PBXGroup; + children = ( + 491330901372616300DFB46D /* b2BlockAllocator.cpp */, + 491330911372616300DFB46D /* b2BlockAllocator.h */, + 491330921372616300DFB46D /* b2Math.cpp */, + 491330931372616300DFB46D /* b2Math.h */, + 491330941372616300DFB46D /* b2Settings.cpp */, + 491330951372616300DFB46D /* b2Settings.h */, + 491330961372616300DFB46D /* b2StackAllocator.cpp */, + 491330971372616300DFB46D /* b2StackAllocator.h */, + ); + path = Common; + sourceTree = ""; + }; + 491330981372616300DFB46D /* Dynamics */ = { + isa = PBXGroup; + children = ( + 491330991372616300DFB46D /* b2Body.cpp */, + 4913309A1372616300DFB46D /* b2Body.h */, + 4913309B1372616300DFB46D /* b2ContactManager.cpp */, + 4913309C1372616300DFB46D /* b2ContactManager.h */, + 4913309D1372616300DFB46D /* b2Fixture.cpp */, + 4913309E1372616300DFB46D /* b2Fixture.h */, + 4913309F1372616300DFB46D /* b2Island.cpp */, + 491330A01372616300DFB46D /* b2Island.h */, + 491330A11372616300DFB46D /* b2TimeStep.h */, + 491330A21372616300DFB46D /* b2World.cpp */, + 491330A31372616300DFB46D /* b2World.h */, + 491330A41372616300DFB46D /* b2WorldCallbacks.cpp */, + 491330A51372616300DFB46D /* b2WorldCallbacks.h */, + 491330A61372616300DFB46D /* Contacts */, + 491330B31372616300DFB46D /* Joints */, + ); + path = Dynamics; + sourceTree = ""; + }; + 491330A61372616300DFB46D /* Contacts */ = { + isa = PBXGroup; + children = ( + 491330A71372616300DFB46D /* b2CircleContact.cpp */, + 491330A81372616300DFB46D /* b2CircleContact.h */, + 491330A91372616300DFB46D /* b2Contact.cpp */, + 491330AA1372616300DFB46D /* b2Contact.h */, + 491330AB1372616300DFB46D /* b2ContactSolver.cpp */, + 491330AC1372616300DFB46D /* b2ContactSolver.h */, + 491330AD1372616300DFB46D /* b2PolygonAndCircleContact.cpp */, + 491330AE1372616300DFB46D /* b2PolygonAndCircleContact.h */, + 491330AF1372616300DFB46D /* b2PolygonContact.cpp */, + 491330B01372616300DFB46D /* b2PolygonContact.h */, + 491330B11372616300DFB46D /* b2TOISolver.cpp */, + 491330B21372616300DFB46D /* b2TOISolver.h */, + ); + path = Contacts; + sourceTree = ""; + }; + 491330B31372616300DFB46D /* Joints */ = { + isa = PBXGroup; + children = ( + 491330B41372616300DFB46D /* b2DistanceJoint.cpp */, + 491330B51372616300DFB46D /* b2DistanceJoint.h */, + 491330B61372616300DFB46D /* b2FrictionJoint.cpp */, + 491330B71372616300DFB46D /* b2FrictionJoint.h */, + 491330B81372616300DFB46D /* b2GearJoint.cpp */, + 491330B91372616300DFB46D /* b2GearJoint.h */, + 491330BA1372616300DFB46D /* b2Joint.cpp */, + 491330BB1372616300DFB46D /* b2Joint.h */, + 491330BC1372616300DFB46D /* b2LineJoint.cpp */, + 491330BD1372616300DFB46D /* b2LineJoint.h */, + 491330BE1372616300DFB46D /* b2MouseJoint.cpp */, + 491330BF1372616300DFB46D /* b2MouseJoint.h */, + 491330C01372616300DFB46D /* b2PrismaticJoint.cpp */, + 491330C11372616300DFB46D /* b2PrismaticJoint.h */, + 491330C21372616300DFB46D /* b2PulleyJoint.cpp */, + 491330C31372616300DFB46D /* b2PulleyJoint.h */, + 491330C41372616300DFB46D /* b2RevoluteJoint.cpp */, + 491330C51372616300DFB46D /* b2RevoluteJoint.h */, + 491330C61372616300DFB46D /* b2WeldJoint.cpp */, + 491330C71372616300DFB46D /* b2WeldJoint.h */, + ); + path = Joints; + sourceTree = ""; + }; + 491331291372630F00DFB46D /* Frameworks */ = { + isa = PBXGroup; + children = ( + 491331271372630700DFB46D /* UIKit.framework */, + 49133122137262F200DFB46D /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 4913305D1372610400DFB46D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 491330C81372616300DFB46D /* Box2D.h in Headers */, + 491330CA1372616300DFB46D /* b2BroadPhase.h in Headers */, + 491330CE1372616300DFB46D /* b2Collision.h in Headers */, + 491330D01372616300DFB46D /* b2Distance.h in Headers */, + 491330D21372616300DFB46D /* b2DynamicTree.h in Headers */, + 491330D41372616300DFB46D /* b2TimeOfImpact.h in Headers */, + 491330D61372616300DFB46D /* b2CircleShape.h in Headers */, + 491330D81372616300DFB46D /* b2PolygonShape.h in Headers */, + 491330D91372616300DFB46D /* b2Shape.h in Headers */, + 491330DB1372616300DFB46D /* b2BlockAllocator.h in Headers */, + 491330DD1372616300DFB46D /* b2Math.h in Headers */, + 491330DF1372616300DFB46D /* b2Settings.h in Headers */, + 491330E11372616300DFB46D /* b2StackAllocator.h in Headers */, + 491330E31372616300DFB46D /* b2Body.h in Headers */, + 491330E51372616300DFB46D /* b2ContactManager.h in Headers */, + 491330E71372616300DFB46D /* b2Fixture.h in Headers */, + 491330E91372616300DFB46D /* b2Island.h in Headers */, + 491330EA1372616300DFB46D /* b2TimeStep.h in Headers */, + 491330EC1372616300DFB46D /* b2World.h in Headers */, + 491330EE1372616300DFB46D /* b2WorldCallbacks.h in Headers */, + 491330F01372616300DFB46D /* b2CircleContact.h in Headers */, + 491330F21372616300DFB46D /* b2Contact.h in Headers */, + 491330F41372616300DFB46D /* b2ContactSolver.h in Headers */, + 491330F61372616300DFB46D /* b2PolygonAndCircleContact.h in Headers */, + 491330F81372616300DFB46D /* b2PolygonContact.h in Headers */, + 491330FA1372616300DFB46D /* b2TOISolver.h in Headers */, + 491330FC1372616300DFB46D /* b2DistanceJoint.h in Headers */, + 491330FE1372616300DFB46D /* b2FrictionJoint.h in Headers */, + 491331001372616300DFB46D /* b2GearJoint.h in Headers */, + 491331021372616300DFB46D /* b2Joint.h in Headers */, + 491331041372616300DFB46D /* b2LineJoint.h in Headers */, + 491331061372616300DFB46D /* b2MouseJoint.h in Headers */, + 491331081372616300DFB46D /* b2PrismaticJoint.h in Headers */, + 4913310A1372616300DFB46D /* b2PulleyJoint.h in Headers */, + 4913310C1372616300DFB46D /* b2RevoluteJoint.h in Headers */, + 4913310E1372616300DFB46D /* b2WeldJoint.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 4913305E1372610400DFB46D /* Box2D */ = { + isa = PBXNativeTarget; + buildConfigurationList = 491330691372610400DFB46D /* Build configuration list for PBXNativeTarget "Box2D" */; + buildPhases = ( + 4913305B1372610400DFB46D /* Sources */, + 4913305C1372610400DFB46D /* Frameworks */, + 4913305D1372610400DFB46D /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Box2D; + productName = Box2D; + productReference = 4913305F1372610400DFB46D /* libBox2D.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 491330561372610400DFB46D /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 491330591372610400DFB46D /* Build configuration list for PBXProject "box2d-ios" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 491330541372610400DFB46D; + productRefGroup = 491330601372610400DFB46D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4913305E1372610400DFB46D /* Box2D */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 4913305B1372610400DFB46D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 491330C91372616300DFB46D /* b2BroadPhase.cpp in Sources */, + 491330CB1372616300DFB46D /* b2CollideCircle.cpp in Sources */, + 491330CC1372616300DFB46D /* b2CollidePolygon.cpp in Sources */, + 491330CD1372616300DFB46D /* b2Collision.cpp in Sources */, + 491330CF1372616300DFB46D /* b2Distance.cpp in Sources */, + 491330D11372616300DFB46D /* b2DynamicTree.cpp in Sources */, + 491330D31372616300DFB46D /* b2TimeOfImpact.cpp in Sources */, + 491330D51372616300DFB46D /* b2CircleShape.cpp in Sources */, + 491330D71372616300DFB46D /* b2PolygonShape.cpp in Sources */, + 491330DA1372616300DFB46D /* b2BlockAllocator.cpp in Sources */, + 491330DC1372616300DFB46D /* b2Math.cpp in Sources */, + 491330DE1372616300DFB46D /* b2Settings.cpp in Sources */, + 491330E01372616300DFB46D /* b2StackAllocator.cpp in Sources */, + 491330E21372616300DFB46D /* b2Body.cpp in Sources */, + 491330E41372616300DFB46D /* b2ContactManager.cpp in Sources */, + 491330E61372616300DFB46D /* b2Fixture.cpp in Sources */, + 491330E81372616300DFB46D /* b2Island.cpp in Sources */, + 491330EB1372616300DFB46D /* b2World.cpp in Sources */, + 491330ED1372616300DFB46D /* b2WorldCallbacks.cpp in Sources */, + 491330EF1372616300DFB46D /* b2CircleContact.cpp in Sources */, + 491330F11372616300DFB46D /* b2Contact.cpp in Sources */, + 491330F31372616300DFB46D /* b2ContactSolver.cpp in Sources */, + 491330F51372616300DFB46D /* b2PolygonAndCircleContact.cpp in Sources */, + 491330F71372616300DFB46D /* b2PolygonContact.cpp in Sources */, + 491330F91372616300DFB46D /* b2TOISolver.cpp in Sources */, + 491330FB1372616300DFB46D /* b2DistanceJoint.cpp in Sources */, + 491330FD1372616300DFB46D /* b2FrictionJoint.cpp in Sources */, + 491330FF1372616300DFB46D /* b2GearJoint.cpp in Sources */, + 491331011372616300DFB46D /* b2Joint.cpp in Sources */, + 491331031372616300DFB46D /* b2LineJoint.cpp in Sources */, + 491331051372616300DFB46D /* b2MouseJoint.cpp in Sources */, + 491331071372616300DFB46D /* b2PrismaticJoint.cpp in Sources */, + 491331091372616300DFB46D /* b2PulleyJoint.cpp in Sources */, + 4913310B1372616300DFB46D /* b2RevoluteJoint.cpp in Sources */, + 4913310D1372616300DFB46D /* b2WeldJoint.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 491330671372610400DFB46D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = DEBUG; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = 4.2; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 491330681372610400DFB46D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_VERSION = 4.2; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; + SDKROOT = iphoneos; + }; + name = Release; + }; + 4913306A1372610400DFB46D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + DSTROOT = /tmp/Box2D.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Box2D/Box2D-Prefix.pch"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "./src/**"; + }; + name = Debug; + }; + 4913306B1372610400DFB46D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + DSTROOT = /tmp/Box2D.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Box2D/Box2D-Prefix.pch"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "./src/**"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 491330591372610400DFB46D /* Build configuration list for PBXProject "box2d-ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 491330671372610400DFB46D /* Debug */, + 491330681372610400DFB46D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 491330691372610400DFB46D /* Build configuration list for PBXNativeTarget "Box2D" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4913306A1372610400DFB46D /* Debug */, + 4913306B1372610400DFB46D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 491330561372610400DFB46D /* Project object */; +} diff --git a/libs/box2d/box2d-iphone.xcodeproj/project.pbxproj b/libs/box2d/box2d-iphone.xcodeproj/project.pbxproj new file mode 100644 index 0000000..354b97c --- /dev/null +++ b/libs/box2d/box2d-iphone.xcodeproj/project.pbxproj @@ -0,0 +1,560 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4913316E1372645C00DFB46D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4913316D1372645C00DFB46D /* UIKit.framework */; }; + 491331701372645C00DFB46D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4913316F1372645C00DFB46D /* Foundation.framework */; }; + 491331721372645C00DFB46D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 491331711372645C00DFB46D /* CoreGraphics.framework */; }; + 491331A91372653600DFB46D /* Box2DAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4913319A1372653600DFB46D /* Box2DAppDelegate.mm */; }; + 491331AA1372653600DFB46D /* Box2DView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4913319C1372653600DFB46D /* Box2DView.mm */; }; + 491331AB1372653600DFB46D /* GLES-Render.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4913319F1372653600DFB46D /* GLES-Render.mm */; }; + 491331AC1372653600DFB46D /* iPhoneTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 491331A11372653600DFB46D /* iPhoneTest.mm */; }; + 491331AD1372653600DFB46D /* iPhoneTestEntries.mm in Sources */ = {isa = PBXBuildFile; fileRef = 491331A21372653600DFB46D /* iPhoneTestEntries.mm */; }; + 491331AE1372653600DFB46D /* TestEntriesViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 491331A41372653600DFB46D /* TestEntriesViewController.mm */; }; + 491331AF1372653600DFB46D /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 491331A51372653600DFB46D /* Icon.png */; }; + 491331B01372653600DFB46D /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 491331A61372653600DFB46D /* Info.plist */; }; + 491331B11372653600DFB46D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 491331A71372653600DFB46D /* main.m */; }; + 491331B21372653600DFB46D /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 491331A81372653600DFB46D /* MainWindow.xib */; }; + 491331C11372663200DFB46D /* libBox2D.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 491331C01372663200DFB46D /* libBox2D.a */; }; + 4913323813726B1F00DFB46D /* ApplyForce.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913320D13726B1F00DFB46D /* ApplyForce.h */; }; + 4913323913726B1F00DFB46D /* BodyTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913320E13726B1F00DFB46D /* BodyTypes.h */; }; + 4913323A13726B1F00DFB46D /* Breakable.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913320F13726B1F00DFB46D /* Breakable.h */; }; + 4913323B13726B1F00DFB46D /* Bridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321013726B1F00DFB46D /* Bridge.h */; }; + 4913323C13726B1F00DFB46D /* BulletTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321113726B1F00DFB46D /* BulletTest.h */; }; + 4913323D13726B1F00DFB46D /* Cantilever.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321213726B1F00DFB46D /* Cantilever.h */; }; + 4913323E13726B1F00DFB46D /* Car.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321313726B1F00DFB46D /* Car.h */; }; + 4913323F13726B1F00DFB46D /* Chain.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321413726B1F00DFB46D /* Chain.h */; }; + 4913324013726B1F00DFB46D /* CharacterCollision.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321513726B1F00DFB46D /* CharacterCollision.h */; }; + 4913324113726B1F00DFB46D /* CollisionFiltering.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321613726B1F00DFB46D /* CollisionFiltering.h */; }; + 4913324213726B1F00DFB46D /* CollisionProcessing.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321713726B1F00DFB46D /* CollisionProcessing.h */; }; + 4913324313726B1F00DFB46D /* CompoundShapes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321813726B1F00DFB46D /* CompoundShapes.h */; }; + 4913324413726B1F00DFB46D /* Confined.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321913726B1F00DFB46D /* Confined.h */; }; + 4913324513726B1F00DFB46D /* ContinuousTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321A13726B1F00DFB46D /* ContinuousTest.h */; }; + 4913324613726B1F00DFB46D /* DistanceTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321B13726B1F00DFB46D /* DistanceTest.h */; }; + 4913324713726B1F00DFB46D /* Dominos.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321C13726B1F00DFB46D /* Dominos.h */; }; + 4913324813726B1F00DFB46D /* DynamicTreeTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321D13726B1F00DFB46D /* DynamicTreeTest.h */; }; + 4913324913726B1F00DFB46D /* EdgeShapes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321E13726B1F00DFB46D /* EdgeShapes.h */; }; + 4913324A13726B1F00DFB46D /* EdgeTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913321F13726B1F00DFB46D /* EdgeTest.h */; }; + 4913324B13726B1F00DFB46D /* Gears.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322013726B1F00DFB46D /* Gears.h */; }; + 4913324C13726B1F00DFB46D /* LineJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322113726B1F00DFB46D /* LineJoint.h */; }; + 4913324D13726B1F00DFB46D /* OneSidedPlatform.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322213726B1F00DFB46D /* OneSidedPlatform.h */; }; + 4913324E13726B1F00DFB46D /* Pinball.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322313726B1F00DFB46D /* Pinball.h */; }; + 4913324F13726B1F00DFB46D /* PolyCollision.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322413726B1F00DFB46D /* PolyCollision.h */; }; + 4913325013726B1F00DFB46D /* PolyShapes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322513726B1F00DFB46D /* PolyShapes.h */; }; + 4913325113726B1F00DFB46D /* Prismatic.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322613726B1F00DFB46D /* Prismatic.h */; }; + 4913325213726B1F00DFB46D /* Pulleys.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322713726B1F00DFB46D /* Pulleys.h */; }; + 4913325313726B1F00DFB46D /* Pyramid.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322813726B1F00DFB46D /* Pyramid.h */; }; + 4913325413726B1F00DFB46D /* RayCast.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322913726B1F00DFB46D /* RayCast.h */; }; + 4913325513726B1F00DFB46D /* Revolute.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322A13726B1F00DFB46D /* Revolute.h */; }; + 4913325613726B1F00DFB46D /* Rope.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322B13726B1F00DFB46D /* Rope.h */; }; + 4913325713726B1F00DFB46D /* RopeJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322C13726B1F00DFB46D /* RopeJoint.h */; }; + 4913325813726B1F00DFB46D /* SensorTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322D13726B1F00DFB46D /* SensorTest.h */; }; + 4913325913726B1F00DFB46D /* ShapeEditing.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322E13726B1F00DFB46D /* ShapeEditing.h */; }; + 4913325A13726B1F00DFB46D /* SliderCrank.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913322F13726B1F00DFB46D /* SliderCrank.h */; }; + 4913325B13726B1F00DFB46D /* SphereStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913323013726B1F00DFB46D /* SphereStack.h */; }; + 4913325C13726B1F00DFB46D /* TheoJansen.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913323113726B1F00DFB46D /* TheoJansen.h */; }; + 4913325D13726B1F00DFB46D /* Tiles.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913323213726B1F00DFB46D /* Tiles.h */; }; + 4913325E13726B1F00DFB46D /* TimeOfImpact.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913323313726B1F00DFB46D /* TimeOfImpact.h */; }; + 4913325F13726B1F00DFB46D /* VaryingFriction.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913323413726B1F00DFB46D /* VaryingFriction.h */; }; + 4913326013726B1F00DFB46D /* VaryingRestitution.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913323513726B1F00DFB46D /* VaryingRestitution.h */; }; + 4913326113726B1F00DFB46D /* VerticalStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913323613726B1F00DFB46D /* VerticalStack.h */; }; + 4913326213726B1F00DFB46D /* Web.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913323713726B1F00DFB46D /* Web.h */; }; + 4913326413726B5D00DFB46D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4913326313726B5D00DFB46D /* OpenGLES.framework */; }; + 4913326E13726BC800DFB46D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4913326D13726BC800DFB46D /* QuartzCore.framework */; }; + 4913326F13726D2F00DFB46D /* Box2DAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 491331991372653600DFB46D /* Box2DAppDelegate.h */; }; + 4913327013726D2F00DFB46D /* Box2DView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913319B1372653600DFB46D /* Box2DView.h */; }; + 4913327113726D2F00DFB46D /* Delegates.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913319D1372653600DFB46D /* Delegates.h */; }; + 4913327213726D2F00DFB46D /* GLES-Render.h in Headers */ = {isa = PBXBuildFile; fileRef = 4913319E1372653600DFB46D /* GLES-Render.h */; }; + 4913327313726D2F00DFB46D /* iPhoneTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 491331A01372653600DFB46D /* iPhoneTest.h */; }; + 4913327413726D2F00DFB46D /* TestEntriesViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 491331A31372653600DFB46D /* TestEntriesViewController.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 491331BB1372661700DFB46D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 491331B41372661600DFB46D /* box2d-ios.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4913305F1372610400DFB46D; + remoteInfo = Box2D; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 491331691372645C00DFB46D /* box2d-iphone.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "box2d-iphone.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4913316D1372645C00DFB46D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 4913316F1372645C00DFB46D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 491331711372645C00DFB46D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 491331971372653600DFB46D /* Box2D_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Box2D_Prefix.pch; sourceTree = ""; }; + 491331991372653600DFB46D /* Box2DAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Box2DAppDelegate.h; sourceTree = ""; }; + 4913319A1372653600DFB46D /* Box2DAppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Box2DAppDelegate.mm; sourceTree = ""; }; + 4913319B1372653600DFB46D /* Box2DView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Box2DView.h; sourceTree = ""; }; + 4913319C1372653600DFB46D /* Box2DView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Box2DView.mm; sourceTree = ""; }; + 4913319D1372653600DFB46D /* Delegates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Delegates.h; sourceTree = ""; }; + 4913319E1372653600DFB46D /* GLES-Render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GLES-Render.h"; sourceTree = ""; }; + 4913319F1372653600DFB46D /* GLES-Render.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "GLES-Render.mm"; sourceTree = ""; }; + 491331A01372653600DFB46D /* iPhoneTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhoneTest.h; sourceTree = ""; }; + 491331A11372653600DFB46D /* iPhoneTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = iPhoneTest.mm; sourceTree = ""; }; + 491331A21372653600DFB46D /* iPhoneTestEntries.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = iPhoneTestEntries.mm; sourceTree = ""; }; + 491331A31372653600DFB46D /* TestEntriesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestEntriesViewController.h; sourceTree = ""; }; + 491331A41372653600DFB46D /* TestEntriesViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestEntriesViewController.mm; sourceTree = ""; }; + 491331A51372653600DFB46D /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; + 491331A61372653600DFB46D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 491331A71372653600DFB46D /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 491331A81372653600DFB46D /* MainWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; + 491331B41372661600DFB46D /* box2d-ios.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = "box2d-ios.xcodeproj"; sourceTree = SOURCE_ROOT; }; + 491331C01372663200DFB46D /* libBox2D.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libBox2D.a; sourceTree = SOURCE_ROOT; }; + 4913320D13726B1F00DFB46D /* ApplyForce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplyForce.h; sourceTree = ""; }; + 4913320E13726B1F00DFB46D /* BodyTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BodyTypes.h; sourceTree = ""; }; + 4913320F13726B1F00DFB46D /* Breakable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Breakable.h; sourceTree = ""; }; + 4913321013726B1F00DFB46D /* Bridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bridge.h; sourceTree = ""; }; + 4913321113726B1F00DFB46D /* BulletTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BulletTest.h; sourceTree = ""; }; + 4913321213726B1F00DFB46D /* Cantilever.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cantilever.h; sourceTree = ""; }; + 4913321313726B1F00DFB46D /* Car.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Car.h; sourceTree = ""; }; + 4913321413726B1F00DFB46D /* Chain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Chain.h; sourceTree = ""; }; + 4913321513726B1F00DFB46D /* CharacterCollision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterCollision.h; sourceTree = ""; }; + 4913321613726B1F00DFB46D /* CollisionFiltering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollisionFiltering.h; sourceTree = ""; }; + 4913321713726B1F00DFB46D /* CollisionProcessing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollisionProcessing.h; sourceTree = ""; }; + 4913321813726B1F00DFB46D /* CompoundShapes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompoundShapes.h; sourceTree = ""; }; + 4913321913726B1F00DFB46D /* Confined.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Confined.h; sourceTree = ""; }; + 4913321A13726B1F00DFB46D /* ContinuousTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContinuousTest.h; sourceTree = ""; }; + 4913321B13726B1F00DFB46D /* DistanceTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DistanceTest.h; sourceTree = ""; }; + 4913321C13726B1F00DFB46D /* Dominos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dominos.h; sourceTree = ""; }; + 4913321D13726B1F00DFB46D /* DynamicTreeTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicTreeTest.h; sourceTree = ""; }; + 4913321E13726B1F00DFB46D /* EdgeShapes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EdgeShapes.h; sourceTree = ""; }; + 4913321F13726B1F00DFB46D /* EdgeTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EdgeTest.h; sourceTree = ""; }; + 4913322013726B1F00DFB46D /* Gears.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Gears.h; sourceTree = ""; }; + 4913322113726B1F00DFB46D /* LineJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineJoint.h; sourceTree = ""; }; + 4913322213726B1F00DFB46D /* OneSidedPlatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OneSidedPlatform.h; sourceTree = ""; }; + 4913322313726B1F00DFB46D /* Pinball.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pinball.h; sourceTree = ""; }; + 4913322413726B1F00DFB46D /* PolyCollision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyCollision.h; sourceTree = ""; }; + 4913322513726B1F00DFB46D /* PolyShapes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyShapes.h; sourceTree = ""; }; + 4913322613726B1F00DFB46D /* Prismatic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prismatic.h; sourceTree = ""; }; + 4913322713726B1F00DFB46D /* Pulleys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pulleys.h; sourceTree = ""; }; + 4913322813726B1F00DFB46D /* Pyramid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pyramid.h; sourceTree = ""; }; + 4913322913726B1F00DFB46D /* RayCast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RayCast.h; sourceTree = ""; }; + 4913322A13726B1F00DFB46D /* Revolute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Revolute.h; sourceTree = ""; }; + 4913322B13726B1F00DFB46D /* Rope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Rope.h; sourceTree = ""; }; + 4913322C13726B1F00DFB46D /* RopeJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RopeJoint.h; sourceTree = ""; }; + 4913322D13726B1F00DFB46D /* SensorTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SensorTest.h; sourceTree = ""; }; + 4913322E13726B1F00DFB46D /* ShapeEditing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeEditing.h; sourceTree = ""; }; + 4913322F13726B1F00DFB46D /* SliderCrank.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SliderCrank.h; sourceTree = ""; }; + 4913323013726B1F00DFB46D /* SphereStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SphereStack.h; sourceTree = ""; }; + 4913323113726B1F00DFB46D /* TheoJansen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TheoJansen.h; sourceTree = ""; }; + 4913323213726B1F00DFB46D /* Tiles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tiles.h; sourceTree = ""; }; + 4913323313726B1F00DFB46D /* TimeOfImpact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimeOfImpact.h; sourceTree = ""; }; + 4913323413726B1F00DFB46D /* VaryingFriction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VaryingFriction.h; sourceTree = ""; }; + 4913323513726B1F00DFB46D /* VaryingRestitution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VaryingRestitution.h; sourceTree = ""; }; + 4913323613726B1F00DFB46D /* VerticalStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VerticalStack.h; sourceTree = ""; }; + 4913323713726B1F00DFB46D /* Web.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Web.h; sourceTree = ""; }; + 4913326313726B5D00DFB46D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + 4913326D13726BC800DFB46D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 491331661372645C00DFB46D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4913326E13726BC800DFB46D /* QuartzCore.framework in Frameworks */, + 4913326413726B5D00DFB46D /* OpenGLES.framework in Frameworks */, + 4913316E1372645C00DFB46D /* UIKit.framework in Frameworks */, + 491331701372645C00DFB46D /* Foundation.framework in Frameworks */, + 491331721372645C00DFB46D /* CoreGraphics.framework in Frameworks */, + 491331C11372663200DFB46D /* libBox2D.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 4913315E1372645C00DFB46D = { + isa = PBXGroup; + children = ( + 491331B41372661600DFB46D /* box2d-ios.xcodeproj */, + 491331961372653600DFB46D /* iPhone */, + 4913320C13726B1F00DFB46D /* Tests */, + 491331B31372654900DFB46D /* Resources */, + 4913316C1372645C00DFB46D /* Frameworks */, + 4913316A1372645C00DFB46D /* Products */, + ); + sourceTree = ""; + }; + 4913316A1372645C00DFB46D /* Products */ = { + isa = PBXGroup; + children = ( + 491331691372645C00DFB46D /* box2d-iphone.app */, + ); + name = Products; + sourceTree = ""; + }; + 4913316C1372645C00DFB46D /* Frameworks */ = { + isa = PBXGroup; + children = ( + 4913326D13726BC800DFB46D /* QuartzCore.framework */, + 4913326313726B5D00DFB46D /* OpenGLES.framework */, + 491331C01372663200DFB46D /* libBox2D.a */, + 4913316D1372645C00DFB46D /* UIKit.framework */, + 4913316F1372645C00DFB46D /* Foundation.framework */, + 491331711372645C00DFB46D /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 491331961372653600DFB46D /* iPhone */ = { + isa = PBXGroup; + children = ( + 491331971372653600DFB46D /* Box2D_Prefix.pch */, + 491331981372653600DFB46D /* Classes */, + 491331A71372653600DFB46D /* main.m */, + 491331A81372653600DFB46D /* MainWindow.xib */, + ); + path = iPhone; + sourceTree = ""; + }; + 491331981372653600DFB46D /* Classes */ = { + isa = PBXGroup; + children = ( + 491331991372653600DFB46D /* Box2DAppDelegate.h */, + 4913319A1372653600DFB46D /* Box2DAppDelegate.mm */, + 4913319B1372653600DFB46D /* Box2DView.h */, + 4913319C1372653600DFB46D /* Box2DView.mm */, + 4913319D1372653600DFB46D /* Delegates.h */, + 4913319E1372653600DFB46D /* GLES-Render.h */, + 4913319F1372653600DFB46D /* GLES-Render.mm */, + 491331A01372653600DFB46D /* iPhoneTest.h */, + 491331A11372653600DFB46D /* iPhoneTest.mm */, + 491331A21372653600DFB46D /* iPhoneTestEntries.mm */, + 491331A31372653600DFB46D /* TestEntriesViewController.h */, + 491331A41372653600DFB46D /* TestEntriesViewController.mm */, + ); + path = Classes; + sourceTree = ""; + }; + 491331B31372654900DFB46D /* Resources */ = { + isa = PBXGroup; + children = ( + 491331A51372653600DFB46D /* Icon.png */, + 491331A61372653600DFB46D /* Info.plist */, + ); + name = Resources; + path = iPhone; + sourceTree = ""; + }; + 491331B51372661600DFB46D /* Products */ = { + isa = PBXGroup; + children = ( + 491331BC1372661700DFB46D /* libBox2D.a */, + ); + name = Products; + sourceTree = ""; + }; + 4913320C13726B1F00DFB46D /* Tests */ = { + isa = PBXGroup; + children = ( + 4913320D13726B1F00DFB46D /* ApplyForce.h */, + 4913320E13726B1F00DFB46D /* BodyTypes.h */, + 4913320F13726B1F00DFB46D /* Breakable.h */, + 4913321013726B1F00DFB46D /* Bridge.h */, + 4913321113726B1F00DFB46D /* BulletTest.h */, + 4913321213726B1F00DFB46D /* Cantilever.h */, + 4913321313726B1F00DFB46D /* Car.h */, + 4913321413726B1F00DFB46D /* Chain.h */, + 4913321513726B1F00DFB46D /* CharacterCollision.h */, + 4913321613726B1F00DFB46D /* CollisionFiltering.h */, + 4913321713726B1F00DFB46D /* CollisionProcessing.h */, + 4913321813726B1F00DFB46D /* CompoundShapes.h */, + 4913321913726B1F00DFB46D /* Confined.h */, + 4913321A13726B1F00DFB46D /* ContinuousTest.h */, + 4913321B13726B1F00DFB46D /* DistanceTest.h */, + 4913321C13726B1F00DFB46D /* Dominos.h */, + 4913321D13726B1F00DFB46D /* DynamicTreeTest.h */, + 4913321E13726B1F00DFB46D /* EdgeShapes.h */, + 4913321F13726B1F00DFB46D /* EdgeTest.h */, + 4913322013726B1F00DFB46D /* Gears.h */, + 4913322113726B1F00DFB46D /* LineJoint.h */, + 4913322213726B1F00DFB46D /* OneSidedPlatform.h */, + 4913322313726B1F00DFB46D /* Pinball.h */, + 4913322413726B1F00DFB46D /* PolyCollision.h */, + 4913322513726B1F00DFB46D /* PolyShapes.h */, + 4913322613726B1F00DFB46D /* Prismatic.h */, + 4913322713726B1F00DFB46D /* Pulleys.h */, + 4913322813726B1F00DFB46D /* Pyramid.h */, + 4913322913726B1F00DFB46D /* RayCast.h */, + 4913322A13726B1F00DFB46D /* Revolute.h */, + 4913322B13726B1F00DFB46D /* Rope.h */, + 4913322C13726B1F00DFB46D /* RopeJoint.h */, + 4913322D13726B1F00DFB46D /* SensorTest.h */, + 4913322E13726B1F00DFB46D /* ShapeEditing.h */, + 4913322F13726B1F00DFB46D /* SliderCrank.h */, + 4913323013726B1F00DFB46D /* SphereStack.h */, + 4913323113726B1F00DFB46D /* TheoJansen.h */, + 4913323213726B1F00DFB46D /* Tiles.h */, + 4913323313726B1F00DFB46D /* TimeOfImpact.h */, + 4913323413726B1F00DFB46D /* VaryingFriction.h */, + 4913323513726B1F00DFB46D /* VaryingRestitution.h */, + 4913323613726B1F00DFB46D /* VerticalStack.h */, + 4913323713726B1F00DFB46D /* Web.h */, + ); + name = Tests; + path = src/Tests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 491331E71372682200DFB46D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4913326F13726D2F00DFB46D /* Box2DAppDelegate.h in Headers */, + 4913327013726D2F00DFB46D /* Box2DView.h in Headers */, + 4913327113726D2F00DFB46D /* Delegates.h in Headers */, + 4913327213726D2F00DFB46D /* GLES-Render.h in Headers */, + 4913327313726D2F00DFB46D /* iPhoneTest.h in Headers */, + 4913327413726D2F00DFB46D /* TestEntriesViewController.h in Headers */, + 4913323813726B1F00DFB46D /* ApplyForce.h in Headers */, + 4913323913726B1F00DFB46D /* BodyTypes.h in Headers */, + 4913323A13726B1F00DFB46D /* Breakable.h in Headers */, + 4913323B13726B1F00DFB46D /* Bridge.h in Headers */, + 4913323C13726B1F00DFB46D /* BulletTest.h in Headers */, + 4913323D13726B1F00DFB46D /* Cantilever.h in Headers */, + 4913323E13726B1F00DFB46D /* Car.h in Headers */, + 4913323F13726B1F00DFB46D /* Chain.h in Headers */, + 4913324013726B1F00DFB46D /* CharacterCollision.h in Headers */, + 4913324113726B1F00DFB46D /* CollisionFiltering.h in Headers */, + 4913324213726B1F00DFB46D /* CollisionProcessing.h in Headers */, + 4913324313726B1F00DFB46D /* CompoundShapes.h in Headers */, + 4913324413726B1F00DFB46D /* Confined.h in Headers */, + 4913324513726B1F00DFB46D /* ContinuousTest.h in Headers */, + 4913324613726B1F00DFB46D /* DistanceTest.h in Headers */, + 4913324713726B1F00DFB46D /* Dominos.h in Headers */, + 4913324813726B1F00DFB46D /* DynamicTreeTest.h in Headers */, + 4913324913726B1F00DFB46D /* EdgeShapes.h in Headers */, + 4913324A13726B1F00DFB46D /* EdgeTest.h in Headers */, + 4913324B13726B1F00DFB46D /* Gears.h in Headers */, + 4913324C13726B1F00DFB46D /* LineJoint.h in Headers */, + 4913324D13726B1F00DFB46D /* OneSidedPlatform.h in Headers */, + 4913324E13726B1F00DFB46D /* Pinball.h in Headers */, + 4913324F13726B1F00DFB46D /* PolyCollision.h in Headers */, + 4913325013726B1F00DFB46D /* PolyShapes.h in Headers */, + 4913325113726B1F00DFB46D /* Prismatic.h in Headers */, + 4913325213726B1F00DFB46D /* Pulleys.h in Headers */, + 4913325313726B1F00DFB46D /* Pyramid.h in Headers */, + 4913325413726B1F00DFB46D /* RayCast.h in Headers */, + 4913325513726B1F00DFB46D /* Revolute.h in Headers */, + 4913325613726B1F00DFB46D /* Rope.h in Headers */, + 4913325713726B1F00DFB46D /* RopeJoint.h in Headers */, + 4913325813726B1F00DFB46D /* SensorTest.h in Headers */, + 4913325913726B1F00DFB46D /* ShapeEditing.h in Headers */, + 4913325A13726B1F00DFB46D /* SliderCrank.h in Headers */, + 4913325B13726B1F00DFB46D /* SphereStack.h in Headers */, + 4913325C13726B1F00DFB46D /* TheoJansen.h in Headers */, + 4913325D13726B1F00DFB46D /* Tiles.h in Headers */, + 4913325E13726B1F00DFB46D /* TimeOfImpact.h in Headers */, + 4913325F13726B1F00DFB46D /* VaryingFriction.h in Headers */, + 4913326013726B1F00DFB46D /* VaryingRestitution.h in Headers */, + 4913326113726B1F00DFB46D /* VerticalStack.h in Headers */, + 4913326213726B1F00DFB46D /* Web.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 491331681372645C00DFB46D /* box2d-iphone */ = { + isa = PBXNativeTarget; + buildConfigurationList = 491331841372645C00DFB46D /* Build configuration list for PBXNativeTarget "box2d-iphone" */; + buildPhases = ( + 491331651372645C00DFB46D /* Sources */, + 491331661372645C00DFB46D /* Frameworks */, + 491331671372645C00DFB46D /* Resources */, + 491331E71372682200DFB46D /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "box2d-iphone"; + productName = "box2d-iphone"; + productReference = 491331691372645C00DFB46D /* box2d-iphone.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 491331601372645C00DFB46D /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 491331631372645C00DFB46D /* Build configuration list for PBXProject "box2d-iphone" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 4913315E1372645C00DFB46D; + productRefGroup = 4913316A1372645C00DFB46D /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 491331B51372661600DFB46D /* Products */; + ProjectRef = 491331B41372661600DFB46D /* box2d-ios.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 491331681372645C00DFB46D /* box2d-iphone */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 491331BC1372661700DFB46D /* libBox2D.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libBox2D.a; + remoteRef = 491331BB1372661700DFB46D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 491331671372645C00DFB46D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 491331AF1372653600DFB46D /* Icon.png in Resources */, + 491331B01372653600DFB46D /* Info.plist in Resources */, + 491331B21372653600DFB46D /* MainWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 491331651372645C00DFB46D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 491331A91372653600DFB46D /* Box2DAppDelegate.mm in Sources */, + 491331AA1372653600DFB46D /* Box2DView.mm in Sources */, + 491331AB1372653600DFB46D /* GLES-Render.mm in Sources */, + 491331AC1372653600DFB46D /* iPhoneTest.mm in Sources */, + 491331AD1372653600DFB46D /* iPhoneTestEntries.mm in Sources */, + 491331AE1372653600DFB46D /* TestEntriesViewController.mm in Sources */, + 491331B11372653600DFB46D /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 491331821372645C00DFB46D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = DEBUG; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 491331831372645C00DFB46D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + }; + name = Release; + }; + 491331851372645C00DFB46D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "box2d-iphone/box2d-iphone-Prefix.pch"; + GCC_VERSION = 4.2; + HEADER_SEARCH_PATHS = "./src/**"; + INFOPLIST_FILE = "box2d-iphone/box2d-iphone-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + ); + OTHER_LDFLAGS = "-Wl,-search_paths_first"; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "./src/**"; + USE_HEADERMAP = NO; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 491331861372645C00DFB46D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "box2d-iphone/box2d-iphone-Prefix.pch"; + GCC_VERSION = 4.2; + HEADER_SEARCH_PATHS = "./src/**"; + INFOPLIST_FILE = "box2d-iphone/box2d-iphone-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + ); + OTHER_LDFLAGS = "-Wl,-search_paths_first"; + PREBINDING = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + USER_HEADER_SEARCH_PATHS = "./src/**"; + USE_HEADERMAP = NO; + VALIDATE_PRODUCT = YES; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 491331631372645C00DFB46D /* Build configuration list for PBXProject "box2d-iphone" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 491331821372645C00DFB46D /* Debug */, + 491331831372645C00DFB46D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 491331841372645C00DFB46D /* Build configuration list for PBXNativeTarget "box2d-iphone" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 491331851372645C00DFB46D /* Debug */, + 491331861372645C00DFB46D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 491331601372645C00DFB46D /* Project object */; +} diff --git a/libs/box2d/box2d-osx.xcodeproj/project.pbxproj b/libs/box2d/box2d-osx.xcodeproj/project.pbxproj new file mode 100644 index 0000000..5e35787 --- /dev/null +++ b/libs/box2d/box2d-osx.xcodeproj/project.pbxproj @@ -0,0 +1,541 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 49132FCD13725D1000DFB46D /* Box2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F8013725D1000DFB46D /* Box2D.h */; }; + 49132FCE13725D1000DFB46D /* b2BroadPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F8213725D1000DFB46D /* b2BroadPhase.cpp */; }; + 49132FCF13725D1000DFB46D /* b2BroadPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F8313725D1000DFB46D /* b2BroadPhase.h */; }; + 49132FD013725D1000DFB46D /* b2CollideCircle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F8413725D1000DFB46D /* b2CollideCircle.cpp */; }; + 49132FD113725D1000DFB46D /* b2CollidePolygon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F8513725D1000DFB46D /* b2CollidePolygon.cpp */; }; + 49132FD213725D1000DFB46D /* b2Collision.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F8613725D1000DFB46D /* b2Collision.cpp */; }; + 49132FD313725D1000DFB46D /* b2Collision.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F8713725D1000DFB46D /* b2Collision.h */; }; + 49132FD413725D1000DFB46D /* b2Distance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F8813725D1000DFB46D /* b2Distance.cpp */; }; + 49132FD513725D1000DFB46D /* b2Distance.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F8913725D1000DFB46D /* b2Distance.h */; }; + 49132FD613725D1000DFB46D /* b2DynamicTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F8A13725D1000DFB46D /* b2DynamicTree.cpp */; }; + 49132FD713725D1000DFB46D /* b2DynamicTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F8B13725D1000DFB46D /* b2DynamicTree.h */; }; + 49132FD813725D1000DFB46D /* b2TimeOfImpact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F8C13725D1000DFB46D /* b2TimeOfImpact.cpp */; }; + 49132FD913725D1000DFB46D /* b2TimeOfImpact.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F8D13725D1000DFB46D /* b2TimeOfImpact.h */; }; + 49132FDA13725D1000DFB46D /* b2CircleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F8F13725D1000DFB46D /* b2CircleShape.cpp */; }; + 49132FDB13725D1000DFB46D /* b2CircleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F9013725D1000DFB46D /* b2CircleShape.h */; }; + 49132FDC13725D1000DFB46D /* b2PolygonShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F9113725D1000DFB46D /* b2PolygonShape.cpp */; }; + 49132FDD13725D1000DFB46D /* b2PolygonShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F9213725D1000DFB46D /* b2PolygonShape.h */; }; + 49132FDE13725D1000DFB46D /* b2Shape.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F9313725D1000DFB46D /* b2Shape.h */; }; + 49132FDF13725D1000DFB46D /* b2BlockAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F9513725D1000DFB46D /* b2BlockAllocator.cpp */; }; + 49132FE013725D1000DFB46D /* b2BlockAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F9613725D1000DFB46D /* b2BlockAllocator.h */; }; + 49132FE113725D1000DFB46D /* b2Math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F9713725D1000DFB46D /* b2Math.cpp */; }; + 49132FE213725D1000DFB46D /* b2Math.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F9813725D1000DFB46D /* b2Math.h */; }; + 49132FE313725D1000DFB46D /* b2Settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F9913725D1000DFB46D /* b2Settings.cpp */; }; + 49132FE413725D1000DFB46D /* b2Settings.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F9A13725D1000DFB46D /* b2Settings.h */; }; + 49132FE513725D1000DFB46D /* b2StackAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F9B13725D1000DFB46D /* b2StackAllocator.cpp */; }; + 49132FE613725D1000DFB46D /* b2StackAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F9C13725D1000DFB46D /* b2StackAllocator.h */; }; + 49132FE713725D1000DFB46D /* b2Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132F9E13725D1000DFB46D /* b2Body.cpp */; }; + 49132FE813725D1000DFB46D /* b2Body.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132F9F13725D1000DFB46D /* b2Body.h */; }; + 49132FE913725D1000DFB46D /* b2ContactManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FA013725D1000DFB46D /* b2ContactManager.cpp */; }; + 49132FEA13725D1000DFB46D /* b2ContactManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FA113725D1000DFB46D /* b2ContactManager.h */; }; + 49132FEB13725D1000DFB46D /* b2Fixture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FA213725D1000DFB46D /* b2Fixture.cpp */; }; + 49132FEC13725D1000DFB46D /* b2Fixture.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FA313725D1000DFB46D /* b2Fixture.h */; }; + 49132FED13725D1000DFB46D /* b2Island.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FA413725D1000DFB46D /* b2Island.cpp */; }; + 49132FEE13725D1000DFB46D /* b2Island.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FA513725D1000DFB46D /* b2Island.h */; }; + 49132FEF13725D1000DFB46D /* b2TimeStep.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FA613725D1000DFB46D /* b2TimeStep.h */; }; + 49132FF013725D1000DFB46D /* b2World.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FA713725D1000DFB46D /* b2World.cpp */; }; + 49132FF113725D1000DFB46D /* b2World.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FA813725D1000DFB46D /* b2World.h */; }; + 49132FF213725D1000DFB46D /* b2WorldCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FA913725D1000DFB46D /* b2WorldCallbacks.cpp */; }; + 49132FF313725D1000DFB46D /* b2WorldCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FAA13725D1000DFB46D /* b2WorldCallbacks.h */; }; + 49132FF413725D1000DFB46D /* b2CircleContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FAC13725D1000DFB46D /* b2CircleContact.cpp */; }; + 49132FF513725D1000DFB46D /* b2CircleContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FAD13725D1000DFB46D /* b2CircleContact.h */; }; + 49132FF613725D1000DFB46D /* b2Contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FAE13725D1000DFB46D /* b2Contact.cpp */; }; + 49132FF713725D1000DFB46D /* b2Contact.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FAF13725D1000DFB46D /* b2Contact.h */; }; + 49132FF813725D1000DFB46D /* b2ContactSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FB013725D1000DFB46D /* b2ContactSolver.cpp */; }; + 49132FF913725D1000DFB46D /* b2ContactSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FB113725D1000DFB46D /* b2ContactSolver.h */; }; + 49132FFA13725D1000DFB46D /* b2PolygonAndCircleContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FB213725D1000DFB46D /* b2PolygonAndCircleContact.cpp */; }; + 49132FFB13725D1000DFB46D /* b2PolygonAndCircleContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FB313725D1000DFB46D /* b2PolygonAndCircleContact.h */; }; + 49132FFC13725D1000DFB46D /* b2PolygonContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FB413725D1000DFB46D /* b2PolygonContact.cpp */; }; + 49132FFD13725D1000DFB46D /* b2PolygonContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FB513725D1000DFB46D /* b2PolygonContact.h */; }; + 49132FFE13725D1000DFB46D /* b2TOISolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FB613725D1000DFB46D /* b2TOISolver.cpp */; }; + 49132FFF13725D1000DFB46D /* b2TOISolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FB713725D1000DFB46D /* b2TOISolver.h */; }; + 4913300013725D1000DFB46D /* b2DistanceJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FB913725D1000DFB46D /* b2DistanceJoint.cpp */; }; + 4913300113725D1000DFB46D /* b2DistanceJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FBA13725D1000DFB46D /* b2DistanceJoint.h */; }; + 4913300213725D1000DFB46D /* b2FrictionJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FBB13725D1000DFB46D /* b2FrictionJoint.cpp */; }; + 4913300313725D1000DFB46D /* b2FrictionJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FBC13725D1000DFB46D /* b2FrictionJoint.h */; }; + 4913300413725D1000DFB46D /* b2GearJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FBD13725D1000DFB46D /* b2GearJoint.cpp */; }; + 4913300513725D1000DFB46D /* b2GearJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FBE13725D1000DFB46D /* b2GearJoint.h */; }; + 4913300613725D1000DFB46D /* b2Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FBF13725D1000DFB46D /* b2Joint.cpp */; }; + 4913300713725D1000DFB46D /* b2Joint.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FC013725D1000DFB46D /* b2Joint.h */; }; + 4913300813725D1000DFB46D /* b2LineJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FC113725D1000DFB46D /* b2LineJoint.cpp */; }; + 4913300913725D1000DFB46D /* b2LineJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FC213725D1000DFB46D /* b2LineJoint.h */; }; + 4913300A13725D1000DFB46D /* b2MouseJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FC313725D1000DFB46D /* b2MouseJoint.cpp */; }; + 4913300B13725D1000DFB46D /* b2MouseJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FC413725D1000DFB46D /* b2MouseJoint.h */; }; + 4913300C13725D1000DFB46D /* b2PrismaticJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FC513725D1000DFB46D /* b2PrismaticJoint.cpp */; }; + 4913300D13725D1000DFB46D /* b2PrismaticJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FC613725D1000DFB46D /* b2PrismaticJoint.h */; }; + 4913300E13725D1000DFB46D /* b2PulleyJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FC713725D1000DFB46D /* b2PulleyJoint.cpp */; }; + 4913300F13725D1000DFB46D /* b2PulleyJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FC813725D1000DFB46D /* b2PulleyJoint.h */; }; + 4913301013725D1000DFB46D /* b2RevoluteJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FC913725D1000DFB46D /* b2RevoluteJoint.cpp */; }; + 4913301113725D1000DFB46D /* b2RevoluteJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FCA13725D1000DFB46D /* b2RevoluteJoint.h */; }; + 4913301213725D1000DFB46D /* b2WeldJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49132FCB13725D1000DFB46D /* b2WeldJoint.cpp */; }; + 4913301313725D1000DFB46D /* b2WeldJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 49132FCC13725D1000DFB46D /* b2WeldJoint.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 49132F7113725CDD00DFB46D /* Box2D.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = Box2D.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + 49132F7413725CDD00DFB46D /* Box2D-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Box2D-Prefix.pch"; sourceTree = ""; }; + 49132F7513725CDD00DFB46D /* Box2DProj.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Box2DProj.xcconfig; sourceTree = ""; }; + 49132F7613725CDD00DFB46D /* Box2DTarget.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Box2DTarget.xcconfig; sourceTree = ""; }; + 49132F8013725D1000DFB46D /* Box2D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Box2D.h; sourceTree = ""; }; + 49132F8213725D1000DFB46D /* b2BroadPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2BroadPhase.cpp; sourceTree = ""; }; + 49132F8313725D1000DFB46D /* b2BroadPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2BroadPhase.h; sourceTree = ""; }; + 49132F8413725D1000DFB46D /* b2CollideCircle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CollideCircle.cpp; sourceTree = ""; }; + 49132F8513725D1000DFB46D /* b2CollidePolygon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CollidePolygon.cpp; sourceTree = ""; }; + 49132F8613725D1000DFB46D /* b2Collision.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Collision.cpp; sourceTree = ""; }; + 49132F8713725D1000DFB46D /* b2Collision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Collision.h; sourceTree = ""; }; + 49132F8813725D1000DFB46D /* b2Distance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Distance.cpp; sourceTree = ""; }; + 49132F8913725D1000DFB46D /* b2Distance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Distance.h; sourceTree = ""; }; + 49132F8A13725D1000DFB46D /* b2DynamicTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2DynamicTree.cpp; sourceTree = ""; }; + 49132F8B13725D1000DFB46D /* b2DynamicTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2DynamicTree.h; sourceTree = ""; }; + 49132F8C13725D1000DFB46D /* b2TimeOfImpact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2TimeOfImpact.cpp; sourceTree = ""; }; + 49132F8D13725D1000DFB46D /* b2TimeOfImpact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2TimeOfImpact.h; sourceTree = ""; }; + 49132F8F13725D1000DFB46D /* b2CircleShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CircleShape.cpp; sourceTree = ""; }; + 49132F9013725D1000DFB46D /* b2CircleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2CircleShape.h; sourceTree = ""; }; + 49132F9113725D1000DFB46D /* b2PolygonShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PolygonShape.cpp; sourceTree = ""; }; + 49132F9213725D1000DFB46D /* b2PolygonShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PolygonShape.h; sourceTree = ""; }; + 49132F9313725D1000DFB46D /* b2Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Shape.h; sourceTree = ""; }; + 49132F9513725D1000DFB46D /* b2BlockAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2BlockAllocator.cpp; sourceTree = ""; }; + 49132F9613725D1000DFB46D /* b2BlockAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2BlockAllocator.h; sourceTree = ""; }; + 49132F9713725D1000DFB46D /* b2Math.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Math.cpp; sourceTree = ""; }; + 49132F9813725D1000DFB46D /* b2Math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Math.h; sourceTree = ""; }; + 49132F9913725D1000DFB46D /* b2Settings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Settings.cpp; sourceTree = ""; }; + 49132F9A13725D1000DFB46D /* b2Settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Settings.h; sourceTree = ""; }; + 49132F9B13725D1000DFB46D /* b2StackAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2StackAllocator.cpp; sourceTree = ""; }; + 49132F9C13725D1000DFB46D /* b2StackAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2StackAllocator.h; sourceTree = ""; }; + 49132F9E13725D1000DFB46D /* b2Body.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Body.cpp; sourceTree = ""; }; + 49132F9F13725D1000DFB46D /* b2Body.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Body.h; sourceTree = ""; }; + 49132FA013725D1000DFB46D /* b2ContactManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2ContactManager.cpp; sourceTree = ""; }; + 49132FA113725D1000DFB46D /* b2ContactManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2ContactManager.h; sourceTree = ""; }; + 49132FA213725D1000DFB46D /* b2Fixture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Fixture.cpp; sourceTree = ""; }; + 49132FA313725D1000DFB46D /* b2Fixture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Fixture.h; sourceTree = ""; }; + 49132FA413725D1000DFB46D /* b2Island.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Island.cpp; sourceTree = ""; }; + 49132FA513725D1000DFB46D /* b2Island.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Island.h; sourceTree = ""; }; + 49132FA613725D1000DFB46D /* b2TimeStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2TimeStep.h; sourceTree = ""; }; + 49132FA713725D1000DFB46D /* b2World.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2World.cpp; sourceTree = ""; }; + 49132FA813725D1000DFB46D /* b2World.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2World.h; sourceTree = ""; }; + 49132FA913725D1000DFB46D /* b2WorldCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2WorldCallbacks.cpp; sourceTree = ""; }; + 49132FAA13725D1000DFB46D /* b2WorldCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2WorldCallbacks.h; sourceTree = ""; }; + 49132FAC13725D1000DFB46D /* b2CircleContact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CircleContact.cpp; sourceTree = ""; }; + 49132FAD13725D1000DFB46D /* b2CircleContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2CircleContact.h; sourceTree = ""; }; + 49132FAE13725D1000DFB46D /* b2Contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Contact.cpp; sourceTree = ""; }; + 49132FAF13725D1000DFB46D /* b2Contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Contact.h; sourceTree = ""; }; + 49132FB013725D1000DFB46D /* b2ContactSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2ContactSolver.cpp; sourceTree = ""; }; + 49132FB113725D1000DFB46D /* b2ContactSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2ContactSolver.h; sourceTree = ""; }; + 49132FB213725D1000DFB46D /* b2PolygonAndCircleContact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PolygonAndCircleContact.cpp; sourceTree = ""; }; + 49132FB313725D1000DFB46D /* b2PolygonAndCircleContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PolygonAndCircleContact.h; sourceTree = ""; }; + 49132FB413725D1000DFB46D /* b2PolygonContact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PolygonContact.cpp; sourceTree = ""; }; + 49132FB513725D1000DFB46D /* b2PolygonContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PolygonContact.h; sourceTree = ""; }; + 49132FB613725D1000DFB46D /* b2TOISolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2TOISolver.cpp; sourceTree = ""; }; + 49132FB713725D1000DFB46D /* b2TOISolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2TOISolver.h; sourceTree = ""; }; + 49132FB913725D1000DFB46D /* b2DistanceJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2DistanceJoint.cpp; sourceTree = ""; }; + 49132FBA13725D1000DFB46D /* b2DistanceJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2DistanceJoint.h; sourceTree = ""; }; + 49132FBB13725D1000DFB46D /* b2FrictionJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2FrictionJoint.cpp; sourceTree = ""; }; + 49132FBC13725D1000DFB46D /* b2FrictionJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2FrictionJoint.h; sourceTree = ""; }; + 49132FBD13725D1000DFB46D /* b2GearJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2GearJoint.cpp; sourceTree = ""; }; + 49132FBE13725D1000DFB46D /* b2GearJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2GearJoint.h; sourceTree = ""; }; + 49132FBF13725D1000DFB46D /* b2Joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Joint.cpp; sourceTree = ""; }; + 49132FC013725D1000DFB46D /* b2Joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Joint.h; sourceTree = ""; }; + 49132FC113725D1000DFB46D /* b2LineJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2LineJoint.cpp; sourceTree = ""; }; + 49132FC213725D1000DFB46D /* b2LineJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2LineJoint.h; sourceTree = ""; }; + 49132FC313725D1000DFB46D /* b2MouseJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2MouseJoint.cpp; sourceTree = ""; }; + 49132FC413725D1000DFB46D /* b2MouseJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2MouseJoint.h; sourceTree = ""; }; + 49132FC513725D1000DFB46D /* b2PrismaticJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PrismaticJoint.cpp; sourceTree = ""; }; + 49132FC613725D1000DFB46D /* b2PrismaticJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PrismaticJoint.h; sourceTree = ""; }; + 49132FC713725D1000DFB46D /* b2PulleyJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PulleyJoint.cpp; sourceTree = ""; }; + 49132FC813725D1000DFB46D /* b2PulleyJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PulleyJoint.h; sourceTree = ""; }; + 49132FC913725D1000DFB46D /* b2RevoluteJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2RevoluteJoint.cpp; sourceTree = ""; }; + 49132FCA13725D1000DFB46D /* b2RevoluteJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2RevoluteJoint.h; sourceTree = ""; }; + 49132FCB13725D1000DFB46D /* b2WeldJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2WeldJoint.cpp; sourceTree = ""; }; + 49132FCC13725D1000DFB46D /* b2WeldJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2WeldJoint.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 49132F6E13725CDD00DFB46D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 49132EDD13725A9600DFB46D = { + isa = PBXGroup; + children = ( + 49132F7F13725D1000DFB46D /* Box2D */, + 49132F7113725CDD00DFB46D /* Box2D.dylib */, + 49132F7213725CDD00DFB46D /* Box2D */, + ); + sourceTree = ""; + }; + 49132F7213725CDD00DFB46D /* Box2D */ = { + isa = PBXGroup; + children = ( + 49132F7513725CDD00DFB46D /* Box2DProj.xcconfig */, + 49132F7613725CDD00DFB46D /* Box2DTarget.xcconfig */, + 49132F7313725CDD00DFB46D /* Supporting Files */, + ); + path = Box2D; + sourceTree = ""; + }; + 49132F7313725CDD00DFB46D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 49132F7413725CDD00DFB46D /* Box2D-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 49132F7F13725D1000DFB46D /* Box2D */ = { + isa = PBXGroup; + children = ( + 49132F8013725D1000DFB46D /* Box2D.h */, + 49132F8113725D1000DFB46D /* Collision */, + 49132F9413725D1000DFB46D /* Common */, + 49132F9D13725D1000DFB46D /* Dynamics */, + ); + name = Box2D; + path = src/Box2D; + sourceTree = ""; + }; + 49132F8113725D1000DFB46D /* Collision */ = { + isa = PBXGroup; + children = ( + 49132F8213725D1000DFB46D /* b2BroadPhase.cpp */, + 49132F8313725D1000DFB46D /* b2BroadPhase.h */, + 49132F8413725D1000DFB46D /* b2CollideCircle.cpp */, + 49132F8513725D1000DFB46D /* b2CollidePolygon.cpp */, + 49132F8613725D1000DFB46D /* b2Collision.cpp */, + 49132F8713725D1000DFB46D /* b2Collision.h */, + 49132F8813725D1000DFB46D /* b2Distance.cpp */, + 49132F8913725D1000DFB46D /* b2Distance.h */, + 49132F8A13725D1000DFB46D /* b2DynamicTree.cpp */, + 49132F8B13725D1000DFB46D /* b2DynamicTree.h */, + 49132F8C13725D1000DFB46D /* b2TimeOfImpact.cpp */, + 49132F8D13725D1000DFB46D /* b2TimeOfImpact.h */, + 49132F8E13725D1000DFB46D /* Shapes */, + ); + path = Collision; + sourceTree = ""; + }; + 49132F8E13725D1000DFB46D /* Shapes */ = { + isa = PBXGroup; + children = ( + 49132F8F13725D1000DFB46D /* b2CircleShape.cpp */, + 49132F9013725D1000DFB46D /* b2CircleShape.h */, + 49132F9113725D1000DFB46D /* b2PolygonShape.cpp */, + 49132F9213725D1000DFB46D /* b2PolygonShape.h */, + 49132F9313725D1000DFB46D /* b2Shape.h */, + ); + path = Shapes; + sourceTree = ""; + }; + 49132F9413725D1000DFB46D /* Common */ = { + isa = PBXGroup; + children = ( + 49132F9513725D1000DFB46D /* b2BlockAllocator.cpp */, + 49132F9613725D1000DFB46D /* b2BlockAllocator.h */, + 49132F9713725D1000DFB46D /* b2Math.cpp */, + 49132F9813725D1000DFB46D /* b2Math.h */, + 49132F9913725D1000DFB46D /* b2Settings.cpp */, + 49132F9A13725D1000DFB46D /* b2Settings.h */, + 49132F9B13725D1000DFB46D /* b2StackAllocator.cpp */, + 49132F9C13725D1000DFB46D /* b2StackAllocator.h */, + ); + path = Common; + sourceTree = ""; + }; + 49132F9D13725D1000DFB46D /* Dynamics */ = { + isa = PBXGroup; + children = ( + 49132F9E13725D1000DFB46D /* b2Body.cpp */, + 49132F9F13725D1000DFB46D /* b2Body.h */, + 49132FA013725D1000DFB46D /* b2ContactManager.cpp */, + 49132FA113725D1000DFB46D /* b2ContactManager.h */, + 49132FA213725D1000DFB46D /* b2Fixture.cpp */, + 49132FA313725D1000DFB46D /* b2Fixture.h */, + 49132FA413725D1000DFB46D /* b2Island.cpp */, + 49132FA513725D1000DFB46D /* b2Island.h */, + 49132FA613725D1000DFB46D /* b2TimeStep.h */, + 49132FA713725D1000DFB46D /* b2World.cpp */, + 49132FA813725D1000DFB46D /* b2World.h */, + 49132FA913725D1000DFB46D /* b2WorldCallbacks.cpp */, + 49132FAA13725D1000DFB46D /* b2WorldCallbacks.h */, + 49132FAB13725D1000DFB46D /* Contacts */, + 49132FB813725D1000DFB46D /* Joints */, + ); + path = Dynamics; + sourceTree = ""; + }; + 49132FAB13725D1000DFB46D /* Contacts */ = { + isa = PBXGroup; + children = ( + 49132FAC13725D1000DFB46D /* b2CircleContact.cpp */, + 49132FAD13725D1000DFB46D /* b2CircleContact.h */, + 49132FAE13725D1000DFB46D /* b2Contact.cpp */, + 49132FAF13725D1000DFB46D /* b2Contact.h */, + 49132FB013725D1000DFB46D /* b2ContactSolver.cpp */, + 49132FB113725D1000DFB46D /* b2ContactSolver.h */, + 49132FB213725D1000DFB46D /* b2PolygonAndCircleContact.cpp */, + 49132FB313725D1000DFB46D /* b2PolygonAndCircleContact.h */, + 49132FB413725D1000DFB46D /* b2PolygonContact.cpp */, + 49132FB513725D1000DFB46D /* b2PolygonContact.h */, + 49132FB613725D1000DFB46D /* b2TOISolver.cpp */, + 49132FB713725D1000DFB46D /* b2TOISolver.h */, + ); + path = Contacts; + sourceTree = ""; + }; + 49132FB813725D1000DFB46D /* Joints */ = { + isa = PBXGroup; + children = ( + 49132FB913725D1000DFB46D /* b2DistanceJoint.cpp */, + 49132FBA13725D1000DFB46D /* b2DistanceJoint.h */, + 49132FBB13725D1000DFB46D /* b2FrictionJoint.cpp */, + 49132FBC13725D1000DFB46D /* b2FrictionJoint.h */, + 49132FBD13725D1000DFB46D /* b2GearJoint.cpp */, + 49132FBE13725D1000DFB46D /* b2GearJoint.h */, + 49132FBF13725D1000DFB46D /* b2Joint.cpp */, + 49132FC013725D1000DFB46D /* b2Joint.h */, + 49132FC113725D1000DFB46D /* b2LineJoint.cpp */, + 49132FC213725D1000DFB46D /* b2LineJoint.h */, + 49132FC313725D1000DFB46D /* b2MouseJoint.cpp */, + 49132FC413725D1000DFB46D /* b2MouseJoint.h */, + 49132FC513725D1000DFB46D /* b2PrismaticJoint.cpp */, + 49132FC613725D1000DFB46D /* b2PrismaticJoint.h */, + 49132FC713725D1000DFB46D /* b2PulleyJoint.cpp */, + 49132FC813725D1000DFB46D /* b2PulleyJoint.h */, + 49132FC913725D1000DFB46D /* b2RevoluteJoint.cpp */, + 49132FCA13725D1000DFB46D /* b2RevoluteJoint.h */, + 49132FCB13725D1000DFB46D /* b2WeldJoint.cpp */, + 49132FCC13725D1000DFB46D /* b2WeldJoint.h */, + ); + path = Joints; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 49132F6F13725CDD00DFB46D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 49132FCD13725D1000DFB46D /* Box2D.h in Headers */, + 49132FCF13725D1000DFB46D /* b2BroadPhase.h in Headers */, + 49132FD313725D1000DFB46D /* b2Collision.h in Headers */, + 49132FD513725D1000DFB46D /* b2Distance.h in Headers */, + 49132FD713725D1000DFB46D /* b2DynamicTree.h in Headers */, + 49132FD913725D1000DFB46D /* b2TimeOfImpact.h in Headers */, + 49132FDB13725D1000DFB46D /* b2CircleShape.h in Headers */, + 49132FDD13725D1000DFB46D /* b2PolygonShape.h in Headers */, + 49132FDE13725D1000DFB46D /* b2Shape.h in Headers */, + 49132FE013725D1000DFB46D /* b2BlockAllocator.h in Headers */, + 49132FE213725D1000DFB46D /* b2Math.h in Headers */, + 49132FE413725D1000DFB46D /* b2Settings.h in Headers */, + 49132FE613725D1000DFB46D /* b2StackAllocator.h in Headers */, + 49132FE813725D1000DFB46D /* b2Body.h in Headers */, + 49132FEA13725D1000DFB46D /* b2ContactManager.h in Headers */, + 49132FEC13725D1000DFB46D /* b2Fixture.h in Headers */, + 49132FEE13725D1000DFB46D /* b2Island.h in Headers */, + 49132FEF13725D1000DFB46D /* b2TimeStep.h in Headers */, + 49132FF113725D1000DFB46D /* b2World.h in Headers */, + 49132FF313725D1000DFB46D /* b2WorldCallbacks.h in Headers */, + 49132FF513725D1000DFB46D /* b2CircleContact.h in Headers */, + 49132FF713725D1000DFB46D /* b2Contact.h in Headers */, + 49132FF913725D1000DFB46D /* b2ContactSolver.h in Headers */, + 49132FFB13725D1000DFB46D /* b2PolygonAndCircleContact.h in Headers */, + 49132FFD13725D1000DFB46D /* b2PolygonContact.h in Headers */, + 49132FFF13725D1000DFB46D /* b2TOISolver.h in Headers */, + 4913300113725D1000DFB46D /* b2DistanceJoint.h in Headers */, + 4913300313725D1000DFB46D /* b2FrictionJoint.h in Headers */, + 4913300513725D1000DFB46D /* b2GearJoint.h in Headers */, + 4913300713725D1000DFB46D /* b2Joint.h in Headers */, + 4913300913725D1000DFB46D /* b2LineJoint.h in Headers */, + 4913300B13725D1000DFB46D /* b2MouseJoint.h in Headers */, + 4913300D13725D1000DFB46D /* b2PrismaticJoint.h in Headers */, + 4913300F13725D1000DFB46D /* b2PulleyJoint.h in Headers */, + 4913301113725D1000DFB46D /* b2RevoluteJoint.h in Headers */, + 4913301313725D1000DFB46D /* b2WeldJoint.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 49132F7013725CDD00DFB46D /* Box2D */ = { + isa = PBXNativeTarget; + buildConfigurationList = 49132F7C13725CDD00DFB46D /* Build configuration list for PBXNativeTarget "Box2D" */; + buildPhases = ( + 49132F6D13725CDD00DFB46D /* Sources */, + 49132F6E13725CDD00DFB46D /* Frameworks */, + 49132F6F13725CDD00DFB46D /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Box2D; + productName = Box2D; + productReference = 49132F7113725CDD00DFB46D /* Box2D.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 49132EDF13725A9600DFB46D /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 49132EE213725A9600DFB46D /* Build configuration list for PBXProject "box2d" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 49132EDD13725A9600DFB46D; + productRefGroup = 49132EDD13725A9600DFB46D; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 49132F7013725CDD00DFB46D /* Box2D */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 49132F6D13725CDD00DFB46D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 49132FCE13725D1000DFB46D /* b2BroadPhase.cpp in Sources */, + 49132FD013725D1000DFB46D /* b2CollideCircle.cpp in Sources */, + 49132FD113725D1000DFB46D /* b2CollidePolygon.cpp in Sources */, + 49132FD213725D1000DFB46D /* b2Collision.cpp in Sources */, + 49132FD413725D1000DFB46D /* b2Distance.cpp in Sources */, + 49132FD613725D1000DFB46D /* b2DynamicTree.cpp in Sources */, + 49132FD813725D1000DFB46D /* b2TimeOfImpact.cpp in Sources */, + 49132FDA13725D1000DFB46D /* b2CircleShape.cpp in Sources */, + 49132FDC13725D1000DFB46D /* b2PolygonShape.cpp in Sources */, + 49132FDF13725D1000DFB46D /* b2BlockAllocator.cpp in Sources */, + 49132FE113725D1000DFB46D /* b2Math.cpp in Sources */, + 49132FE313725D1000DFB46D /* b2Settings.cpp in Sources */, + 49132FE513725D1000DFB46D /* b2StackAllocator.cpp in Sources */, + 49132FE713725D1000DFB46D /* b2Body.cpp in Sources */, + 49132FE913725D1000DFB46D /* b2ContactManager.cpp in Sources */, + 49132FEB13725D1000DFB46D /* b2Fixture.cpp in Sources */, + 49132FED13725D1000DFB46D /* b2Island.cpp in Sources */, + 49132FF013725D1000DFB46D /* b2World.cpp in Sources */, + 49132FF213725D1000DFB46D /* b2WorldCallbacks.cpp in Sources */, + 49132FF413725D1000DFB46D /* b2CircleContact.cpp in Sources */, + 49132FF613725D1000DFB46D /* b2Contact.cpp in Sources */, + 49132FF813725D1000DFB46D /* b2ContactSolver.cpp in Sources */, + 49132FFA13725D1000DFB46D /* b2PolygonAndCircleContact.cpp in Sources */, + 49132FFC13725D1000DFB46D /* b2PolygonContact.cpp in Sources */, + 49132FFE13725D1000DFB46D /* b2TOISolver.cpp in Sources */, + 4913300013725D1000DFB46D /* b2DistanceJoint.cpp in Sources */, + 4913300213725D1000DFB46D /* b2FrictionJoint.cpp in Sources */, + 4913300413725D1000DFB46D /* b2GearJoint.cpp in Sources */, + 4913300613725D1000DFB46D /* b2Joint.cpp in Sources */, + 4913300813725D1000DFB46D /* b2LineJoint.cpp in Sources */, + 4913300A13725D1000DFB46D /* b2MouseJoint.cpp in Sources */, + 4913300C13725D1000DFB46D /* b2PrismaticJoint.cpp in Sources */, + 4913300E13725D1000DFB46D /* b2PulleyJoint.cpp in Sources */, + 4913301013725D1000DFB46D /* b2RevoluteJoint.cpp in Sources */, + 4913301213725D1000DFB46D /* b2WeldJoint.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 49132EE413725A9600DFB46D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + 49132EE513725A9600DFB46D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; + 49132F7D13725CDD00DFB46D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = DEBUG; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = 4.2; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + USER_HEADER_SEARCH_PATHS = "./src/**"; + }; + name = Debug; + }; + 49132F7E13725CDD00DFB46D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_VERSION = 4.2; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.6; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + USER_HEADER_SEARCH_PATHS = "./src/**"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 49132EE213725A9600DFB46D /* Build configuration list for PBXProject "box2d" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 49132EE413725A9600DFB46D /* Debug */, + 49132EE513725A9600DFB46D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 49132F7C13725CDD00DFB46D /* Build configuration list for PBXNativeTarget "Box2D" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 49132F7D13725CDD00DFB46D /* Debug */, + 49132F7E13725CDD00DFB46D /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 49132EDF13725A9600DFB46D /* Project object */; +} diff --git a/libs/box2d/iPhone/Box2D_Prefix.pch b/libs/box2d/iPhone/Box2D_Prefix.pch new file mode 100644 index 0000000..12c45d7 --- /dev/null +++ b/libs/box2d/iPhone/Box2D_Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'Box2D' target in the 'Box2D' project +// + +#ifdef __OBJC__ +#import +#import +#endif diff --git a/libs/box2d/iPhone/Classes/Box2DAppDelegate.h b/libs/box2d/iPhone/Classes/Box2DAppDelegate.h new file mode 100644 index 0000000..f081ba3 --- /dev/null +++ b/libs/box2d/iPhone/Classes/Box2DAppDelegate.h @@ -0,0 +1,24 @@ +// +// Box2DAppDelegate.h +// Box2D +// +// Box2D iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com +// + +#import +#import "TestEntriesViewController.h" +#import "Delegates.h" + +@class Box2DView; + +@interface Box2DAppDelegate : NSObject { + UIWindow *window; + Box2DView *glView; + TestEntriesViewController *testEntriesView; +} + +@property (nonatomic, retain) IBOutlet UIWindow *window; +@property (nonatomic, retain) IBOutlet Box2DView *glView; + +@end + diff --git a/libs/box2d/iPhone/Classes/Box2DAppDelegate.mm b/libs/box2d/iPhone/Classes/Box2DAppDelegate.mm new file mode 100644 index 0000000..e04a09e --- /dev/null +++ b/libs/box2d/iPhone/Classes/Box2DAppDelegate.mm @@ -0,0 +1,62 @@ +// +// Box2DAppDelegate.m +// Box2D +// +// Box2D iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com +// + +#import +#import "Box2DAppDelegate.h" +#import "Box2DView.h" + +@implementation Box2DAppDelegate + +@synthesize window; +@synthesize glView; + +- (void)applicationDidFinishLaunching:(UIApplication *)application { + [application setStatusBarHidden:true]; + + [glView removeFromSuperview]; + + glView.animationInterval = 1.0 / 60.0; + + testEntriesView=[[TestEntriesViewController alloc] initWithStyle:UITableViewStylePlain]; + [testEntriesView setDelegate:self]; + [glView setDelegate:self]; + + [window addSubview:[testEntriesView view]]; +} + +-(void) selectTest:(int) testIndex +{ + [[testEntriesView view] removeFromSuperview]; + [window addSubview:glView]; + [glView startAnimation]; + [glView selectTestEntry:testIndex]; +} + +-(void) leaveTest +{ + [glView stopAnimation]; + [glView removeFromSuperview]; + [window addSubview:[testEntriesView view]]; +} + +- (void)applicationWillResignActive:(UIApplication *)application { + glView.animationInterval = 1.0 / 5.0; +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + glView.animationInterval = 1.0 / 60.0; +} + + +- (void)dealloc { + [window release]; + [glView release]; + [super dealloc]; +} + +@end diff --git a/libs/box2d/iPhone/Classes/Box2DView.h b/libs/box2d/iPhone/Classes/Box2DView.h new file mode 100644 index 0000000..81d50b3 --- /dev/null +++ b/libs/box2d/iPhone/Classes/Box2DView.h @@ -0,0 +1,63 @@ +// +// Box2DView.h +// Box2D OpenGL View +// +// Box2D iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com +// + + +#import +#import +#import +#import + +#import "iPhoneTest.h" +#import "Delegates.h" + +/* +This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. +The view content is basically an EAGL surface you render your OpenGL scene into. +Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. +*/ +@interface Box2DView : UIView { + +@private + /* The pixel dimensions of the backbuffer */ + GLint backingWidth; + GLint backingHeight; + + EAGLContext *context; + + /* OpenGL names for the renderbuffer and framebuffers used to render to this view */ + GLuint viewRenderbuffer, viewFramebuffer; + + /* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */ + GLuint depthRenderbuffer; + + NSTimer *animationTimer; + NSTimeInterval animationInterval; + + TestEntry* entry; + Test* test; + + // Position offset and scale + float sceneScale; + CGPoint positionOffset; + CGPoint lastWorldTouch; + CGPoint lastScreenTouch; + + bool panning; + int doubleClickValidCountdown; + + id _delegate; + +} +@property(assign) id delegate; +@property NSTimeInterval animationInterval; + +- (void)startAnimation; +- (void)stopAnimation; +- (void)drawView; +-(void) selectTestEntry:(int) testIndex; + +@end diff --git a/libs/box2d/iPhone/Classes/Box2DView.mm b/libs/box2d/iPhone/Classes/Box2DView.mm new file mode 100644 index 0000000..edbf9ef --- /dev/null +++ b/libs/box2d/iPhone/Classes/Box2DView.mm @@ -0,0 +1,299 @@ +// +// Box2DView.mm +// Box2D OpenGL View +// +// Box2D iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com +// + +#import +#import + +#import "Box2DView.h" + +#define USE_DEPTH_BUFFER 0 +#define kAccelerometerFrequency 30 +#define FRAMES_BETWEEN_PRESSES_FOR_DOUBLE_CLICK 10 + +Settings settings; + +// A class extension to declare private methods +@interface Box2DView () + +@property (nonatomic, retain) EAGLContext *context; +@property (nonatomic, assign) NSTimer *animationTimer; + +- (BOOL) createFramebuffer; +- (void) destroyFramebuffer; + +@end + + +@implementation Box2DView + +@synthesize context; +@synthesize animationTimer; +@synthesize animationInterval; +@synthesize delegate=_delegate; + +// You must implement this method ++ (Class)layerClass { + return [CAEAGLLayer class]; +} + + +//The GL view is stored in the nib file. When it's unarchived it's sent -initWithCoder: +- (id)initWithCoder:(NSCoder*)coder { + + if ((self = [super initWithCoder:coder])) { + // Get the layer + CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; + + eaglLayer.opaque = YES; + eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil]; + + context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1]; + + if (!context || ![EAGLContext setCurrentContext:context]) { + [self release]; + return nil; + } + + animationInterval = 1.0 / 60.0; + sceneScale=10.0f; + positionOffset=CGPointMake(0, 0); + lastWorldTouch=CGPointMake(0, 0); + + [[UIAccelerometer sharedAccelerometer] setUpdateInterval:(1.0 / kAccelerometerFrequency)]; + [[UIAccelerometer sharedAccelerometer] setDelegate:self]; + + //[self setMultipleTouchEnabled:YES]; + } + + + return self; +} + +-(void) selectTestEntry:(int) testIndex +{ + // Destroy existing scene + delete test; + + entry = g_testEntries + testIndex; + test = entry->createFcn(); + + doubleClickValidCountdown=0; + + sceneScale=10.0f; + positionOffset=CGPointMake(0, 0); + lastWorldTouch=CGPointMake(0, 0); +} + + + +- (void)drawView { + + + + if (doubleClickValidCountdown>0) doubleClickValidCountdown--; + + [EAGLContext setCurrentContext:context]; + + glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); + glViewport(0, 0, backingWidth, backingHeight); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glOrthof(-sceneScale, sceneScale, -sceneScale*1.5f, sceneScale*1.5f, -1.0f, 1.0f); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(positionOffset.x, positionOffset.y,0); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + glEnableClientState(GL_VERTEX_ARRAY); + + test->Step(&settings); + + glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer); + [context presentRenderbuffer:GL_RENDERBUFFER_OES]; +} + + +- (void)layoutSubviews { + [EAGLContext setCurrentContext:context]; + [self destroyFramebuffer]; + [self createFramebuffer]; + [self drawView]; +} + + +- (BOOL)createFramebuffer { + + glGenFramebuffersOES(1, &viewFramebuffer); + glGenRenderbuffersOES(1, &viewRenderbuffer); + + glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); + glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer); + [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer]; + glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer); + + glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth); + glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight); + + if (USE_DEPTH_BUFFER) { + glGenRenderbuffersOES(1, &depthRenderbuffer); + glBindRenderbufferOES(GL_RENDERBUFFER_OES, depthRenderbuffer); + glRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_DEPTH_COMPONENT16_OES, backingWidth, backingHeight); + glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, depthRenderbuffer); + } + + if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) { + NSLog(@"failed to make complete framebuffer object %x", glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES)); + return NO; + } + + return YES; +} + + +- (void)destroyFramebuffer { + + glDeleteFramebuffersOES(1, &viewFramebuffer); + viewFramebuffer = 0; + glDeleteRenderbuffersOES(1, &viewRenderbuffer); + viewRenderbuffer = 0; + + if(depthRenderbuffer) { + glDeleteRenderbuffersOES(1, &depthRenderbuffer); + depthRenderbuffer = 0; + } +} + + +- (void)startAnimation { + self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:animationInterval target:self selector:@selector(drawView) userInfo:nil repeats:YES]; +} + + +- (void)stopAnimation { + self.animationTimer = nil; +} + + +- (void)setAnimationTimer:(NSTimer *)newTimer { + [animationTimer invalidate]; + animationTimer = newTimer; +} + + +- (void)setAnimationInterval:(NSTimeInterval)interval { + + animationInterval = interval; + if (animationTimer) { + [self stopAnimation]; + [self startAnimation]; + } +} + + +- (void)dealloc { + + [self stopAnimation]; + + if ([EAGLContext currentContext] == context) { + [EAGLContext setCurrentContext:nil]; + } + + [context release]; + [super dealloc]; +} + +-(CGPoint) screenSpaceToWorldSpace:(CGPoint) screenLocation +{ + screenLocation.x-=160; + screenLocation.y-=240; + screenLocation.x/=160; + screenLocation.y/=160; + screenLocation.x*=sceneScale; + screenLocation.y*=-sceneScale; + + screenLocation.x-=positionOffset.x; + screenLocation.y-=positionOffset.y; + return screenLocation; +} + +- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event +{ + + if (doubleClickValidCountdown>0) + { + [_delegate leaveTest]; + return; + } + + doubleClickValidCountdown=FRAMES_BETWEEN_PRESSES_FOR_DOUBLE_CLICK; + + + panning=false; + for (UITouch *touch in touches) + { + CGPoint touchLocation=[touch locationInView:self]; + CGPoint worldPosition=[self screenSpaceToWorldSpace:touchLocation]; + //printf("Screen touched %f,%f -> %f,%f\n",touchLocation.x,touchLocation.y,worldPosition.x,worldPosition.y); + lastScreenTouch=touchLocation; + lastWorldTouch=worldPosition; + b2Vec2 p = b2Vec2(lastWorldTouch.x,lastWorldTouch.y); + test->MouseDown(p); + //test->ShiftMouseDown(p); + + if (!test->m_mouseJoint) panning=true; + } +} + +- (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event +{ + for (UITouch *touch in touches) + { + CGPoint touchLocation=[touch locationInView:self]; + CGPoint worldPosition=[self screenSpaceToWorldSpace:touchLocation]; + //printf("Screen touched %f,%f -> %f,%f\n",touchLocation.x,touchLocation.y,worldPosition.x,worldPosition.y); + + + CGPoint screenDistanceMoved=CGPointMake(touchLocation.x-lastScreenTouch.x,touchLocation.y-lastScreenTouch.y); + if (panning) + { + screenDistanceMoved.x/=160; + screenDistanceMoved.y/=160; + screenDistanceMoved.x*=sceneScale; + screenDistanceMoved.y*=-sceneScale; + positionOffset.x+=screenDistanceMoved.x; + positionOffset.y+=screenDistanceMoved.y; + } + + lastScreenTouch=touchLocation; + lastWorldTouch=worldPosition; + test->MouseMove(b2Vec2(lastWorldTouch.x,lastWorldTouch.y)); + + } +} +- (void) touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event +{ + test->MouseUp(b2Vec2(lastWorldTouch.x,lastWorldTouch.y)); +} + +- (void) accelerometer:(UIAccelerometer*)accelerometer didAccelerate:(UIAcceleration*)acceleration +{ + // Only run for valid values + if (acceleration.y!=0 && acceleration.x!=0) + { + if (test) test->SetGravity(acceleration.x,acceleration.y); + } +} + +@end diff --git a/libs/box2d/iPhone/Classes/Delegates.h b/libs/box2d/iPhone/Classes/Delegates.h new file mode 100644 index 0000000..b4b7976 --- /dev/null +++ b/libs/box2d/iPhone/Classes/Delegates.h @@ -0,0 +1,14 @@ +/* + * Delegates.h + * Box2D + * + * Box2D iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com + * + * + */ + +@protocol TestSelectDelegate + -(void) selectTest:(int) testIndex; + -(void) leaveTest; + +@end \ No newline at end of file diff --git a/libs/box2d/iPhone/Classes/GLES-Render.h b/libs/box2d/iPhone/Classes/GLES-Render.h new file mode 100644 index 0000000..8e02a74 --- /dev/null +++ b/libs/box2d/iPhone/Classes/GLES-Render.h @@ -0,0 +1,58 @@ +/* +* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com +* +* iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef RENDER_H +#define RENDER_H + +#import +#import +#import +#import + +#include + +struct b2AABB; + +// This class implements debug drawing callbacks that are invoked +// inside b2World::Step. +class GLESDebugDraw : public b2Draw +{ +public: + void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color); + + void DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color); + + void DrawCircle(const b2Vec2& center, float32 radius, const b2Color& color); + + void DrawSolidCircle(const b2Vec2& center, float32 radius, const b2Vec2& axis, const b2Color& color); + + void DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2Color& color); + + void DrawTransform(const b2Transform& xf); + + void DrawPoint(const b2Vec2& p, float32 size, const b2Color& color); + + void DrawString(int x, int y, const char* string, ...); + + void DrawAABB(b2AABB* aabb, const b2Color& color); +}; + + +#endif diff --git a/libs/box2d/iPhone/Classes/GLES-Render.mm b/libs/box2d/iPhone/Classes/GLES-Render.mm new file mode 100644 index 0000000..abf5c57 --- /dev/null +++ b/libs/box2d/iPhone/Classes/GLES-Render.mm @@ -0,0 +1,149 @@ +/* +* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com +* +* iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "GLES-Render.h" + + +#include +#include + +#include + +void GLESDebugDraw::DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) +{ + glColor4f(color.r, color.g, color.b,1); + glVertexPointer(2, GL_FLOAT, 0, vertices); + glDrawArrays(GL_LINE_LOOP, 0, vertexCount); +} + +void GLESDebugDraw::DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) +{ + glVertexPointer(2, GL_FLOAT, 0, vertices); + + glColor4f(color.r, color.g, color.b,0.5f); + glDrawArrays(GL_TRIANGLE_FAN, 0, vertexCount); + + glColor4f(color.r, color.g, color.b,1); + glDrawArrays(GL_LINE_LOOP, 0, vertexCount); +} + +void GLESDebugDraw::DrawCircle(const b2Vec2& center, float32 radius, const b2Color& color) +{ + const float32 k_segments = 16.0f; + int vertexCount=16; + const float32 k_increment = 2.0f * b2_pi / k_segments; + float32 theta = 0.0f; + + GLfloat glVertices[vertexCount*2]; + for (int32 i = 0; i < k_segments; ++i) + { + b2Vec2 v = center + radius * b2Vec2(cosf(theta), sinf(theta)); + glVertices[i*2]=v.x; + glVertices[i*2+1]=v.y; + theta += k_increment; + } + + glColor4f(color.r, color.g, color.b,1); + glVertexPointer(2, GL_FLOAT, 0, glVertices); + + glDrawArrays(GL_TRIANGLE_FAN, 0, vertexCount); +} + +void GLESDebugDraw::DrawSolidCircle(const b2Vec2& center, float32 radius, const b2Vec2& axis, const b2Color& color) +{ + const float32 k_segments = 16.0f; + int vertexCount=16; + const float32 k_increment = 2.0f * b2_pi / k_segments; + float32 theta = 0.0f; + + GLfloat glVertices[vertexCount*2]; + for (int32 i = 0; i < k_segments; ++i) + { + b2Vec2 v = center + radius * b2Vec2(cosf(theta), sinf(theta)); + glVertices[i*2]=v.x; + glVertices[i*2+1]=v.y; + theta += k_increment; + } + + glColor4f(color.r, color.g, color.b,0.5f); + glVertexPointer(2, GL_FLOAT, 0, glVertices); + glDrawArrays(GL_TRIANGLE_FAN, 0, vertexCount); + glColor4f(color.r, color.g, color.b,1); + glDrawArrays(GL_LINE_LOOP, 0, vertexCount); + + // Draw the axis line + DrawSegment(center,center+radius*axis,color); +} + +void GLESDebugDraw::DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2Color& color) +{ + glColor4f(color.r, color.g, color.b,1); + GLfloat glVertices[] = { + p1.x,p1.y,p2.x,p2.y + }; + glVertexPointer(2, GL_FLOAT, 0, glVertices); + glDrawArrays(GL_LINES, 0, 2); +} + +void GLESDebugDraw::DrawTransform(const b2Transform& xf) +{ + b2Vec2 p1 = xf.position, p2; + const float32 k_axisScale = 0.4f; + + p2 = p1 + k_axisScale * xf.R.col1; + DrawSegment(p1,p2,b2Color(1,0,0)); + + p2 = p1 + k_axisScale * xf.R.col2; + DrawSegment(p1,p2,b2Color(0,1,0)); +} + +void GLESDebugDraw::DrawPoint(const b2Vec2& p, float32 size, const b2Color& color) +{ + glColor4f(color.r, color.g, color.b,1); + glPointSize(size); + GLfloat glVertices[] = { + p.x,p.y + }; + glVertexPointer(2, GL_FLOAT, 0, glVertices); + glDrawArrays(GL_POINTS, 0, 1); + glPointSize(1.0f); +} + +void GLESDebugDraw::DrawString(int x, int y, const char *string, ...) +{ + + /* Unsupported as yet. Could replace with bitmap font renderer at a later date */ +} + +void GLESDebugDraw::DrawAABB(b2AABB* aabb, const b2Color& c) +{ + + glColor4f(c.r, c.g, c.b,1); + + GLfloat glVertices[] = { + aabb->lowerBound.x, aabb->lowerBound.y, + aabb->upperBound.x, aabb->lowerBound.y, + aabb->upperBound.x, aabb->upperBound.y, + aabb->lowerBound.x, aabb->upperBound.y + }; + glVertexPointer(2, GL_FLOAT, 0, glVertices); + glDrawArrays(GL_LINE_LOOP, 0, 8); + +} diff --git a/libs/box2d/iPhone/Classes/TestEntriesViewController.h b/libs/box2d/iPhone/Classes/TestEntriesViewController.h new file mode 100644 index 0000000..d28a655 --- /dev/null +++ b/libs/box2d/iPhone/Classes/TestEntriesViewController.h @@ -0,0 +1,19 @@ +// +// TestEntriesViewController.h +// Box2D +// +// Box2D iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com +// + +#import +#import "iPhoneTest.h" +#import "Delegates.h" + +@interface TestEntriesViewController : UITableViewController { + int32 testCount; + id _delegate; +} + +@property(assign) id delegate; + +@end diff --git a/libs/box2d/iPhone/Classes/TestEntriesViewController.mm b/libs/box2d/iPhone/Classes/TestEntriesViewController.mm new file mode 100644 index 0000000..bb8e1ac --- /dev/null +++ b/libs/box2d/iPhone/Classes/TestEntriesViewController.mm @@ -0,0 +1,75 @@ +// +// TestEntriesViewController.m +// Box2D +// +// Box2D iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com +// + +#import "TestEntriesViewController.h" + + +@implementation TestEntriesViewController + +@synthesize delegate=_delegate; + +- (id)initWithStyle:(UITableViewStyle)style { + if (self = [super initWithStyle:style]) { + testCount = 0; + TestEntry* e = g_testEntries; + while (e->createFcn) + { + ++testCount; + ++e; + } + } + return self; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview + // Release anything that's not essential, such as cached data +} + +#pragma mark Table view methods + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + + +// Customize the number of rows in the table view. +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return testCount; +} + + +// Customize the appearance of table view cells. +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + static NSString *CellIdentifier = @"Cell"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + if (cell == nil) { + cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; + } + + // Set up the cell... + TestEntry* e = g_testEntries; + e+=indexPath.row; + + cell.textLabel.text = [NSString stringWithUTF8String:e->name]; + return cell; +} + + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [_delegate selectTest:indexPath.row]; +} + +- (void)dealloc { + [super dealloc]; +} + + +@end + diff --git a/libs/box2d/iPhone/Classes/iPhoneTest.h b/libs/box2d/iPhone/Classes/iPhoneTest.h new file mode 100644 index 0000000..c7c767a --- /dev/null +++ b/libs/box2d/iPhone/Classes/iPhoneTest.h @@ -0,0 +1,189 @@ +/* +* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com +* +* iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef TEST_H +#define TEST_H + +#import +#include +#include "GLES-Render.h" + +#include + +class Test; +struct Settings; + +typedef Test* TestCreateFcn(); + +#define RAND_LIMIT 32767 + +/// Random number in range [-1,1] +inline float32 RandomFloat() +{ + float32 r = (float32)(rand() & (RAND_LIMIT)); + r /= RAND_LIMIT; + r = 2.0f * r - 1.0f; + return r; +} + +/// Random floating point number in range [lo, hi] +inline float32 RandomFloat(float32 lo, float32 hi) +{ + float32 r = (float32)(rand() & (RAND_LIMIT)); + r /= RAND_LIMIT; + r = (hi - lo) * r + lo; + return r; +} + +/// Test settings. Some can be controlled in the GUI. +struct Settings +{ + Settings() : + viewCenter(0.0f, 20.0f), + hz(60.0f), + velocityIterations(8), + positionIterations(3), + drawShapes(1), + drawJoints(1), + drawAABBs(0), + drawPairs(0), + drawContactPoints(0), + drawContactNormals(0), + drawContactForces(0), + drawFrictionForces(0), + drawCOMs(0), + drawStats(0), + enableWarmStarting(1), + enableContinuous(1), + enableSubStepping(0), + pause(0), + singleStep(0) + {} + + b2Vec2 viewCenter; + float32 hz; + int32 velocityIterations; + int32 positionIterations; + int32 drawShapes; + int32 drawJoints; + int32 drawAABBs; + int32 drawPairs; + int32 drawContactPoints; + int32 drawContactNormals; + int32 drawContactForces; + int32 drawFrictionForces; + int32 drawCOMs; + int32 drawStats; + int32 enableWarmStarting; + int32 enableContinuous; + int32 enableSubStepping; + int32 pause; + int32 singleStep; +}; + +struct TestEntry +{ + const char *name; + TestCreateFcn *createFcn; +}; + +extern TestEntry g_testEntries[]; +// This is called when a joint in the world is implicitly destroyed +// because an attached body is destroyed. This gives us a chance to +// nullify the mouse joint. +class DestructionListener : public b2DestructionListener + { + public: + void SayGoodbye(b2Fixture* fixture) { B2_NOT_USED(fixture); } + void SayGoodbye(b2Joint* joint); + + Test* test; + }; + +const int32 k_maxContactPoints = 2048; + +struct ContactPoint +{ + b2Fixture* fixtureA; + b2Fixture* fixtureB; + b2Vec2 normal; + b2Vec2 position; + b2PointState state; +}; + +class Test : public b2ContactListener + { + public: + + Test(); + virtual ~Test(); + + void SetGravity(float x,float y); + void SetTextLine(int32 line) { m_textLine = line; } + void DrawTitle(int x, int y, const char *string); + virtual void Step(Settings* settings); + virtual void Keyboard(unsigned char key) { B2_NOT_USED(key); } + void ShiftMouseDown(const b2Vec2& p); + virtual void MouseDown(const b2Vec2& p); + virtual void MouseUp(const b2Vec2& p); + void MouseMove(const b2Vec2& p); + void LaunchBomb(); + void LaunchBomb(const b2Vec2& position, const b2Vec2& velocity); + + void SpawnBomb(const b2Vec2& worldPt); + void CompleteBombSpawn(const b2Vec2& p); + + // Let derived tests know that a joint was destroyed. + virtual void JointDestroyed(b2Joint* joint) { B2_NOT_USED(joint); } + + // Callbacks for derived classes. + virtual void BeginContact(b2Contact* contact) { B2_NOT_USED(contact); } + virtual void EndContact(b2Contact* contact) { B2_NOT_USED(contact); } + virtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold); + virtual void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse) + { + B2_NOT_USED(contact); + B2_NOT_USED(impulse); + } + + protected: + friend class DestructionListener; + friend class BoundaryListener; + friend class ContactListener; + + b2Body* m_groundBody; + b2AABB m_worldAABB; + ContactPoint m_points[k_maxContactPoints]; + int32 m_pointCount; + DestructionListener m_destructionListener; + GLESDebugDraw m_debugDraw; + int32 m_textLine; + b2World* m_world; + b2Body* m_bomb; + b2MouseJoint* m_mouseJoint; + b2Vec2 m_bombSpawnPoint; + bool m_bombSpawning; + b2Vec2 m_mouseWorld; + int32 m_stepCount; + }; + +#endif diff --git a/libs/box2d/iPhone/Classes/iPhoneTest.mm b/libs/box2d/iPhone/Classes/iPhoneTest.mm new file mode 100644 index 0000000..faf08df --- /dev/null +++ b/libs/box2d/iPhone/Classes/iPhoneTest.mm @@ -0,0 +1,415 @@ +/* +* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.com +* +* iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "iPhoneTest.h" +#include "GLES-Render.h" + +#include + +void DestructionListener::SayGoodbye(b2Joint* joint) +{ + if (test->m_mouseJoint == joint) + { + test->m_mouseJoint = NULL; + } + else + { + test->JointDestroyed(joint); + } +} + +Test::Test() +: m_debugDraw() +{ + b2Vec2 gravity; + gravity.Set(0.0f, -10.0f); + bool doSleep = true; + m_world = new b2World(gravity, doSleep); + m_bomb = NULL; + m_textLine = 30; + m_mouseJoint = NULL; + m_pointCount = 0; + + m_destructionListener.test = this; + m_world->SetDestructionListener(&m_destructionListener); + m_world->SetContactListener(this); + m_world->SetDebugDraw(&m_debugDraw); + + m_bombSpawning = false; + + m_stepCount = 0; + + b2BodyDef bodyDef; + m_groundBody = m_world->CreateBody(&bodyDef); +} + +Test::~Test() +{ + // By deleting the world, we delete the bomb, mouse joint, etc. + delete m_world; + m_world = NULL; + +} + +void Test::SetGravity( float x, float y) +{ + float tVectorLength=sqrt(x*x+y*y); + float newGravityX=9.81f*x/tVectorLength; + float newGravityY=9.81f*y/tVectorLength; + m_world->SetGravity(b2Vec2(newGravityX,newGravityY)); +} + +void Test::PreSolve(b2Contact* contact, const b2Manifold* oldManifold) +{ + const b2Manifold* manifold = contact->GetManifold(); + + if (manifold->pointCount == 0) + { + return; + } + + b2Fixture* fixtureA = contact->GetFixtureA(); + b2Fixture* fixtureB = contact->GetFixtureB(); + + b2PointState state1[b2_maxManifoldPoints], state2[b2_maxManifoldPoints]; + b2GetPointStates(state1, state2, oldManifold, manifold); + + b2WorldManifold worldManifold; + contact->GetWorldManifold(&worldManifold); + + for (int32 i = 0; i < manifold->pointCount && m_pointCount < k_maxContactPoints; ++i) + { + ContactPoint* cp = m_points + m_pointCount; + cp->fixtureA = fixtureA; + cp->fixtureB = fixtureB; + cp->position = worldManifold.points[i]; + cp->normal = worldManifold.normal; + cp->state = state2[i]; + ++m_pointCount; + } +} + +void Test::DrawTitle(int x, int y, const char *string) +{ + m_debugDraw.DrawString(x, y, string); +} + +class QueryCallback : public b2QueryCallback +{ +public: + QueryCallback(const b2Vec2& point) + { + m_point = point; + m_fixture = NULL; + } + + bool ReportFixture(b2Fixture* fixture) + { + b2Body* body = fixture->GetBody(); + if (body->GetType() == b2_dynamicBody) + { + bool inside = fixture->TestPoint(m_point); + if (inside) + { + m_fixture = fixture; + + // We are done, terminate the query. + return false; + } + } + + // Continue the query. + return true; + } + + b2Vec2 m_point; + b2Fixture* m_fixture; +}; + +void Test::MouseDown(const b2Vec2& p) +{ + m_mouseWorld = p; + + if (m_mouseJoint != NULL) + { + return; + } + + // Make a small box. + b2AABB aabb; + b2Vec2 d; + d.Set(0.001f, 0.001f); + aabb.lowerBound = p - d; + aabb.upperBound = p + d; + + // Query the world for overlapping shapes. + QueryCallback callback(p); + m_world->QueryAABB(&callback, aabb); + + if (callback.m_fixture) + { + b2Body* body = callback.m_fixture->GetBody(); + b2MouseJointDef md; + md.bodyA = m_groundBody; + md.bodyB = body; + md.target = p; +#ifdef TARGET_FLOAT32_IS_FIXED + md.maxForce = (body->GetMass() < 16.0)? + (1000.0f * body->GetMass()) : float32(16000.0); +#else + md.maxForce = 1000.0f * body->GetMass(); +#endif + m_mouseJoint = (b2MouseJoint*)m_world->CreateJoint(&md); + body->SetAwake(true); + } +} + +void Test::SpawnBomb(const b2Vec2& worldPt) +{ + m_bombSpawnPoint = worldPt; + m_bombSpawning = true; +} + +void Test::CompleteBombSpawn(const b2Vec2& p) +{ + if (m_bombSpawning == false) + { + return; + } + + const float multiplier = 30.0f; + b2Vec2 vel = m_bombSpawnPoint - p; + vel *= multiplier; + LaunchBomb(m_bombSpawnPoint,vel); + m_bombSpawning = false; +} + +void Test::ShiftMouseDown(const b2Vec2& p) +{ + m_mouseWorld = p; + + if (m_mouseJoint != NULL) + { + return; + } + + SpawnBomb(p); +} + +void Test::MouseUp(const b2Vec2& p) +{ + if (m_mouseJoint) + { + m_world->DestroyJoint(m_mouseJoint); + m_mouseJoint = NULL; + } + + if (m_bombSpawning) + { + CompleteBombSpawn(p); + } +} + +void Test::MouseMove(const b2Vec2& p) +{ + m_mouseWorld = p; + + if (m_mouseJoint) + { + m_mouseJoint->SetTarget(p); + } +} + +void Test::LaunchBomb() +{ + b2Vec2 p(RandomFloat(-15.0f, 15.0f), 30.0f); + b2Vec2 v = -5.0f * p; + LaunchBomb(p, v); +} + +void Test::LaunchBomb(const b2Vec2& position, const b2Vec2& velocity) +{ + if (m_bomb) + { + m_world->DestroyBody(m_bomb); + m_bomb = NULL; + } + + b2BodyDef bd; + bd.type = b2_dynamicBody; + bd.position = position; + bd.bullet = true; + m_bomb = m_world->CreateBody(&bd); + m_bomb->SetLinearVelocity(velocity); + + b2CircleShape circle; + circle.m_radius = 0.3f; + + b2FixtureDef fd; + fd.shape = &circle; + fd.density = 20.0f; + fd.restitution = 0.0f; + + b2Vec2 minV = position - b2Vec2(0.3f,0.3f); + b2Vec2 maxV = position + b2Vec2(0.3f,0.3f); + + b2AABB aabb; + aabb.lowerBound = minV; + aabb.upperBound = maxV; + + m_bomb->CreateFixture(&fd); +} + +void Test::Step(Settings* settings) +{ + float32 timeStep = settings->hz > 0.0f ? 1.0f / settings->hz : float32(0.0f); + + if (settings->pause) + { + if (settings->singleStep) + { + settings->singleStep = 0; + } + else + { + timeStep = 0.0f; + } + + m_debugDraw.DrawString(5, m_textLine, "****PAUSED****"); + m_textLine += 15; + } + + uint32 flags = 0; + flags += settings->drawShapes * b2Draw::e_shapeBit; + flags += settings->drawJoints * b2Draw::e_jointBit; + flags += settings->drawAABBs * b2Draw::e_aabbBit; + flags += settings->drawPairs * b2Draw::e_pairBit; + flags += settings->drawCOMs * b2Draw::e_centerOfMassBit; + m_debugDraw.SetFlags(flags); + + m_world->SetWarmStarting(settings->enableWarmStarting > 0); + m_world->SetContinuousPhysics(settings->enableContinuous > 0); + m_world->SetSubStepping(settings->enableSubStepping > 0); + + m_pointCount = 0; + + m_world->Step(timeStep, settings->velocityIterations, settings->positionIterations); + + m_world->DrawDebugData(); + + if (timeStep > 0.0f) + { + ++m_stepCount; + } + + if (settings->drawStats) + { + m_debugDraw.DrawString(5, m_textLine, "bodies/contacts/joints/proxies = %d/%d/%d", + m_world->GetBodyCount(), m_world->GetContactCount(), m_world->GetJointCount(), m_world->GetProxyCount()); + m_textLine += 15; + } + + if (m_mouseJoint) + { + b2Vec2 p1 = m_mouseJoint->GetAnchorB(); + b2Vec2 p2 = m_mouseJoint->GetTarget(); + + glPointSize(4.0f); + glColor4f(0.0f, 1.0f, 0.0f, 1.0f); + GLbyte verts1[2 * 3] = { + p1.x, p1.y, 0.0f, + p2.x, p2.y, 0.0f + }; + glVertexPointer(3, GL_BYTE, 0, verts1); + glDrawArrays(GL_POINTS, 0, 2); + glPointSize(1.0f); + + glColor4f(0.8f, 0.8f, 0.8f, 1.0f); + GLbyte verts2[2 * 3] = { + p1.x, p1.y, 0.0f, + p2.x, p2.y, 0.0f + }; + glVertexPointer(3, GL_BYTE, 0, verts2); + glDrawArrays(GL_LINES, 0, 2); + } + + if (m_bombSpawning) + { + glPointSize(4.0f); + glColor4f(0.0f, 0.0f, 1.0f, 1.0f); + glColor4f(0.0f, 0.0f, 1.0f, 1.0f); + GLbyte verts1[1 * 3] = { + m_bombSpawnPoint.x, m_bombSpawnPoint.y, 0.0f + }; + glVertexPointer(3, GL_BYTE, 0, verts1); + glDrawArrays(GL_POINTS, 0, 1); + + glColor4f(0.8f, 0.8f, 0.8f, 1.0f); + GLbyte verts2[2 * 3] = { + m_mouseWorld.x, m_mouseWorld.y, 0.0f, + m_bombSpawnPoint.x, m_bombSpawnPoint.y, 0.0f + }; + glVertexPointer(3, GL_BYTE, 0, verts2); + glDrawArrays(GL_LINES, 0, 2); + } + + if (settings->drawContactPoints) + { + //const float32 k_impulseScale = 0.1f; + const float32 k_axisScale = 0.3f; + + for (int32 i = 0; i < m_pointCount; ++i) + { + ContactPoint* point = m_points + i; + + if (point->state == b2_addState) + { + // Add + m_debugDraw.DrawPoint(point->position, 10.0f, b2Color(0.3f, 0.95f, 0.3f)); + } + else if (point->state == b2_persistState) + { + // Persist + m_debugDraw.DrawPoint(point->position, 5.0f, b2Color(0.3f, 0.3f, 0.95f)); + } + + if (settings->drawContactNormals == 1) + { + b2Vec2 p1 = point->position; + b2Vec2 p2 = p1 + k_axisScale * point->normal; + m_debugDraw.DrawSegment(p1, p2, b2Color(0.9f, 0.9f, 0.9f)); + } + else if (settings->drawContactForces == 1) + { + //b2Vec2 p1 = point->position; + //b2Vec2 p2 = p1 + k_forceScale * point->normalForce * point->normal; + //DrawSegment(p1, p2, b2Color(0.9f, 0.9f, 0.3f)); + } + + if (settings->drawFrictionForces == 1) + { + //b2Vec2 tangent = b2Cross(point->normal, 1.0f); + //b2Vec2 p1 = point->position; + //b2Vec2 p2 = p1 + k_forceScale * point->tangentForce * tangent; + //DrawSegment(p1, p2, b2Color(0.9f, 0.9f, 0.3f)); + } + } + } +} diff --git a/libs/box2d/iPhone/Classes/iPhoneTestEntries.mm b/libs/box2d/iPhone/Classes/iPhoneTestEntries.mm new file mode 100644 index 0000000..18faaa0 --- /dev/null +++ b/libs/box2d/iPhone/Classes/iPhoneTestEntries.mm @@ -0,0 +1,111 @@ +/* +* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#include "iPhoneTest.h" +#include +using namespace std; + +#include "ApplyForce.h" +#include "BodyTypes.h" +#include "Breakable.h" +#include "Bridge.h" +#include "BulletTest.h" +#include "Cantilever.h" +#include "Car.h" +#include "ContinuousTest.h" +#include "Chain.h" +#include "CharacterCollision.h" +#include "CollisionFiltering.h" +#include "CollisionProcessing.h" +#include "CompoundShapes.h" +#include "Confined.h" +#include "DistanceTest.h" +#include "Dominos.h" +#include "DynamicTreeTest.h" +#include "EdgeShapes.h" +#include "EdgeTest.h" +#include "Gears.h" +#include "OneSidedPlatform.h" +#include "Pinball.h" +#include "PolyCollision.h" +#include "PolyShapes.h" +#include "Prismatic.h" +#include "Pulleys.h" +#include "Pyramid.h" +#include "RayCast.h" +#include "Revolute.h" +#include "Rope.h" +#include "RopeJoint.h" +#include "SensorTest.h" +#include "ShapeEditing.h" +#include "SliderCrank.h" +#include "SphereStack.h" +#include "TheoJansen.h" +#include "Tiles.h" +#include "TimeOfImpact.h" +#include "VaryingFriction.h" +#include "VaryingRestitution.h" +#include "VerticalStack.h" +#include "Web.h" + +TestEntry g_testEntries[] = +{ + {"Pulleys", Pulleys::Create}, + {"SphereStack", SphereStack::Create}, + {"Tiles", Tiles::Create}, + {"Polygon Shapes", PolyShapes::Create}, + {"Rope", Rope::Create}, + {"Web", Web::Create}, + {"Car", Car::Create}, + {"Vertical Stack", VerticalStack::Create}, + {"RopeJoint", RopeJoint::Create}, + {"Character Collision", CharacterCollision::Create}, + {"Edge Test", EdgeTest::Create}, + {"One-Sided Platform", OneSidedPlatform::Create}, + {"Pinball", Pinball::Create}, + {"Bullet Test", BulletTest::Create}, + {"Continuous Test", ContinuousTest::Create}, + {"Time of Impact", TimeOfImpact::Create}, + {"Ray-Cast", RayCast::Create}, + {"Confined", Confined::Create}, + {"Pyramid", Pyramid::Create}, + {"Varying Restitution", VaryingRestitution::Create}, + {"Theo Jansen's Walker", TheoJansen::Create}, + {"Body Types", BodyTypes::Create}, + {"Prismatic", Prismatic::Create}, + {"Edge Shapes", EdgeShapes::Create}, + {"PolyCollision", PolyCollision::Create}, + {"Apply Force", ApplyForce::Create}, + {"Cantilever", Cantilever::Create}, + {"Bridge", Bridge::Create}, + {"Breakable", Breakable::Create}, + {"Chain", Chain::Create}, + {"Collision Filtering", CollisionFiltering::Create}, + {"Collision Processing", CollisionProcessing::Create}, + {"Compound Shapes", CompoundShapes::Create}, + {"Distance Test", DistanceTest::Create}, + {"Dominos", Dominos::Create}, + {"Dynamic Tree", DynamicTreeTest::Create}, + {"Gears", Gears::Create}, + {"Revolute", Revolute::Create}, + {"Sensor Test", SensorTest::Create}, + {"Shape Editing", ShapeEditing::Create}, + {"Slider Crank", SliderCrank::Create}, + {"Varying Friction", VaryingFriction::Create}, + {NULL, NULL} +}; diff --git a/libs/box2d/iPhone/Icon.png b/libs/box2d/iPhone/Icon.png new file mode 100644 index 0000000..fe81a59 Binary files /dev/null and b/libs/box2d/iPhone/Icon.png differ diff --git a/libs/box2d/iPhone/Info.plist b/libs/box2d/iPhone/Info.plist new file mode 100644 index 0000000..fdf8340 --- /dev/null +++ b/libs/box2d/iPhone/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + NSMainNibFile + MainWindow + + diff --git a/libs/box2d/iPhone/MainWindow.xib b/libs/box2d/iPhone/MainWindow.xib new file mode 100644 index 0000000..f2e35a9 --- /dev/null +++ b/libs/box2d/iPhone/MainWindow.xib @@ -0,0 +1,232 @@ + + + + 528 + 9G55 + 677 + 949.43 + 353.00 + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + + + IBFirstResponder + + + + + 1316 + + YES + + + 1298 + {320, 480} + + + 3 + MQA + + 2 + + + NO + + + + {320, 480} + + + 1 + MSAxIDEAA + + NO + YES + + + + + YES + + + delegate + + + + 4 + + + + window + + + + 5 + + + + glView + + + + 9 + + + + + YES + + 0 + + YES + + + + + + 2 + + + YES + + + + + + -1 + + + RmlsZSdzIE93bmVyA + + + 3 + + + + + 8 + + + + + -2 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 2.IBAttributePlaceholdersKey + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 3.CustomClassName + 3.IBPluginDependency + 8.CustomClassName + 8.IBPluginDependency + + + YES + UIApplication + UIResponder + + YES + + YES + + + YES + + + {{500, 343}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + Box2DAppDelegate + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + Box2DView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 9 + + + + YES + + Box2DAppDelegate + NSObject + + YES + + YES + glView + window + + + YES + Box2DView + UIWindow + + + + IBProjectSource + Classes/Box2DAppDelegate.h + + + + Box2DView + UIView + + IBProjectSource + Classes/Box2DView.h + + + + + 0 + Box2D.xcodeproj + 3 + + diff --git a/libs/box2d/iPhone/main.m b/libs/box2d/iPhone/main.m new file mode 100644 index 0000000..1c48429 --- /dev/null +++ b/libs/box2d/iPhone/main.m @@ -0,0 +1,17 @@ +// +// main.m +// Box2D +// +// Created by Simon Oliver on 14/01/2009. +// Copyright HandCircus 2009. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, nil); + [pool release]; + return retVal; +} diff --git a/libs/box2d/src/Box2D/Box2D.h b/libs/box2d/src/Box2D/Box2D.h new file mode 100644 index 0000000..dc5701f --- /dev/null +++ b/libs/box2d/src/Box2D/Box2D.h @@ -0,0 +1,62 @@ +/* +* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BOX2D_H +#define BOX2D_H + +/** +\mainpage Box2D API Documentation + +\section intro_sec Getting Started + +For documentation please see http://box2d.org/documentation.html + +For discussion please visit http://box2d.org/forum +*/ + +// These include files constitute the main Box2D API + +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/libs/box2d/src/Box2D/Collision/Shapes/b2CircleShape.cpp b/libs/box2d/src/Box2D/Collision/Shapes/b2CircleShape.cpp new file mode 100644 index 0000000..a950b0b --- /dev/null +++ b/libs/box2d/src/Box2D/Collision/Shapes/b2CircleShape.cpp @@ -0,0 +1,89 @@ +/* +* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#include +#include + +b2Shape* b2CircleShape::Clone(b2BlockAllocator* allocator) const +{ + void* mem = allocator->Allocate(sizeof(b2CircleShape)); + b2CircleShape* clone = new (mem) b2CircleShape; + *clone = *this; + return clone; +} + +bool b2CircleShape::TestPoint(const b2Transform& transform, const b2Vec2& p) const +{ + b2Vec2 center = transform.position + b2Mul(transform.R, m_p); + b2Vec2 d = p - center; + return b2Dot(d, d) <= m_radius * m_radius; +} + +// Collision Detection in Interactive 3D Environments by Gino van den Bergen +// From Section 3.1.2 +// x = s + a * r +// norm(x) = radius +bool b2CircleShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform) const +{ + b2Vec2 position = transform.position + b2Mul(transform.R, m_p); + b2Vec2 s = input.p1 - position; + float32 b = b2Dot(s, s) - m_radius * m_radius; + + // Solve quadratic equation. + b2Vec2 r = input.p2 - input.p1; + float32 c = b2Dot(s, r); + float32 rr = b2Dot(r, r); + float32 sigma = c * c - rr * b; + + // Check for negative discriminant and short segment. + if (sigma < 0.0f || rr < b2_epsilon) + { + return false; + } + + // Find the point of intersection of the line with the circle. + float32 a = -(c + b2Sqrt(sigma)); + + // Is the intersection point on the segment? + if (0.0f <= a && a <= input.maxFraction * rr) + { + a /= rr; + output->fraction = a; + output->normal = s + a * r; + output->normal.Normalize(); + return true; + } + + return false; +} + +void b2CircleShape::ComputeAABB(b2AABB* aabb, const b2Transform& transform) const +{ + b2Vec2 p = transform.position + b2Mul(transform.R, m_p); + aabb->lowerBound.Set(p.x - m_radius, p.y - m_radius); + aabb->upperBound.Set(p.x + m_radius, p.y + m_radius); +} + +void b2CircleShape::ComputeMass(b2MassData* massData, float32 density) const +{ + massData->mass = density * b2_pi * m_radius * m_radius; + massData->center = m_p; + + // inertia about the local origin + massData->I = massData->mass * (0.5f * m_radius * m_radius + b2Dot(m_p, m_p)); +} diff --git a/libs/box2d/src/Box2D/Collision/Shapes/b2CircleShape.h b/libs/box2d/src/Box2D/Collision/Shapes/b2CircleShape.h new file mode 100644 index 0000000..bb31da8 --- /dev/null +++ b/libs/box2d/src/Box2D/Collision/Shapes/b2CircleShape.h @@ -0,0 +1,87 @@ +/* +* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef B2_CIRCLE_SHAPE_H +#define B2_CIRCLE_SHAPE_H + +#include + +/// A circle shape. +class b2CircleShape : public b2Shape +{ +public: + b2CircleShape(); + + /// Implement b2Shape. + b2Shape* Clone(b2BlockAllocator* allocator) const; + + /// Implement b2Shape. + bool TestPoint(const b2Transform& transform, const b2Vec2& p) const; + + /// Implement b2Shape. + bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform) const; + + /// @see b2Shape::ComputeAABB + void ComputeAABB(b2AABB* aabb, const b2Transform& transform) const; + + /// @see b2Shape::ComputeMass + void ComputeMass(b2MassData* massData, float32 density) const; + + /// Get the supporting vertex index in the given direction. + int32 GetSupport(const b2Vec2& d) const; + + /// Get the supporting vertex in the given direction. + const b2Vec2& GetSupportVertex(const b2Vec2& d) const; + + /// Get the vertex count. + int32 GetVertexCount() const { return 1; } + + /// Get a vertex by index. Used by b2Distance. + const b2Vec2& GetVertex(int32 index) const; + + /// Position + b2Vec2 m_p; +}; + +inline b2CircleShape::b2CircleShape() +{ + m_type = e_circle; + m_radius = 0.0f; + m_p.SetZero(); +} + +inline int32 b2CircleShape::GetSupport(const b2Vec2 &d) const +{ + B2_NOT_USED(d); + return 0; +} + +inline const b2Vec2& b2CircleShape::GetSupportVertex(const b2Vec2 &d) const +{ + B2_NOT_USED(d); + return m_p; +} + +inline const b2Vec2& b2CircleShape::GetVertex(int32 index) const +{ + B2_NOT_USED(index); + b2Assert(index == 0); + return m_p; +} + +#endif diff --git a/libs/box2d/src/Box2D/Collision/Shapes/b2PolygonShape.cpp b/libs/box2d/src/Box2D/Collision/Shapes/b2PolygonShape.cpp new file mode 100644 index 0000000..429e647 --- /dev/null +++ b/libs/box2d/src/Box2D/Collision/Shapes/b2PolygonShape.cpp @@ -0,0 +1,434 @@ +/* +* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#include +#include + +b2Shape* b2PolygonShape::Clone(b2BlockAllocator* allocator) const +{ + void* mem = allocator->Allocate(sizeof(b2PolygonShape)); + b2PolygonShape* clone = new (mem) b2PolygonShape; + *clone = *this; + return clone; +} + +void b2PolygonShape::SetAsBox(float32 hx, float32 hy) +{ + m_vertexCount = 4; + m_vertices[0].Set(-hx, -hy); + m_vertices[1].Set( hx, -hy); + m_vertices[2].Set( hx, hy); + m_vertices[3].Set(-hx, hy); + m_normals[0].Set(0.0f, -1.0f); + m_normals[1].Set(1.0f, 0.0f); + m_normals[2].Set(0.0f, 1.0f); + m_normals[3].Set(-1.0f, 0.0f); + m_centroid.SetZero(); +} + +void b2PolygonShape::SetAsBox(float32 hx, float32 hy, const b2Vec2& center, float32 angle) +{ + m_vertexCount = 4; + m_vertices[0].Set(-hx, -hy); + m_vertices[1].Set( hx, -hy); + m_vertices[2].Set( hx, hy); + m_vertices[3].Set(-hx, hy); + m_normals[0].Set(0.0f, -1.0f); + m_normals[1].Set(1.0f, 0.0f); + m_normals[2].Set(0.0f, 1.0f); + m_normals[3].Set(-1.0f, 0.0f); + m_centroid = center; + + b2Transform xf; + xf.position = center; + xf.R.Set(angle); + + // Transform vertices and normals. + for (int32 i = 0; i < m_vertexCount; ++i) + { + m_vertices[i] = b2Mul(xf, m_vertices[i]); + m_normals[i] = b2Mul(xf.R, m_normals[i]); + } +} + +void b2PolygonShape::SetAsEdge(const b2Vec2& v1, const b2Vec2& v2) +{ + m_vertexCount = 2; + m_vertices[0] = v1; + m_vertices[1] = v2; + m_centroid = 0.5f * (v1 + v2); + m_normals[0] = b2Cross(v2 - v1, 1.0f); + m_normals[0].Normalize(); + m_normals[1] = -m_normals[0]; +} + +static b2Vec2 ComputeCentroid(const b2Vec2* vs, int32 count) +{ + b2Assert(count >= 2); + + b2Vec2 c; c.Set(0.0f, 0.0f); + float32 area = 0.0f; + + if (count == 2) + { + c = 0.5f * (vs[0] + vs[1]); + return c; + } + + // pRef is the reference point for forming triangles. + // It's location doesn't change the result (except for rounding error). + b2Vec2 pRef(0.0f, 0.0f); +#if 0 + // This code would put the reference point inside the polygon. + for (int32 i = 0; i < count; ++i) + { + pRef += vs[i]; + } + pRef *= 1.0f / count; +#endif + + const float32 inv3 = 1.0f / 3.0f; + + for (int32 i = 0; i < count; ++i) + { + // Triangle vertices. + b2Vec2 p1 = pRef; + b2Vec2 p2 = vs[i]; + b2Vec2 p3 = i + 1 < count ? vs[i+1] : vs[0]; + + b2Vec2 e1 = p2 - p1; + b2Vec2 e2 = p3 - p1; + + float32 D = b2Cross(e1, e2); + + float32 triangleArea = 0.5f * D; + area += triangleArea; + + // Area weighted centroid + c += triangleArea * inv3 * (p1 + p2 + p3); + } + + // Centroid + b2Assert(area > b2_epsilon); + c *= 1.0f / area; + return c; +} + +void b2PolygonShape::Set(const b2Vec2* vertices, int32 count) +{ + b2Assert(2 <= count && count <= b2_maxPolygonVertices); + m_vertexCount = count; + + // Copy vertices. + for (int32 i = 0; i < m_vertexCount; ++i) + { + m_vertices[i] = vertices[i]; + } + + // Compute normals. Ensure the edges have non-zero length. + for (int32 i = 0; i < m_vertexCount; ++i) + { + int32 i1 = i; + int32 i2 = i + 1 < m_vertexCount ? i + 1 : 0; + b2Vec2 edge = m_vertices[i2] - m_vertices[i1]; + b2Assert(edge.LengthSquared() > b2_epsilon * b2_epsilon); + m_normals[i] = b2Cross(edge, 1.0f); + m_normals[i].Normalize(); + } + +#ifdef _DEBUG + // Ensure the polygon is convex and the interior + // is to the left of each edge. + for (int32 i = 0; i < m_vertexCount; ++i) + { + int32 i1 = i; + int32 i2 = i + 1 < m_vertexCount ? i + 1 : 0; + b2Vec2 edge = m_vertices[i2] - m_vertices[i1]; + + for (int32 j = 0; j < m_vertexCount; ++j) + { + // Don't check vertices on the current edge. + if (j == i1 || j == i2) + { + continue; + } + + b2Vec2 r = m_vertices[j] - m_vertices[i1]; + + // Your polygon is non-convex (it has an indentation) or + // has colinear edges. + float32 s = b2Cross(edge, r); + b2Assert(s > 0.0f); + } + } +#endif + + // Compute the polygon centroid. + m_centroid = ComputeCentroid(m_vertices, m_vertexCount); +} + +bool b2PolygonShape::TestPoint(const b2Transform& xf, const b2Vec2& p) const +{ + b2Vec2 pLocal = b2MulT(xf.R, p - xf.position); + + for (int32 i = 0; i < m_vertexCount; ++i) + { + float32 dot = b2Dot(m_normals[i], pLocal - m_vertices[i]); + if (dot > 0.0f) + { + return false; + } + } + + return true; +} + +bool b2PolygonShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& xf) const +{ + // Put the ray into the polygon's frame of reference. + b2Vec2 p1 = b2MulT(xf.R, input.p1 - xf.position); + b2Vec2 p2 = b2MulT(xf.R, input.p2 - xf.position); + b2Vec2 d = p2 - p1; + + if (m_vertexCount == 2) + { + b2Vec2 v1 = m_vertices[0]; + b2Vec2 v2 = m_vertices[1]; + b2Vec2 normal = m_normals[0]; + + // q = p1 + t * d + // dot(normal, q - v1) = 0 + // dot(normal, p1 - v1) + t * dot(normal, d) = 0 + float32 numerator = b2Dot(normal, v1 - p1); + float32 denominator = b2Dot(normal, d); + + if (denominator == 0.0f) + { + return false; + } + + float32 t = numerator / denominator; + if (t < 0.0f || 1.0f < t) + { + return false; + } + + b2Vec2 q = p1 + t * d; + + // q = v1 + s * r + // s = dot(q - v1, r) / dot(r, r) + b2Vec2 r = v2 - v1; + float32 rr = b2Dot(r, r); + if (rr == 0.0f) + { + return false; + } + + float32 s = b2Dot(q - v1, r) / rr; + if (s < 0.0f || 1.0f < s) + { + return false; + } + + output->fraction = t; + if (numerator > 0.0f) + { + output->normal = -normal; + } + else + { + output->normal = normal; + } + return true; + } + else + { + float32 lower = 0.0f, upper = input.maxFraction; + + int32 index = -1; + + for (int32 i = 0; i < m_vertexCount; ++i) + { + // p = p1 + a * d + // dot(normal, p - v) = 0 + // dot(normal, p1 - v) + a * dot(normal, d) = 0 + float32 numerator = b2Dot(m_normals[i], m_vertices[i] - p1); + float32 denominator = b2Dot(m_normals[i], d); + + if (denominator == 0.0f) + { + if (numerator < 0.0f) + { + return false; + } + } + else + { + // Note: we want this predicate without division: + // lower < numerator / denominator, where denominator < 0 + // Since denominator < 0, we have to flip the inequality: + // lower < numerator / denominator <==> denominator * lower > numerator. + if (denominator < 0.0f && numerator < lower * denominator) + { + // Increase lower. + // The segment enters this half-space. + lower = numerator / denominator; + index = i; + } + else if (denominator > 0.0f && numerator < upper * denominator) + { + // Decrease upper. + // The segment exits this half-space. + upper = numerator / denominator; + } + } + + // The use of epsilon here causes the assert on lower to trip + // in some cases. Apparently the use of epsilon was to make edge + // shapes work, but now those are handled separately. + //if (upper < lower - b2_epsilon) + if (upper < lower) + { + return false; + } + } + + b2Assert(0.0f <= lower && lower <= input.maxFraction); + + if (index >= 0) + { + output->fraction = lower; + output->normal = b2Mul(xf.R, m_normals[index]); + return true; + } + } + + return false; +} + +void b2PolygonShape::ComputeAABB(b2AABB* aabb, const b2Transform& xf) const +{ + b2Vec2 lower = b2Mul(xf, m_vertices[0]); + b2Vec2 upper = lower; + + for (int32 i = 1; i < m_vertexCount; ++i) + { + b2Vec2 v = b2Mul(xf, m_vertices[i]); + lower = b2Min(lower, v); + upper = b2Max(upper, v); + } + + b2Vec2 r(m_radius, m_radius); + aabb->lowerBound = lower - r; + aabb->upperBound = upper + r; +} + +void b2PolygonShape::ComputeMass(b2MassData* massData, float32 density) const +{ + // Polygon mass, centroid, and inertia. + // Let rho be the polygon density in mass per unit area. + // Then: + // mass = rho * int(dA) + // centroid.x = (1/mass) * rho * int(x * dA) + // centroid.y = (1/mass) * rho * int(y * dA) + // I = rho * int((x*x + y*y) * dA) + // + // We can compute these integrals by summing all the integrals + // for each triangle of the polygon. To evaluate the integral + // for a single triangle, we make a change of variables to + // the (u,v) coordinates of the triangle: + // x = x0 + e1x * u + e2x * v + // y = y0 + e1y * u + e2y * v + // where 0 <= u && 0 <= v && u + v <= 1. + // + // We integrate u from [0,1-v] and then v from [0,1]. + // We also need to use the Jacobian of the transformation: + // D = cross(e1, e2) + // + // Simplification: triangle centroid = (1/3) * (p1 + p2 + p3) + // + // The rest of the derivation is handled by computer algebra. + + b2Assert(m_vertexCount >= 2); + + // A line segment has zero mass. + if (m_vertexCount == 2) + { + massData->center = 0.5f * (m_vertices[0] + m_vertices[1]); + massData->mass = 0.0f; + massData->I = 0.0f; + return; + } + + b2Vec2 center; center.Set(0.0f, 0.0f); + float32 area = 0.0f; + float32 I = 0.0f; + + // pRef is the reference point for forming triangles. + // It's location doesn't change the result (except for rounding error). + b2Vec2 pRef(0.0f, 0.0f); +#if 0 + // This code would put the reference point inside the polygon. + for (int32 i = 0; i < m_vertexCount; ++i) + { + pRef += m_vertices[i]; + } + pRef *= 1.0f / count; +#endif + + const float32 k_inv3 = 1.0f / 3.0f; + + for (int32 i = 0; i < m_vertexCount; ++i) + { + // Triangle vertices. + b2Vec2 p1 = pRef; + b2Vec2 p2 = m_vertices[i]; + b2Vec2 p3 = i + 1 < m_vertexCount ? m_vertices[i+1] : m_vertices[0]; + + b2Vec2 e1 = p2 - p1; + b2Vec2 e2 = p3 - p1; + + float32 D = b2Cross(e1, e2); + + float32 triangleArea = 0.5f * D; + area += triangleArea; + + // Area weighted centroid + center += triangleArea * k_inv3 * (p1 + p2 + p3); + + float32 px = p1.x, py = p1.y; + float32 ex1 = e1.x, ey1 = e1.y; + float32 ex2 = e2.x, ey2 = e2.y; + + float32 intx2 = k_inv3 * (0.25f * (ex1*ex1 + ex2*ex1 + ex2*ex2) + (px*ex1 + px*ex2)) + 0.5f*px*px; + float32 inty2 = k_inv3 * (0.25f * (ey1*ey1 + ey2*ey1 + ey2*ey2) + (py*ey1 + py*ey2)) + 0.5f*py*py; + + I += D * (intx2 + inty2); + } + + // Total mass + massData->mass = density * area; + + // Center of mass + b2Assert(area > b2_epsilon); + center *= 1.0f / area; + massData->center = center; + + // Inertia tensor relative to the local origin. + massData->I = density * I; +} diff --git a/libs/box2d/src/Box2D/Collision/Shapes/b2PolygonShape.h b/libs/box2d/src/Box2D/Collision/Shapes/b2PolygonShape.h new file mode 100644 index 0000000..564d4b0 --- /dev/null +++ b/libs/box2d/src/Box2D/Collision/Shapes/b2PolygonShape.h @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef B2_POLYGON_SHAPE_H +#define B2_POLYGON_SHAPE_H + +#include + +/// A convex polygon. It is assumed that the interior of the polygon is to +/// the left of each edge. +class b2PolygonShape : public b2Shape +{ +public: + b2PolygonShape(); + + /// Implement b2Shape. + b2Shape* Clone(b2BlockAllocator* allocator) const; + + /// Copy vertices. This assumes the vertices define a convex polygon. + /// It is assumed that the exterior is the the right of each edge. + void Set(const b2Vec2* vertices, int32 vertexCount); + + /// Build vertices to represent an axis-aligned box. + /// @param hx the half-width. + /// @param hy the half-height. + void SetAsBox(float32 hx, float32 hy); + + /// Build vertices to represent an oriented box. + /// @param hx the half-width. + /// @param hy the half-height. + /// @param center the center of the box in local coordinates. + /// @param angle the rotation of the box in local coordinates. + void SetAsBox(float32 hx, float32 hy, const b2Vec2& center, float32 angle); + + /// Set this as a single edge. + void SetAsEdge(const b2Vec2& v1, const b2Vec2& v2); + + /// @see b2Shape::TestPoint + bool TestPoint(const b2Transform& transform, const b2Vec2& p) const; + + /// Implement b2Shape. + bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform) const; + + /// @see b2Shape::ComputeAABB + void ComputeAABB(b2AABB* aabb, const b2Transform& transform) const; + + /// @see b2Shape::ComputeMass + void ComputeMass(b2MassData* massData, float32 density) const; + + /// Get the supporting vertex index in the given direction. + int32 GetSupport(const b2Vec2& d) const; + + /// Get the supporting vertex in the given direction. + const b2Vec2& GetSupportVertex(const b2Vec2& d) const; + + /// Get the vertex count. + int32 GetVertexCount() const { return m_vertexCount; } + + /// Get a vertex by index. + const b2Vec2& GetVertex(int32 index) const; + + b2Vec2 m_centroid; + b2Vec2 m_vertices[b2_maxPolygonVertices]; + b2Vec2 m_normals[b2_maxPolygonVertices]; + int32 m_vertexCount; +}; + +inline b2PolygonShape::b2PolygonShape() +{ + m_type = e_polygon; + m_radius = b2_polygonRadius; + m_vertexCount = 0; + m_centroid.SetZero(); +} + +inline int32 b2PolygonShape::GetSupport(const b2Vec2& d) const +{ + int32 bestIndex = 0; + float32 bestValue = b2Dot(m_vertices[0], d); + for (int32 i = 1; i < m_vertexCount; ++i) + { + float32 value = b2Dot(m_vertices[i], d); + if (value > bestValue) + { + bestIndex = i; + bestValue = value; + } + } + + return bestIndex; +} + +inline const b2Vec2& b2PolygonShape::GetSupportVertex(const b2Vec2& d) const +{ + int32 bestIndex = 0; + float32 bestValue = b2Dot(m_vertices[0], d); + for (int32 i = 1; i < m_vertexCount; ++i) + { + float32 value = b2Dot(m_vertices[i], d); + if (value > bestValue) + { + bestIndex = i; + bestValue = value; + } + } + + return m_vertices[bestIndex]; +} + +inline const b2Vec2& b2PolygonShape::GetVertex(int32 index) const +{ + b2Assert(0 <= index && index < m_vertexCount); + return m_vertices[index]; +} + +#endif diff --git a/libs/box2d/src/Box2D/Collision/Shapes/b2Shape.h b/libs/box2d/src/Box2D/Collision/Shapes/b2Shape.h new file mode 100644 index 0000000..9082c0e --- /dev/null +++ b/libs/box2d/src/Box2D/Collision/Shapes/b2Shape.h @@ -0,0 +1,95 @@ +/* +* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef B2_SHAPE_H +#define B2_SHAPE_H + +#include +#include +#include + +/// This holds the mass data computed for a shape. +struct b2MassData +{ + /// The mass of the shape, usually in kilograms. + float32 mass; + + /// The position of the shape's centroid relative to the shape's origin. + b2Vec2 center; + + /// The rotational inertia of the shape about the local origin. + float32 I; +}; + +/// A shape is used for collision detection. You can create a shape however you like. +/// Shapes used for simulation in b2World are created automatically when a b2Fixture +/// is created. +class b2Shape +{ +public: + + enum Type + { + e_unknown= -1, + e_circle = 0, + e_polygon = 1, + e_typeCount = 2, + }; + + b2Shape() { m_type = e_unknown; } + virtual ~b2Shape() {} + + /// Clone the concrete shape using the provided allocator. + virtual b2Shape* Clone(b2BlockAllocator* allocator) const = 0; + + /// Get the type of this shape. You can use this to down cast to the concrete shape. + /// @return the shape type. + Type GetType() const; + + /// Test a point for containment in this shape. This only works for convex shapes. + /// @param xf the shape world transform. + /// @param p a point in world coordinates. + virtual bool TestPoint(const b2Transform& xf, const b2Vec2& p) const = 0; + + /// Cast a ray against this shape. + /// @param output the ray-cast results. + /// @param input the ray-cast input parameters. + /// @param transform the transform to be applied to the shape. + virtual bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform) const = 0; + + /// Given a transform, compute the associated axis aligned bounding box for this shape. + /// @param aabb returns the axis aligned box. + /// @param xf the world transform of the shape. + virtual void ComputeAABB(b2AABB* aabb, const b2Transform& xf) const = 0; + + /// Compute the mass properties of this shape using its dimensions and density. + /// The inertia tensor is computed about the local origin. + /// @param massData returns the mass data for this shape. + /// @param density the density in kilograms per meter squared. + virtual void ComputeMass(b2MassData* massData, float32 density) const = 0; + + Type m_type; + float32 m_radius; +}; + +inline b2Shape::Type b2Shape::GetType() const +{ + return m_type; +} + +#endif diff --git a/libs/box2d/src/Box2D/Collision/b2BroadPhase.cpp b/libs/box2d/src/Box2D/Collision/b2BroadPhase.cpp new file mode 100644 index 0000000..12c7967 --- /dev/null +++ b/libs/box2d/src/Box2D/Collision/b2BroadPhase.cpp @@ -0,0 +1,116 @@ +/* +* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#include +#include + +b2BroadPhase::b2BroadPhase() +{ + m_proxyCount = 0; + + m_pairCapacity = 16; + m_pairCount = 0; + m_pairBuffer = (b2Pair*)b2Alloc(m_pairCapacity * sizeof(b2Pair)); + + m_moveCapacity = 16; + m_moveCount = 0; + m_moveBuffer = (int32*)b2Alloc(m_moveCapacity * sizeof(int32)); +} + +b2BroadPhase::~b2BroadPhase() +{ + b2Free(m_moveBuffer); + b2Free(m_pairBuffer); +} + +int32 b2BroadPhase::CreateProxy(const b2AABB& aabb, void* userData) +{ + int32 proxyId = m_tree.CreateProxy(aabb, userData); + ++m_proxyCount; + BufferMove(proxyId); + return proxyId; +} + +void b2BroadPhase::DestroyProxy(int32 proxyId) +{ + UnBufferMove(proxyId); + --m_proxyCount; + m_tree.DestroyProxy(proxyId); +} + +void b2BroadPhase::MoveProxy(int32 proxyId, const b2AABB& aabb, const b2Vec2& displacement) +{ + bool buffer = m_tree.MoveProxy(proxyId, aabb, displacement); + if (buffer) + { + BufferMove(proxyId); + } +} + +void b2BroadPhase::BufferMove(int32 proxyId) +{ + if (m_moveCount == m_moveCapacity) + { + int32* oldBuffer = m_moveBuffer; + m_moveCapacity *= 2; + m_moveBuffer = (int32*)b2Alloc(m_moveCapacity * sizeof(int32)); + memcpy(m_moveBuffer, oldBuffer, m_moveCount * sizeof(int32)); + b2Free(oldBuffer); + } + + m_moveBuffer[m_moveCount] = proxyId; + ++m_moveCount; +} + +void b2BroadPhase::UnBufferMove(int32 proxyId) +{ + for (int32 i = 0; i < m_moveCount; ++i) + { + if (m_moveBuffer[i] == proxyId) + { + m_moveBuffer[i] = e_nullProxy; + return; + } + } +} + +// This is called from b2DynamicTree::Query when we are gathering pairs. +bool b2BroadPhase::QueryCallback(int32 proxyId) +{ + // A proxy cannot form a pair with itself. + if (proxyId == m_queryProxyId) + { + return true; + } + + // Grow the pair buffer as needed. + if (m_pairCount == m_pairCapacity) + { + b2Pair* oldBuffer = m_pairBuffer; + m_pairCapacity *= 2; + m_pairBuffer = (b2Pair*)b2Alloc(m_pairCapacity * sizeof(b2Pair)); + memcpy(m_pairBuffer, oldBuffer, m_pairCount * sizeof(b2Pair)); + b2Free(oldBuffer); + } + + m_pairBuffer[m_pairCount].proxyIdA = b2Min(proxyId, m_queryProxyId); + m_pairBuffer[m_pairCount].proxyIdB = b2Max(proxyId, m_queryProxyId); + ++m_pairCount; + + return true; +} diff --git a/libs/box2d/src/Box2D/Collision/b2BroadPhase.h b/libs/box2d/src/Box2D/Collision/b2BroadPhase.h new file mode 100644 index 0000000..bff188e --- /dev/null +++ b/libs/box2d/src/Box2D/Collision/b2BroadPhase.h @@ -0,0 +1,229 @@ +/* +* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef B2_BROAD_PHASE_H +#define B2_BROAD_PHASE_H + +#include +#include +#include +#include + +struct b2Pair +{ + int32 proxyIdA; + int32 proxyIdB; + int32 next; +}; + +/// The broad-phase is used for computing pairs and performing volume queries and ray casts. +/// This broad-phase does not persist pairs. Instead, this reports potentially new pairs. +/// It is up to the client to consume the new pairs and to track subsequent overlap. +class b2BroadPhase +{ +public: + + enum + { + e_nullProxy = -1, + }; + + b2BroadPhase(); + ~b2BroadPhase(); + + /// Create a proxy with an initial AABB. Pairs are not reported until + /// UpdatePairs is called. + int32 CreateProxy(const b2AABB& aabb, void* userData); + + /// Destroy a proxy. It is up to the client to remove any pairs. + void DestroyProxy(int32 proxyId); + + /// Call MoveProxy as many times as you like, then when you are done + /// call UpdatePairs to finalized the proxy pairs (for your time step). + void MoveProxy(int32 proxyId, const b2AABB& aabb, const b2Vec2& displacement); + + /// Get the fat AABB for a proxy. + const b2AABB& GetFatAABB(int32 proxyId) const; + + /// Get user data from a proxy. Returns NULL if the id is invalid. + void* GetUserData(int32 proxyId) const; + + /// Test overlap of fat AABBs. + bool TestOverlap(int32 proxyIdA, int32 proxyIdB) const; + + /// Get the number of proxies. + int32 GetProxyCount() const; + + /// Update the pairs. This results in pair callbacks. This can only add pairs. + template + void UpdatePairs(T* callback); + + /// Query an AABB for overlapping proxies. The callback class + /// is called for each proxy that overlaps the supplied AABB. + template + void Query(T* callback, const b2AABB& aabb) const; + + /// Ray-cast against the proxies in the tree. This relies on the callback + /// to perform a exact ray-cast in the case were the proxy contains a shape. + /// The callback also performs the any collision filtering. This has performance + /// roughly equal to k * log(n), where k is the number of collisions and n is the + /// number of proxies in the tree. + /// @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). + /// @param callback a callback class that is called for each proxy that is hit by the ray. + template + void RayCast(T* callback, const b2RayCastInput& input) const; + + /// Compute the height of the embedded tree. + int32 ComputeHeight() const; + +private: + + friend class b2DynamicTree; + + void BufferMove(int32 proxyId); + void UnBufferMove(int32 proxyId); + + bool QueryCallback(int32 proxyId); + + b2DynamicTree m_tree; + + int32 m_proxyCount; + + int32* m_moveBuffer; + int32 m_moveCapacity; + int32 m_moveCount; + + b2Pair* m_pairBuffer; + int32 m_pairCapacity; + int32 m_pairCount; + + int32 m_queryProxyId; +}; + +/// This is used to sort pairs. +inline bool b2PairLessThan(const b2Pair& pair1, const b2Pair& pair2) +{ + if (pair1.proxyIdA < pair2.proxyIdA) + { + return true; + } + + if (pair1.proxyIdA == pair2.proxyIdA) + { + return pair1.proxyIdB < pair2.proxyIdB; + } + + return false; +} + +inline void* b2BroadPhase::GetUserData(int32 proxyId) const +{ + return m_tree.GetUserData(proxyId); +} + +inline bool b2BroadPhase::TestOverlap(int32 proxyIdA, int32 proxyIdB) const +{ + const b2AABB& aabbA = m_tree.GetFatAABB(proxyIdA); + const b2AABB& aabbB = m_tree.GetFatAABB(proxyIdB); + return b2TestOverlap(aabbA, aabbB); +} + +inline const b2AABB& b2BroadPhase::GetFatAABB(int32 proxyId) const +{ + return m_tree.GetFatAABB(proxyId); +} + +inline int32 b2BroadPhase::GetProxyCount() const +{ + return m_proxyCount; +} + +inline int32 b2BroadPhase::ComputeHeight() const +{ + return m_tree.ComputeHeight(); +} + +template +void b2BroadPhase::UpdatePairs(T* callback) +{ + // Reset pair buffer + m_pairCount = 0; + + // Perform tree queries for all moving proxies. + for (int32 i = 0; i < m_moveCount; ++i) + { + m_queryProxyId = m_moveBuffer[i]; + if (m_queryProxyId == e_nullProxy) + { + continue; + } + + // We have to query the tree with the fat AABB so that + // we don't fail to create a pair that may touch later. + const b2AABB& fatAABB = m_tree.GetFatAABB(m_queryProxyId); + + // Query tree, create pairs and add them pair buffer. + m_tree.Query(this, fatAABB); + } + + // Reset move buffer + m_moveCount = 0; + + // Sort the pair buffer to expose duplicates. + std::sort(m_pairBuffer, m_pairBuffer + m_pairCount, b2PairLessThan); + + // Send the pairs back to the client. + int32 i = 0; + while (i < m_pairCount) + { + b2Pair* primaryPair = m_pairBuffer + i; + void* userDataA = m_tree.GetUserData(primaryPair->proxyIdA); + void* userDataB = m_tree.GetUserData(primaryPair->proxyIdB); + + callback->AddPair(userDataA, userDataB); + ++i; + + // Skip any duplicate pairs. + while (i < m_pairCount) + { + b2Pair* pair = m_pairBuffer + i; + if (pair->proxyIdA != primaryPair->proxyIdA || pair->proxyIdB != primaryPair->proxyIdB) + { + break; + } + ++i; + } + } + + // Try to keep the tree balanced. + m_tree.Rebalance(4); +} + +template +inline void b2BroadPhase::Query(T* callback, const b2AABB& aabb) const +{ + m_tree.Query(callback, aabb); +} + +template +inline void b2BroadPhase::RayCast(T* callback, const b2RayCastInput& input) const +{ + m_tree.RayCast(callback, input); +} + +#endif diff --git a/libs/box2d/src/Box2D/Collision/b2CollideCircle.cpp b/libs/box2d/src/Box2D/Collision/b2CollideCircle.cpp new file mode 100644 index 0000000..6edf89d --- /dev/null +++ b/libs/box2d/src/Box2D/Collision/b2CollideCircle.cpp @@ -0,0 +1,154 @@ +/* +* Copyright (c) 2007-2009 Erin Catto http://www.gphysics.com +* +* This software is provided 'as-is', without any express or implied +* warranty. In no event will the authors be held liable for any damages +* arising from the use of this software. +* Permission is granted to anyone to use this software for any purpose, +* including commercial applications, and to alter it and redistribute it +* freely, subject to the following restrictions: +* 1. The origin of this software must not be misrepresented; you must not +* claim that you wrote the original software. If you use this software +* in a product, an acknowledgment in the product documentation would be +* appreciated but is not required. +* 2. Altered source versions must be plainly marked as such, and must not be +* misrepresented as being the original software. +* 3. This notice may not be removed or altered from any source distribution. +*/ + +#include +#include +#include + +void b2CollideCircles( + b2Manifold* manifold, + const b2CircleShape* circleA, const b2Transform& xfA, + const b2CircleShape* circleB, const b2Transform& xfB) +{ + manifold->pointCount = 0; + + b2Vec2 pA = b2Mul(xfA, circleA->m_p); + b2Vec2 pB = b2Mul(xfB, circleB->m_p); + + b2Vec2 d = pB - pA; + float32 distSqr = b2Dot(d, d); + float32 rA = circleA->m_radius, rB = circleB->m_radius; + float32 radius = rA + rB; + if (distSqr > radius * radius) + { + return; + } + + manifold->type = b2Manifold::e_circles; + manifold->localPoint = circleA->m_p; + manifold->localNormal.SetZero(); + manifold->pointCount = 1; + + manifold->points[0].localPoint = circleB->m_p; + manifold->points[0].id.key = 0; +} + +void b2CollidePolygonAndCircle( + b2Manifold* manifold, + const b2PolygonShape* polygonA, const b2Transform& xfA, + const b2CircleShape* circleB, const b2Transform& xfB) +{ + manifold->pointCount = 0; + + // Compute circle position in the frame of the polygon. + b2Vec2 c = b2Mul(xfB, circleB->m_p); + b2Vec2 cLocal = b2MulT(xfA, c); + + // Find the min separating edge. + int32 normalIndex = 0; + float32 separation = -b2_maxFloat; + float32 radius = polygonA->m_radius + circleB->m_radius; + int32 vertexCount = polygonA->m_vertexCount; + const b2Vec2* vertices = polygonA->m_vertices; + const b2Vec2* normals = polygonA->m_normals; + + for (int32 i = 0; i < vertexCount; ++i) + { + float32 s = b2Dot(normals[i], cLocal - vertices[i]); + + if (s > radius) + { + // Early out. + return; + } + + if (s > separation) + { + separation = s; + normalIndex = i; + } + } + + // Vertices that subtend the incident face. + int32 vertIndex1 = normalIndex; + int32 vertIndex2 = vertIndex1 + 1 < vertexCount ? vertIndex1 + 1 : 0; + b2Vec2 v1 = vertices[vertIndex1]; + b2Vec2 v2 = vertices[vertIndex2]; + + // If the center is inside the polygon ... + if (separation < b2_epsilon) + { + manifold->pointCount = 1; + manifold->type = b2Manifold::e_faceA; + manifold->localNormal = normals[normalIndex]; + manifold->localPoint = 0.5f * (v1 + v2); + manifold->points[0].localPoint = circleB->m_p; + manifold->points[0].id.key = 0; + return; + } + + // Compute barycentric coordinates + float32 u1 = b2Dot(cLocal - v1, v2 - v1); + float32 u2 = b2Dot(cLocal - v2, v1 - v2); + if (u1 <= 0.0f) + { + if (b2DistanceSquared(cLocal, v1) > radius * radius) + { + return; + } + + manifold->pointCount = 1; + manifold->type = b2Manifold::e_faceA; + manifold->localNormal = cLocal - v1; + manifold->localNormal.Normalize(); + manifold->localPoint = v1; + manifold->points[0].localPoint = circleB->m_p; + manifold->points[0].id.key = 0; + } + else if (u2 <= 0.0f) + { + if (b2DistanceSquared(cLocal, v2) > radius * radius) + { + return; + } + + manifold->pointCount = 1; + manifold->type = b2Manifold::e_faceA; + manifold->localNormal = cLocal - v2; + manifold->localNormal.Normalize(); + manifold->localPoint = v2; + manifold->points[0].localPoint = circleB->m_p; + manifold->points[0].id.key = 0; + } + else + { + b2Vec2 faceCenter = 0.5f * (v1 + v2); + float32 separation = b2Dot(cLocal - faceCenter, normals[vertIndex1]); + if (separation > radius) + { + return; + } + + manifold->pointCount = 1; + manifold->type = b2Manifold::e_faceA; + manifold->localNormal = normals[vertIndex1]; + manifold->localPoint = faceCenter; + manifold->points[0].localPoint = circleB->m_p; + manifold->points[0].id.key = 0; + } +} diff --git a/libs/box2d/src/Box2D/Collision/b2CollidePolygon.cpp b/libs/box2d/src/Box2D/Collision/b2CollidePolygon.cpp