mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 18:42:40 +08:00
@@ -638,18 +638,10 @@
|
||||
464AD6E6197EBB1400E502D8 /* pvr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 464AD6E3197EBB1400E502D8 /* pvr.cpp */; };
|
||||
464AD6E7197EBB1400E502D8 /* pvr.h in Headers */ = {isa = PBXBuildFile; fileRef = 464AD6E4197EBB1400E502D8 /* pvr.h */; };
|
||||
464AD6E8197EBB1400E502D8 /* pvr.h in Headers */ = {isa = PBXBuildFile; fileRef = 464AD6E4197EBB1400E502D8 /* pvr.h */; };
|
||||
4D11DCC71E48450D00DB6838 /* CCPhysicsContactListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D11DCC41E48450D00DB6838 /* CCPhysicsContactListener.h */; };
|
||||
4D11DCC81E48450D00DB6838 /* CCPhysicsContactListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D11DCC41E48450D00DB6838 /* CCPhysicsContactListener.h */; };
|
||||
4D11DCD41E487FA700DB6838 /* CCPhysicsAABBQueryCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D11DCD11E487FA700DB6838 /* CCPhysicsAABBQueryCallback.h */; };
|
||||
4D11DCD51E487FA700DB6838 /* CCPhysicsAABBQueryCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D11DCD11E487FA700DB6838 /* CCPhysicsAABBQueryCallback.h */; };
|
||||
4D2837131E0B7AE800501B7F /* CCPhysicsUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D2837111E0B7AE800501B7F /* CCPhysicsUtils.cpp */; };
|
||||
4D2837141E0B7AE800501B7F /* CCPhysicsUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D2837111E0B7AE800501B7F /* CCPhysicsUtils.cpp */; };
|
||||
4D2837151E0B7AE800501B7F /* CCPhysicsUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D2837121E0B7AE800501B7F /* CCPhysicsUtils.h */; };
|
||||
4D2837161E0B7AE800501B7F /* CCPhysicsUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D2837121E0B7AE800501B7F /* CCPhysicsUtils.h */; };
|
||||
4D2837191E0B7B6300501B7F /* CCPhysicsDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D2837171E0B7B6300501B7F /* CCPhysicsDebugDraw.cpp */; };
|
||||
4D28371A1E0B7B6300501B7F /* CCPhysicsDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D2837171E0B7B6300501B7F /* CCPhysicsDebugDraw.cpp */; };
|
||||
4D28371B1E0B7B6300501B7F /* CCPhysicsDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D2837181E0B7B6300501B7F /* CCPhysicsDebugDraw.h */; };
|
||||
4D28371C1E0B7B6300501B7F /* CCPhysicsDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D2837181E0B7B6300501B7F /* CCPhysicsDebugDraw.h */; };
|
||||
4D2816661E8CBB7200F26B06 /* CCPhysicsContactImpulse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D2816641E8CBB7200F26B06 /* CCPhysicsContactImpulse.cpp */; };
|
||||
4D2816671E8CBB7200F26B06 /* CCPhysicsContactImpulse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D2816641E8CBB7200F26B06 /* CCPhysicsContactImpulse.cpp */; };
|
||||
4D2816681E8CBB7200F26B06 /* CCPhysicsContactImpulse.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D2816651E8CBB7200F26B06 /* CCPhysicsContactImpulse.h */; };
|
||||
4D2816691E8CBB7200F26B06 /* CCPhysicsContactImpulse.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D2816651E8CBB7200F26B06 /* CCPhysicsContactImpulse.h */; };
|
||||
4D2E69071CC543B40032DD5C /* CCGraphicsNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D2E69031CC543B40032DD5C /* CCGraphicsNode.cpp */; };
|
||||
4D2E69081CC543B40032DD5C /* CCGraphicsNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D2E69031CC543B40032DD5C /* CCGraphicsNode.cpp */; };
|
||||
4D2E69091CC543B40032DD5C /* CCGraphicsNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D2E69041CC543B40032DD5C /* CCGraphicsNode.h */; };
|
||||
@@ -658,8 +650,6 @@
|
||||
4D2E690C1CC543B40032DD5C /* Triangulate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D2E69051CC543B40032DD5C /* Triangulate.cpp */; };
|
||||
4D2E690D1CC543B40032DD5C /* Triangulate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D2E69061CC543B40032DD5C /* Triangulate.h */; };
|
||||
4D2E690E1CC543B40032DD5C /* Triangulate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D2E69061CC543B40032DD5C /* Triangulate.h */; };
|
||||
4D3818D11E6D4EDB00DA344B /* CCPhysicsRayCastCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D3818CE1E6D4EDB00DA344B /* CCPhysicsRayCastCallback.h */; };
|
||||
4D3818D21E6D4EDB00DA344B /* CCPhysicsRayCastCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D3818CE1E6D4EDB00DA344B /* CCPhysicsRayCastCallback.h */; };
|
||||
4D6CF4371E83AAD5003327D4 /* CCCameraNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D6CF4351E83AAD5003327D4 /* CCCameraNode.cpp */; };
|
||||
4D6CF4381E83AAD5003327D4 /* CCCameraNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D6CF4351E83AAD5003327D4 /* CCCameraNode.cpp */; };
|
||||
4D6CF4391E83AAD5003327D4 /* CCCameraNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D6CF4361E83AAD5003327D4 /* CCCameraNode.h */; };
|
||||
@@ -668,12 +658,34 @@
|
||||
4D76BE3B1A4AAF0A00102962 /* CCActionTimelineNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D76BE381A4AAF0A00102962 /* CCActionTimelineNode.cpp */; };
|
||||
4D76BE3C1A4AAF0A00102962 /* CCActionTimelineNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D76BE391A4AAF0A00102962 /* CCActionTimelineNode.h */; };
|
||||
4D76BE3D1A4AAF0A00102962 /* CCActionTimelineNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D76BE391A4AAF0A00102962 /* CCActionTimelineNode.h */; };
|
||||
4D938F981E77E59400C35653 /* CCPhysicsAABBQueryCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D938F951E77E59400C35653 /* CCPhysicsAABBQueryCallback.cpp */; };
|
||||
4D938F991E77E59400C35653 /* CCPhysicsContactListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D938F961E77E59400C35653 /* CCPhysicsContactListener.cpp */; };
|
||||
4D938F9A1E77E59400C35653 /* CCPhysicsRayCastCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D938F971E77E59400C35653 /* CCPhysicsRayCastCallback.cpp */; };
|
||||
4D938F9B1E77E5A100C35653 /* CCPhysicsAABBQueryCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D938F951E77E59400C35653 /* CCPhysicsAABBQueryCallback.cpp */; };
|
||||
4D938F9C1E77E5A400C35653 /* CCPhysicsContactListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D938F961E77E59400C35653 /* CCPhysicsContactListener.cpp */; };
|
||||
4D938F9D1E77E5A700C35653 /* CCPhysicsRayCastCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4D938F971E77E59400C35653 /* CCPhysicsRayCastCallback.cpp */; };
|
||||
4DC06BCF1E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BC11E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.cpp */; };
|
||||
4DC06BD01E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BC11E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.cpp */; };
|
||||
4DC06BD11E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BC21E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.h */; };
|
||||
4DC06BD21E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BC21E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.h */; };
|
||||
4DC06BD31E8A68D400CA08B1 /* CCPhysicsContactListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BC31E8A68D400CA08B1 /* CCPhysicsContactListener.cpp */; };
|
||||
4DC06BD41E8A68D400CA08B1 /* CCPhysicsContactListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BC31E8A68D400CA08B1 /* CCPhysicsContactListener.cpp */; };
|
||||
4DC06BD51E8A68D400CA08B1 /* CCPhysicsContactListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BC41E8A68D400CA08B1 /* CCPhysicsContactListener.h */; };
|
||||
4DC06BD61E8A68D400CA08B1 /* CCPhysicsContactListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BC41E8A68D400CA08B1 /* CCPhysicsContactListener.h */; };
|
||||
4DC06BDB1E8A68D400CA08B1 /* CCPhysicsDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BC71E8A68D400CA08B1 /* CCPhysicsDebugDraw.cpp */; };
|
||||
4DC06BDC1E8A68D400CA08B1 /* CCPhysicsDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BC71E8A68D400CA08B1 /* CCPhysicsDebugDraw.cpp */; };
|
||||
4DC06BDD1E8A68D400CA08B1 /* CCPhysicsDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BC81E8A68D400CA08B1 /* CCPhysicsDebugDraw.h */; };
|
||||
4DC06BDE1E8A68D400CA08B1 /* CCPhysicsDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BC81E8A68D400CA08B1 /* CCPhysicsDebugDraw.h */; };
|
||||
4DC06BDF1E8A68D400CA08B1 /* CCPhysicsRayCastCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BC91E8A68D400CA08B1 /* CCPhysicsRayCastCallback.cpp */; };
|
||||
4DC06BE01E8A68D400CA08B1 /* CCPhysicsRayCastCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BC91E8A68D400CA08B1 /* CCPhysicsRayCastCallback.cpp */; };
|
||||
4DC06BE11E8A68D400CA08B1 /* CCPhysicsRayCastCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BCA1E8A68D400CA08B1 /* CCPhysicsRayCastCallback.h */; };
|
||||
4DC06BE21E8A68D400CA08B1 /* CCPhysicsRayCastCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BCA1E8A68D400CA08B1 /* CCPhysicsRayCastCallback.h */; };
|
||||
4DC06BE31E8A68D400CA08B1 /* CCPhysicsUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BCB1E8A68D400CA08B1 /* CCPhysicsUtils.cpp */; };
|
||||
4DC06BE41E8A68D400CA08B1 /* CCPhysicsUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BCB1E8A68D400CA08B1 /* CCPhysicsUtils.cpp */; };
|
||||
4DC06BE51E8A68D400CA08B1 /* CCPhysicsUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BCC1E8A68D400CA08B1 /* CCPhysicsUtils.h */; };
|
||||
4DC06BE61E8A68D400CA08B1 /* CCPhysicsUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BCC1E8A68D400CA08B1 /* CCPhysicsUtils.h */; };
|
||||
4DC06BE71E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BCD1E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.cpp */; };
|
||||
4DC06BE81E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BCD1E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.cpp */; };
|
||||
4DC06BE91E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BCE1E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.h */; };
|
||||
4DC06BEA1E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BCE1E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.h */; };
|
||||
4DC06BED1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BEB1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.cpp */; };
|
||||
4DC06BEE1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DC06BEB1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.cpp */; };
|
||||
4DC06BEF1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BEC1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.h */; };
|
||||
4DC06BF01E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DC06BEC1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.h */; };
|
||||
4DED47D21DFFA4AF0070C5C4 /* Box2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DED476B1DFFA4AF0070C5C4 /* Box2D.h */; };
|
||||
4DED47D31DFFA4AF0070C5C4 /* Box2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DED476B1DFFA4AF0070C5C4 /* Box2D.h */; };
|
||||
4DED47D41DFFA4AF0070C5C4 /* b2BroadPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DED476F1DFFA4AF0070C5C4 /* b2BroadPhase.cpp */; };
|
||||
@@ -2263,24 +2275,31 @@
|
||||
46A168631807AF4E005B8026 /* CCTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCTableView.h; sourceTree = "<group>"; };
|
||||
46A168641807AF4E005B8026 /* CCTableViewCell.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableViewCell.cpp; sourceTree = "<group>"; };
|
||||
46A168651807AF4E005B8026 /* CCTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCTableViewCell.h; sourceTree = "<group>"; };
|
||||
4D11DCC41E48450D00DB6838 /* CCPhysicsContactListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysicsContactListener.h; path = creator/CCPhysicsContactListener.h; sourceTree = "<group>"; };
|
||||
4D11DCD11E487FA700DB6838 /* CCPhysicsAABBQueryCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysicsAABBQueryCallback.h; path = creator/CCPhysicsAABBQueryCallback.h; sourceTree = "<group>"; };
|
||||
4D2837111E0B7AE800501B7F /* CCPhysicsUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysicsUtils.cpp; path = creator/CCPhysicsUtils.cpp; sourceTree = "<group>"; };
|
||||
4D2837121E0B7AE800501B7F /* CCPhysicsUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysicsUtils.h; path = creator/CCPhysicsUtils.h; sourceTree = "<group>"; };
|
||||
4D2837171E0B7B6300501B7F /* CCPhysicsDebugDraw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysicsDebugDraw.cpp; path = creator/CCPhysicsDebugDraw.cpp; sourceTree = "<group>"; };
|
||||
4D2837181E0B7B6300501B7F /* CCPhysicsDebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysicsDebugDraw.h; path = creator/CCPhysicsDebugDraw.h; sourceTree = "<group>"; };
|
||||
4D2816641E8CBB7200F26B06 /* CCPhysicsContactImpulse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsContactImpulse.cpp; sourceTree = "<group>"; };
|
||||
4D2816651E8CBB7200F26B06 /* CCPhysicsContactImpulse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsContactImpulse.h; sourceTree = "<group>"; };
|
||||
4D2E69031CC543B40032DD5C /* CCGraphicsNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCGraphicsNode.cpp; path = creator/CCGraphicsNode.cpp; sourceTree = "<group>"; };
|
||||
4D2E69041CC543B40032DD5C /* CCGraphicsNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCGraphicsNode.h; path = creator/CCGraphicsNode.h; sourceTree = "<group>"; };
|
||||
4D2E69051CC543B40032DD5C /* Triangulate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Triangulate.cpp; path = creator/Triangulate.cpp; sourceTree = "<group>"; };
|
||||
4D2E69061CC543B40032DD5C /* Triangulate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Triangulate.h; path = creator/Triangulate.h; sourceTree = "<group>"; };
|
||||
4D3818CE1E6D4EDB00DA344B /* CCPhysicsRayCastCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPhysicsRayCastCallback.h; path = creator/CCPhysicsRayCastCallback.h; sourceTree = "<group>"; };
|
||||
4D6CF4351E83AAD5003327D4 /* CCCameraNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCCameraNode.cpp; path = creator/CCCameraNode.cpp; sourceTree = "<group>"; };
|
||||
4D6CF4361E83AAD5003327D4 /* CCCameraNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCCameraNode.h; path = creator/CCCameraNode.h; sourceTree = "<group>"; };
|
||||
4D76BE381A4AAF0A00102962 /* CCActionTimelineNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCActionTimelineNode.cpp; sourceTree = "<group>"; };
|
||||
4D76BE391A4AAF0A00102962 /* CCActionTimelineNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCActionTimelineNode.h; sourceTree = "<group>"; };
|
||||
4D938F951E77E59400C35653 /* CCPhysicsAABBQueryCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysicsAABBQueryCallback.cpp; path = creator/CCPhysicsAABBQueryCallback.cpp; sourceTree = "<group>"; };
|
||||
4D938F961E77E59400C35653 /* CCPhysicsContactListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysicsContactListener.cpp; path = creator/CCPhysicsContactListener.cpp; sourceTree = "<group>"; };
|
||||
4D938F971E77E59400C35653 /* CCPhysicsRayCastCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPhysicsRayCastCallback.cpp; path = creator/CCPhysicsRayCastCallback.cpp; sourceTree = "<group>"; };
|
||||
4DC06BC11E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsAABBQueryCallback.cpp; sourceTree = "<group>"; };
|
||||
4DC06BC21E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsAABBQueryCallback.h; sourceTree = "<group>"; };
|
||||
4DC06BC31E8A68D400CA08B1 /* CCPhysicsContactListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsContactListener.cpp; sourceTree = "<group>"; };
|
||||
4DC06BC41E8A68D400CA08B1 /* CCPhysicsContactListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsContactListener.h; sourceTree = "<group>"; };
|
||||
4DC06BC71E8A68D400CA08B1 /* CCPhysicsDebugDraw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsDebugDraw.cpp; sourceTree = "<group>"; };
|
||||
4DC06BC81E8A68D400CA08B1 /* CCPhysicsDebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsDebugDraw.h; sourceTree = "<group>"; };
|
||||
4DC06BC91E8A68D400CA08B1 /* CCPhysicsRayCastCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsRayCastCallback.cpp; sourceTree = "<group>"; };
|
||||
4DC06BCA1E8A68D400CA08B1 /* CCPhysicsRayCastCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsRayCastCallback.h; sourceTree = "<group>"; };
|
||||
4DC06BCB1E8A68D400CA08B1 /* CCPhysicsUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsUtils.cpp; sourceTree = "<group>"; };
|
||||
4DC06BCC1E8A68D400CA08B1 /* CCPhysicsUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsUtils.h; sourceTree = "<group>"; };
|
||||
4DC06BCD1E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsWorldManifoldWrapper.cpp; sourceTree = "<group>"; };
|
||||
4DC06BCE1E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsWorldManifoldWrapper.h; sourceTree = "<group>"; };
|
||||
4DC06BEB1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsManifoldWrapper.cpp; sourceTree = "<group>"; };
|
||||
4DC06BEC1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsManifoldWrapper.h; sourceTree = "<group>"; };
|
||||
4DC06BF11E8B8D1300CA08B1 /* CCPhysicsDefine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCPhysicsDefine.h; sourceTree = "<group>"; };
|
||||
4DED476B1DFFA4AF0070C5C4 /* Box2D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Box2D.h; sourceTree = "<group>"; };
|
||||
4DED476C1DFFA4AF0070C5C4 /* Box2DConfig.cmake.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Box2DConfig.cmake.in; sourceTree = "<group>"; };
|
||||
4DED476D1DFFA4AF0070C5C4 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
|
||||
@@ -4029,6 +4048,31 @@
|
||||
path = ../cocos/math;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4DC06BC01E8A68D400CA08B1 /* physics */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4DC06BC11E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.cpp */,
|
||||
4DC06BC21E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.h */,
|
||||
4DC06BC31E8A68D400CA08B1 /* CCPhysicsContactListener.cpp */,
|
||||
4DC06BC41E8A68D400CA08B1 /* CCPhysicsContactListener.h */,
|
||||
4D2816641E8CBB7200F26B06 /* CCPhysicsContactImpulse.cpp */,
|
||||
4D2816651E8CBB7200F26B06 /* CCPhysicsContactImpulse.h */,
|
||||
4DC06BCD1E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.cpp */,
|
||||
4DC06BCE1E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.h */,
|
||||
4DC06BEB1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.cpp */,
|
||||
4DC06BEC1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.h */,
|
||||
4DC06BC71E8A68D400CA08B1 /* CCPhysicsDebugDraw.cpp */,
|
||||
4DC06BC81E8A68D400CA08B1 /* CCPhysicsDebugDraw.h */,
|
||||
4DC06BC91E8A68D400CA08B1 /* CCPhysicsRayCastCallback.cpp */,
|
||||
4DC06BCA1E8A68D400CA08B1 /* CCPhysicsRayCastCallback.h */,
|
||||
4DC06BCB1E8A68D400CA08B1 /* CCPhysicsUtils.cpp */,
|
||||
4DC06BCC1E8A68D400CA08B1 /* CCPhysicsUtils.h */,
|
||||
4DC06BF11E8B8D1300CA08B1 /* CCPhysicsDefine.h */,
|
||||
);
|
||||
name = physics;
|
||||
path = creator/physics;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4DED476A1DFFA4AF0070C5C4 /* Box2D */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -4192,22 +4236,13 @@
|
||||
4DFA4C141CBCE32800E3B736 /* creator */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4D2837171E0B7B6300501B7F /* CCPhysicsDebugDraw.cpp */,
|
||||
4D2837181E0B7B6300501B7F /* CCPhysicsDebugDraw.h */,
|
||||
4DC06BC01E8A68D400CA08B1 /* physics */,
|
||||
4D2E69031CC543B40032DD5C /* CCGraphicsNode.cpp */,
|
||||
4D2E69041CC543B40032DD5C /* CCGraphicsNode.h */,
|
||||
4D2E69051CC543B40032DD5C /* Triangulate.cpp */,
|
||||
4D2E69061CC543B40032DD5C /* Triangulate.h */,
|
||||
4DFA4C151CBCE34100E3B736 /* CCScale9Sprite.cpp */,
|
||||
4DFA4C161CBCE34100E3B736 /* CCScale9Sprite.h */,
|
||||
4D2837111E0B7AE800501B7F /* CCPhysicsUtils.cpp */,
|
||||
4D2837121E0B7AE800501B7F /* CCPhysicsUtils.h */,
|
||||
4D938F961E77E59400C35653 /* CCPhysicsContactListener.cpp */,
|
||||
4D11DCC41E48450D00DB6838 /* CCPhysicsContactListener.h */,
|
||||
4D938F951E77E59400C35653 /* CCPhysicsAABBQueryCallback.cpp */,
|
||||
4D11DCD11E487FA700DB6838 /* CCPhysicsAABBQueryCallback.h */,
|
||||
4D938F971E77E59400C35653 /* CCPhysicsRayCastCallback.cpp */,
|
||||
4D3818CE1E6D4EDB00DA344B /* CCPhysicsRayCastCallback.h */,
|
||||
4D6CF4351E83AAD5003327D4 /* CCCameraNode.cpp */,
|
||||
4D6CF4361E83AAD5003327D4 /* CCCameraNode.h */,
|
||||
);
|
||||
@@ -4828,7 +4863,6 @@
|
||||
4DED48101DFFA4AF0070C5C4 /* b2Settings.h in Headers */,
|
||||
BAFF7C941D59E0DA0051B92F /* CCArmatureDefine.h in Headers */,
|
||||
4DED486A1DFFA4AF0070C5C4 /* b2MotorJoint.h in Headers */,
|
||||
4D11DCD41E487FA700DB6838 /* CCPhysicsAABBQueryCallback.h in Headers */,
|
||||
50ABBE8D1925AB6F00A911A9 /* CCNS.h in Headers */,
|
||||
50ABBEA51925AB6F00A911A9 /* CCScriptSupport.h in Headers */,
|
||||
BAFF7CC61D59E0DB0051B92F /* CCDisplayFactory.h in Headers */,
|
||||
@@ -4882,6 +4916,7 @@
|
||||
15AE187B19AAD33D00C27E9E /* CCBAnimationManager.h in Headers */,
|
||||
C503066C1B60B583001E6D43 /* CCSkeletonNode.h in Headers */,
|
||||
1A57006B180BC5A10088DEC7 /* CCActionCatmullRom.h in Headers */,
|
||||
4DC06BEF1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.h in Headers */,
|
||||
4DED487A1DFFA4AF0070C5C4 /* b2RevoluteJoint.h in Headers */,
|
||||
4D76BE3C1A4AAF0A00102962 /* CCActionTimelineNode.h in Headers */,
|
||||
4DED487E1DFFA4AF0070C5C4 /* b2RopeJoint.h in Headers */,
|
||||
@@ -4906,6 +4941,7 @@
|
||||
15AE188719AAD33D00C27E9E /* CCBSequenceProperty.h in Headers */,
|
||||
4D2E690D1CC543B40032DD5C /* Triangulate.h in Headers */,
|
||||
1A570083180BC5A10088DEC7 /* CCActionManager.h in Headers */,
|
||||
4DC06BE51E8A68D400CA08B1 /* CCPhysicsUtils.h in Headers */,
|
||||
4DED483E1DFFA4AF0070C5C4 /* b2CircleContact.h in Headers */,
|
||||
4DFA4C191CBCE34100E3B736 /* CCScale9Sprite.h in Headers */,
|
||||
4DED48181DFFA4AF0070C5C4 /* b2Timer.h in Headers */,
|
||||
@@ -5037,11 +5073,13 @@
|
||||
1A570223180BCC1A0088DEC7 /* CCParticleBatchNode.h in Headers */,
|
||||
4D6CF4391E83AAD5003327D4 /* CCCameraNode.h in Headers */,
|
||||
FAC8F6681E1DF15D002B17E8 /* kvec.h in Headers */,
|
||||
4DC06BE11E8A68D400CA08B1 /* CCPhysicsRayCastCallback.h in Headers */,
|
||||
15AE1BD519AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.h in Headers */,
|
||||
15AE186919AAD31D00C27E9E /* CocosDenshion.h in Headers */,
|
||||
50ABBD891925AB4100A911A9 /* CCCustomCommand.h in Headers */,
|
||||
5034CA43191D591100CE6051 /* ccShader_Label.vert in Headers */,
|
||||
15AE189719AAD33D00C27E9E /* CCMenuItemImageLoader.h in Headers */,
|
||||
4DC06BDD1E8A68D400CA08B1 /* CCPhysicsDebugDraw.h in Headers */,
|
||||
15AE189319AAD33D00C27E9E /* CCLayerGradientLoader.h in Headers */,
|
||||
1A570227180BCC1A0088DEC7 /* CCParticleExamples.h in Headers */,
|
||||
FA6F1B851D80F858007DD223 /* BaseFactory.h in Headers */,
|
||||
@@ -5077,7 +5115,6 @@
|
||||
BAFF7D4C1D5C1CF80051B92F /* AnimationState.h in Headers */,
|
||||
BAFF7D541D5C1CF80051B92F /* Atlas.h in Headers */,
|
||||
1A570280180BCC900088DEC7 /* CCSprite.h in Headers */,
|
||||
4D28371B1E0B7B6300501B7F /* CCPhysicsDebugDraw.h in Headers */,
|
||||
15AE1B4E19AADA9900C27E9E /* UIListView.h in Headers */,
|
||||
1A570284180BCC900088DEC7 /* CCSpriteBatchNode.h in Headers */,
|
||||
5034CA2B191D591100CE6051 /* ccShader_PositionTextureA8Color.vert in Headers */,
|
||||
@@ -5123,6 +5160,7 @@
|
||||
BA68D7871D62F4A500B7A3F9 /* advancing_front.h in Headers */,
|
||||
1A12775B18DFCC540005F345 /* CCTweenFunction.h in Headers */,
|
||||
1A5702CA180BCE370088DEC7 /* CCTextFieldTTF.h in Headers */,
|
||||
4DC06BD51E8A68D400CA08B1 /* CCPhysicsContactListener.h in Headers */,
|
||||
BAFF7D741D5C1CF80051B92F /* Cocos2dAttachmentLoader.h in Headers */,
|
||||
15EFA213198A2BB5000C57D3 /* CCProtectedNode.h in Headers */,
|
||||
1A5702EC180BCE750088DEC7 /* CCTileMapAtlas.h in Headers */,
|
||||
@@ -5178,6 +5216,7 @@
|
||||
FA6F1B611D80F858007DD223 /* Slot.h in Headers */,
|
||||
BAFF7CEC1D59E0DB0051B92F /* CocoStudio.h in Headers */,
|
||||
50ABBE331925AB6F00A911A9 /* CCConfiguration.h in Headers */,
|
||||
4D2816681E8CBB7200F26B06 /* CCPhysicsContactImpulse.h in Headers */,
|
||||
15AE1BE319AAE01E00C27E9E /* CCScrollView.h in Headers */,
|
||||
50CB247519D9C5A100687767 /* AudioCache.h in Headers */,
|
||||
50ABC01F1926664800A911A9 /* CCThread.h in Headers */,
|
||||
@@ -5196,6 +5235,7 @@
|
||||
4DED483A1DFFA4AF0070C5C4 /* b2ChainAndPolygonContact.h in Headers */,
|
||||
4DED48561DFFA4AF0070C5C4 /* b2PolygonContact.h in Headers */,
|
||||
50ABBE6F1925AB6F00A911A9 /* CCEventListenerKeyboard.h in Headers */,
|
||||
4DC06BE91E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.h in Headers */,
|
||||
50ABBE9D1925AB6F00A911A9 /* CCRefPtr.h in Headers */,
|
||||
4DED484A1DFFA4AF0070C5C4 /* b2EdgeAndCircleContact.h in Headers */,
|
||||
FA6F1B631D80F858007DD223 /* TransformObject.h in Headers */,
|
||||
@@ -5242,6 +5282,7 @@
|
||||
50ABBEC91925AB6F00A911A9 /* firePngData.h in Headers */,
|
||||
FAC8F25D1D339EB70061CEDD /* CCTMXLayer.h in Headers */,
|
||||
BAFF7CF61D59E3840051B92F /* CocosStudioExtension.h in Headers */,
|
||||
4DC06BD11E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.h in Headers */,
|
||||
503DD8F51926B0DB00CD74DD /* CCIMEDelegate.h in Headers */,
|
||||
50ABBD5A1925AB0000A911A9 /* Vec2.h in Headers */,
|
||||
BAFF7CCE1D59E0DB0051B92F /* CCInputDelegate.h in Headers */,
|
||||
@@ -5252,7 +5293,6 @@
|
||||
15AE188F19AAD33D00C27E9E /* CCLabelTTFLoader.h in Headers */,
|
||||
50ABBEBD1925AB6F00A911A9 /* ccUtils.h in Headers */,
|
||||
4DED486E1DFFA4AF0070C5C4 /* b2MouseJoint.h in Headers */,
|
||||
4D11DCC71E48450D00DB6838 /* CCPhysicsContactListener.h in Headers */,
|
||||
A0534A651B872FFD006B03E5 /* CCDownloader-apple.h in Headers */,
|
||||
BA679B361CEC373000F875FA /* CCEventAssetsManagerEx.h in Headers */,
|
||||
50ABC0231926664800A911A9 /* CCGLViewImpl-desktop.h in Headers */,
|
||||
@@ -5280,7 +5320,6 @@
|
||||
50ABBE671925AB6F00A911A9 /* CCEventListenerCustom.h in Headers */,
|
||||
50ABBE2F1925AB6F00A911A9 /* ccConfig.h in Headers */,
|
||||
15AE188019AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */,
|
||||
4D3818D11E6D4EDB00DA344B /* CCPhysicsRayCastCallback.h in Headers */,
|
||||
1AAF5851180E40B9000584C8 /* LocalStorage.h in Headers */,
|
||||
A0E749F91BA8FD7F001A8332 /* UIEditBoxImpl-common.h in Headers */,
|
||||
FA6F1B9F1D80F858007DD223 /* FrameData.h in Headers */,
|
||||
@@ -5326,7 +5365,6 @@
|
||||
464AD6E7197EBB1400E502D8 /* pvr.h in Headers */,
|
||||
BAFF7D801D5C1CF80051B92F /* extension.h in Headers */,
|
||||
BAFF7C741D59E0DA0051B92F /* CCActionFrame.h in Headers */,
|
||||
4D2837151E0B7AE800501B7F /* CCPhysicsUtils.h in Headers */,
|
||||
4DED48281DFFA4AF0070C5C4 /* b2Island.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -5351,6 +5389,7 @@
|
||||
5034CA38191D591100CE6051 /* ccShader_PositionColorLengthTexture.vert in Headers */,
|
||||
15AE1B8119AADA9A00C27E9E /* UITextAtlas.h in Headers */,
|
||||
50ABBE7C1925AB6F00A911A9 /* CCEventMouse.h in Headers */,
|
||||
4DC06BD21E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.h in Headers */,
|
||||
50ABBE9C1925AB6F00A911A9 /* CCRef.h in Headers */,
|
||||
50ABBD961925AB4100A911A9 /* CCGLProgramState.h in Headers */,
|
||||
4649FF031BBA9FBE0001CC6F /* CCVertexAttribBinding.h in Headers */,
|
||||
@@ -5390,6 +5429,7 @@
|
||||
BAFF7D591D5C1CF80051B92F /* AtlasAttachmentLoader.h in Headers */,
|
||||
4DED486F1DFFA4AF0070C5C4 /* b2MouseJoint.h in Headers */,
|
||||
503DD8EC1926736A00CD74DD /* CCGLViewImpl-ios.h in Headers */,
|
||||
4DC06BEA1E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.h in Headers */,
|
||||
BAFF7D7D1D5C1CF80051B92F /* EventData.h in Headers */,
|
||||
FA6F1B9C1D80F858007DD223 /* DragonBonesData.h in Headers */,
|
||||
15AE18D819AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */,
|
||||
@@ -5527,7 +5567,6 @@
|
||||
50ABBDA61925AB4100A911A9 /* CCQuadCommand.h in Headers */,
|
||||
15AE1BB019AADFDF00C27E9E /* UILayoutManager.h in Headers */,
|
||||
50ABBE9E1925AB6F00A911A9 /* CCRefPtr.h in Headers */,
|
||||
4D2837161E0B7AE800501B7F /* CCPhysicsUtils.h in Headers */,
|
||||
15AE18DA19AAD33D00C27E9E /* CCSpriteLoader.h in Headers */,
|
||||
1A5701CA180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */,
|
||||
50643BDC19BFAF4400EF68ED /* CCStdC.h in Headers */,
|
||||
@@ -5558,6 +5597,7 @@
|
||||
1A5701FA180BCBAD0088DEC7 /* CCMenu.h in Headers */,
|
||||
FA6F1BA01D80F858007DD223 /* FrameData.h in Headers */,
|
||||
BAFF7CE91D59E0DB0051B92F /* CocosStudioExport.h in Headers */,
|
||||
4DC06BD61E8A68D400CA08B1 /* CCPhysicsContactListener.h in Headers */,
|
||||
BAFF7C7D1D59E0DA0051B92F /* CCActionManagerEx.h in Headers */,
|
||||
15AE18BA19AAD33D00C27E9E /* CCControlButtonLoader.h in Headers */,
|
||||
1A5701FE180BCBAD0088DEC7 /* CCMenuItem.h in Headers */,
|
||||
@@ -5578,6 +5618,8 @@
|
||||
BAFF7DB11D5C1CF80051B92F /* SkeletonBounds.h in Headers */,
|
||||
15AE1C0419AAE01E00C27E9E /* CCTableView.h in Headers */,
|
||||
50ABBEA21925AB6F00A911A9 /* CCScheduler.h in Headers */,
|
||||
4D2816691E8CBB7200F26B06 /* CCPhysicsContactImpulse.h in Headers */,
|
||||
4DC06BE21E8A68D400CA08B1 /* CCPhysicsRayCastCallback.h in Headers */,
|
||||
4DED48431DFFA4AF0070C5C4 /* b2Contact.h in Headers */,
|
||||
1A57020B180BCBDF0088DEC7 /* CCMotionStreak.h in Headers */,
|
||||
1A75DC171DFE3C7700A271DF /* AudioDecoder.h in Headers */,
|
||||
@@ -5598,6 +5640,7 @@
|
||||
29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */,
|
||||
2980F0261BA9A5550059E678 /* CCUISingleLineTextField.h in Headers */,
|
||||
15AE18B419AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */,
|
||||
4DC06BDE1E8A68D400CA08B1 /* CCPhysicsDebugDraw.h in Headers */,
|
||||
B24AA988195A675C007B4522 /* CCFastTMXLayer.h in Headers */,
|
||||
15AE1B7319AADA9A00C27E9E /* UIListView.h in Headers */,
|
||||
5034CA2C191D591100CE6051 /* ccShader_PositionTextureA8Color.vert in Headers */,
|
||||
@@ -5615,7 +5658,6 @@
|
||||
15EFA214198A2BB5000C57D3 /* CCProtectedNode.h in Headers */,
|
||||
4DED485B1DFFA4AF0070C5C4 /* b2DistanceJoint.h in Headers */,
|
||||
15AE1B8719AADA9A00C27E9E /* UIButton.h in Headers */,
|
||||
4D11DCD51E487FA700DB6838 /* CCPhysicsAABBQueryCallback.h in Headers */,
|
||||
50ABBE441925AB6F00A911A9 /* CCDirector.h in Headers */,
|
||||
BAFF7DC91D5C1CF80051B92F /* SlotData.h in Headers */,
|
||||
BAFF7DB91D5C1CF80051B92F /* SkeletonJson.h in Headers */,
|
||||
@@ -5700,6 +5742,7 @@
|
||||
15AE1BC419AADFFB00C27E9E /* ExtensionMacros.h in Headers */,
|
||||
15AE185A19AAD31200C27E9E /* CDConfig.h in Headers */,
|
||||
15AE1BFE19AAE01E00C27E9E /* CCInvocation.h in Headers */,
|
||||
4DC06BF01E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.h in Headers */,
|
||||
50ABBD4B1925AB0000A911A9 /* Mat4.h in Headers */,
|
||||
15AE1BBE19AADFF000C27E9E /* SocketIO.h in Headers */,
|
||||
50ABBED61925AB6F00A911A9 /* utlist.h in Headers */,
|
||||
@@ -5709,13 +5752,11 @@
|
||||
FA6F1BA81D80F858007DD223 /* DataParser.h in Headers */,
|
||||
50ABBD531925AB0000A911A9 /* Quaternion.h in Headers */,
|
||||
503DD8E81926736A00CD74DD /* CCES2Renderer-ios.h in Headers */,
|
||||
4D3818D21E6D4EDB00DA344B /* CCPhysicsRayCastCallback.h in Headers */,
|
||||
BAFF7CF11D59E0DB0051B92F /* DictionaryHelper.h in Headers */,
|
||||
50ABBE6C1925AB6F00A911A9 /* CCEventListenerFocus.h in Headers */,
|
||||
5034CA3E191D591100CE6051 /* ccShader_PositionColor.frag in Headers */,
|
||||
4DED484B1DFFA4AF0070C5C4 /* b2EdgeAndCircleContact.h in Headers */,
|
||||
50ABBE301925AB6F00A911A9 /* ccConfig.h in Headers */,
|
||||
4D28371C1E0B7B6300501B7F /* CCPhysicsDebugDraw.h in Headers */,
|
||||
50ABBDAC1925AB4100A911A9 /* CCRenderCommandPool.h in Headers */,
|
||||
5034CA3C191D591100CE6051 /* ccShader_PositionColor.vert in Headers */,
|
||||
50ABC0181926664800A911A9 /* CCImage.h in Headers */,
|
||||
@@ -5775,6 +5816,7 @@
|
||||
50ABBE821925AB6F00A911A9 /* CCEventType.h in Headers */,
|
||||
BAFF7D511D5C1CF80051B92F /* AnimationStateData.h in Headers */,
|
||||
1AAF5852180E40B9000584C8 /* LocalStorage.h in Headers */,
|
||||
4DC06BE61E8A68D400CA08B1 /* CCPhysicsUtils.h in Headers */,
|
||||
50CB247619D9C5A100687767 /* AudioCache.h in Headers */,
|
||||
50ABBD471925AB0000A911A9 /* CCVertex.h in Headers */,
|
||||
1A9DCA2A180E6955007A3AD4 /* CCGLBufferedNode.h in Headers */,
|
||||
@@ -5799,7 +5841,6 @@
|
||||
50ABC0201926664800A911A9 /* CCThread.h in Headers */,
|
||||
15AE1B8519AADA9A00C27E9E /* UITextField.h in Headers */,
|
||||
BAFF7DA51D5C1CF80051B92F /* Skeleton.h in Headers */,
|
||||
4D11DCC81E48450D00DB6838 /* CCPhysicsContactListener.h in Headers */,
|
||||
15AE184B19AAD30500C27E9E /* Export.h in Headers */,
|
||||
50ABBED21925AB6F00A911A9 /* TGAlib.h in Headers */,
|
||||
4DED47F11DFFA4AF0070C5C4 /* b2ChainShape.h in Headers */,
|
||||
@@ -5919,7 +5960,6 @@
|
||||
50ABBD581925AB0000A911A9 /* Vec2.cpp in Sources */,
|
||||
50ABBE311925AB6F00A911A9 /* CCConfiguration.cpp in Sources */,
|
||||
4D2E690B1CC543B40032DD5C /* Triangulate.cpp in Sources */,
|
||||
4D938F981E77E59400C35653 /* CCPhysicsAABBQueryCallback.cpp in Sources */,
|
||||
15AE1BDA19AAE01E00C27E9E /* CCControlSwitch.cpp in Sources */,
|
||||
4DED47F21DFFA4AF0070C5C4 /* b2CircleShape.cpp in Sources */,
|
||||
15AE18DC19AAD35000C27E9E /* CocoLoader.cpp in Sources */,
|
||||
@@ -5930,6 +5970,7 @@
|
||||
50ABC0611926664800A911A9 /* CCCommon-mac.mm in Sources */,
|
||||
50ABBDB11925AB4100A911A9 /* ccShaders.cpp in Sources */,
|
||||
4DED483C1DFFA4AF0070C5C4 /* b2CircleContact.cpp in Sources */,
|
||||
4DC06BED1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.cpp in Sources */,
|
||||
A63CF00D1CD9CF3500A6971D /* CCUITextFieldFormatter.m in Sources */,
|
||||
4DED47EA1DFFA4AF0070C5C4 /* b2TimeOfImpact.cpp in Sources */,
|
||||
FA6F1B511D80F858007DD223 /* WorldClock.cpp in Sources */,
|
||||
@@ -5960,6 +6001,7 @@
|
||||
50ABBE271925AB6F00A911A9 /* CCAutoreleasePool.cpp in Sources */,
|
||||
15AE197419AAD35700C27E9E /* CCTimeLine.cpp in Sources */,
|
||||
BAFF7D6E1D5C1CF80051B92F /* BoundingBoxAttachment.c in Sources */,
|
||||
4DC06BDB1E8A68D400CA08B1 /* CCPhysicsDebugDraw.cpp in Sources */,
|
||||
15AE188E19AAD33D00C27E9E /* CCLabelTTFLoader.cpp in Sources */,
|
||||
50ABBE8B1925AB6F00A911A9 /* CCNS.cpp in Sources */,
|
||||
FA6F1B551D80F858007DD223 /* Armature.cpp in Sources */,
|
||||
@@ -6026,13 +6068,13 @@
|
||||
50ABBE651925AB6F00A911A9 /* CCEventListenerCustom.cpp in Sources */,
|
||||
15AE189B19AAD33D00C27E9E /* CCNode+CCBRelativePositioning.cpp in Sources */,
|
||||
50ABBE391925AB6F00A911A9 /* CCData.cpp in Sources */,
|
||||
4DC06BE71E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.cpp in Sources */,
|
||||
1A57010E180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */,
|
||||
50ABBED71925AB6F00A911A9 /* ZipUtils.cpp in Sources */,
|
||||
BAFF7DC21D5C1CF80051B92F /* Slot.c in Sources */,
|
||||
1A570112180BC8EE0088DEC7 /* CCDrawNode.cpp in Sources */,
|
||||
4DED482C1DFFA4AF0070C5C4 /* b2World.cpp in Sources */,
|
||||
15AE186D19AAD31D00C27E9E /* SimpleAudioEngine_objc.m in Sources */,
|
||||
4D2837191E0B7B6300501B7F /* CCPhysicsDebugDraw.cpp in Sources */,
|
||||
1A57011B180BC90D0088DEC7 /* CCGrabber.cpp in Sources */,
|
||||
1A57011F180BC90D0088DEC7 /* CCGrid.cpp in Sources */,
|
||||
BAFF7D861D5C1CF80051B92F /* IkConstraintData.c in Sources */,
|
||||
@@ -6057,6 +6099,7 @@
|
||||
BAFF7D6A1D5C1CF80051B92F /* BoneData.c in Sources */,
|
||||
4DED48881DFFA4AF0070C5C4 /* b2Rope.cpp in Sources */,
|
||||
1A5701B5180BCB590088DEC7 /* CCFontFreeType.cpp in Sources */,
|
||||
4DC06BDF1E8A68D400CA08B1 /* CCPhysicsRayCastCallback.cpp in Sources */,
|
||||
1A5701B9180BCB5A0088DEC7 /* CCLabel.cpp in Sources */,
|
||||
1A5701BD180BCB5A0088DEC7 /* CCLabelAtlas.cpp in Sources */,
|
||||
BA68D7B21D62F66300B7A3F9 /* CCPass.cpp in Sources */,
|
||||
@@ -6099,6 +6142,7 @@
|
||||
15AE186B19AAD31D00C27E9E /* SimpleAudioEngine.mm in Sources */,
|
||||
50ABBDAD1925AB4100A911A9 /* CCRenderer.cpp in Sources */,
|
||||
BAFF7DB21D5C1CF80051B92F /* SkeletonData.c in Sources */,
|
||||
4DC06BD31E8A68D400CA08B1 /* CCPhysicsContactListener.cpp in Sources */,
|
||||
BA68D7BC1D62F71700B7A3F9 /* CCFrameBuffer.cpp in Sources */,
|
||||
1A5701EE180BCB8C0088DEC7 /* CCTransitionProgress.cpp in Sources */,
|
||||
15AE186619AAD31D00C27E9E /* CDOpenALSupport.m in Sources */,
|
||||
@@ -6125,6 +6169,7 @@
|
||||
15AE1B6119AADA9900C27E9E /* UIButton.cpp in Sources */,
|
||||
B276EF651988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */,
|
||||
50ABBE411925AB6F00A911A9 /* CCDirector.cpp in Sources */,
|
||||
4DC06BE31E8A68D400CA08B1 /* CCPhysicsUtils.cpp in Sources */,
|
||||
1A570221180BCC1A0088DEC7 /* CCParticleBatchNode.cpp in Sources */,
|
||||
1A570225180BCC1A0088DEC7 /* CCParticleExamples.cpp in Sources */,
|
||||
1A570229180BCC1A0088DEC7 /* CCParticleSystem.cpp in Sources */,
|
||||
@@ -6177,6 +6222,7 @@
|
||||
BAFF7CC01D59E0DB0051B92F /* CCDecorativeDisplay.cpp in Sources */,
|
||||
15AE1BA319AADFDF00C27E9E /* UILayoutManager.cpp in Sources */,
|
||||
4DED47DC1DFFA4AF0070C5C4 /* b2CollidePolygon.cpp in Sources */,
|
||||
4D2816661E8CBB7200F26B06 /* CCPhysicsContactImpulse.cpp in Sources */,
|
||||
BAFF7DCA1D5C1CF80051B92F /* spine-cocos2dx.cpp in Sources */,
|
||||
4DED48041DFFA4AF0070C5C4 /* b2Draw.cpp in Sources */,
|
||||
B230ED7119B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */,
|
||||
@@ -6199,7 +6245,6 @@
|
||||
15FB20741AE7BF8600C31518 /* CCAutoPolygon.cpp in Sources */,
|
||||
15AE196C19AAD35700C27E9E /* CCActionTimeline.cpp in Sources */,
|
||||
BAFF7CAC1D59E0DA0051B92F /* CCComController.cpp in Sources */,
|
||||
4D938F9A1E77E59400C35653 /* CCPhysicsRayCastCallback.cpp in Sources */,
|
||||
1A570310180BCF190088DEC7 /* CCComponentContainer.cpp in Sources */,
|
||||
50ABBD3C1925AB0000A911A9 /* CCGeometry.cpp in Sources */,
|
||||
15AE188A19AAD33D00C27E9E /* CCControlLoader.cpp in Sources */,
|
||||
@@ -6266,6 +6311,7 @@
|
||||
3E2F27A619CFBFE100E7C490 /* AudioEngine.cpp in Sources */,
|
||||
BA68D7A41D62F60100B7A3F9 /* UITabControl.cpp in Sources */,
|
||||
BAFF7DBE1D5C1CF80051B92F /* Skin.c in Sources */,
|
||||
4DC06BCF1E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.cpp in Sources */,
|
||||
50ABBD9B1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */,
|
||||
15AE188119AAD33D00C27E9E /* CCBReader.cpp in Sources */,
|
||||
50ABBDB91925AB4100A911A9 /* CCTextureAtlas.cpp in Sources */,
|
||||
@@ -6316,7 +6362,6 @@
|
||||
A6F0D7A11C2796020029CC44 /* CCStencilStateManager.cpp in Sources */,
|
||||
15AE1BB519AADFEF00C27E9E /* SocketIO.cpp in Sources */,
|
||||
15AE1B6519AADA9900C27E9E /* UIImageView.cpp in Sources */,
|
||||
4D2837131E0B7AE800501B7F /* CCPhysicsUtils.cpp in Sources */,
|
||||
4DED48341DFFA4AF0070C5C4 /* b2ChainAndCircleContact.cpp in Sources */,
|
||||
50ABBE5D1925AB6F00A911A9 /* CCEventListener.cpp in Sources */,
|
||||
4DED47E21DFFA4AF0070C5C4 /* b2Distance.cpp in Sources */,
|
||||
@@ -6330,7 +6375,6 @@
|
||||
50ABC05F1926664800A911A9 /* CCApplication-mac.mm in Sources */,
|
||||
15AE189619AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */,
|
||||
15AE1BB719AADFEF00C27E9E /* WebSocket.cpp in Sources */,
|
||||
4D938F991E77E59400C35653 /* CCPhysicsContactListener.cpp in Sources */,
|
||||
15AE1B5119AADA9900C27E9E /* UIPageView.cpp in Sources */,
|
||||
ED3057A11BEC77D50083C3ED /* xxhash.c in Sources */,
|
||||
50ABBD381925AB0000A911A9 /* CCAffineTransform.cpp in Sources */,
|
||||
@@ -6395,7 +6439,6 @@
|
||||
ED30578B1BEC774D0083C3ED /* ioapi_mem.cpp in Sources */,
|
||||
BAFF7CE11D59E0DB0051B92F /* CCTween.cpp in Sources */,
|
||||
FA6F1B421D80F858007DD223 /* Animation.cpp in Sources */,
|
||||
4D938F9D1E77E5A700C35653 /* CCPhysicsRayCastCallback.cpp in Sources */,
|
||||
BA68D7AF1D62F66300B7A3F9 /* CCMaterial.cpp in Sources */,
|
||||
B257B44F1989D5E800D9A687 /* CCPrimitive.cpp in Sources */,
|
||||
BAFF7CC91D59E0DB0051B92F /* CCDisplayManager.cpp in Sources */,
|
||||
@@ -6411,6 +6454,7 @@
|
||||
1A570062180BC5A10088DEC7 /* CCAction.cpp in Sources */,
|
||||
1A570066180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */,
|
||||
4DED47E31DFFA4AF0070C5C4 /* b2Distance.cpp in Sources */,
|
||||
4DC06BE81E8A68D400CA08B1 /* CCPhysicsWorldManifoldWrapper.cpp in Sources */,
|
||||
B276EF661988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */,
|
||||
15AE1C0119AAE01E00C27E9E /* CCScrollView.cpp in Sources */,
|
||||
ED30579E1BEC77BD0083C3ED /* ConvertUTFWrapper.cpp in Sources */,
|
||||
@@ -6431,7 +6475,6 @@
|
||||
ED30578C1BEC77510083C3ED /* ioapi.cpp in Sources */,
|
||||
4DED48411DFFA4AF0070C5C4 /* b2Contact.cpp in Sources */,
|
||||
FA6F1B841D80F858007DD223 /* BaseFactory.cpp in Sources */,
|
||||
4D2837141E0B7AE800501B7F /* CCPhysicsUtils.cpp in Sources */,
|
||||
DABC9FAA19E7DFA900FA252C /* CCClippingRectangleNode.cpp in Sources */,
|
||||
15AE1BF119AAE01E00C27E9E /* CCControlPotentiometer.cpp in Sources */,
|
||||
4DED48791DFFA4AF0070C5C4 /* b2RevoluteJoint.cpp in Sources */,
|
||||
@@ -6458,6 +6501,7 @@
|
||||
50ABBEA01925AB6F00A911A9 /* CCScheduler.cpp in Sources */,
|
||||
50ABBE4E1925AB6F00A911A9 /* CCEventCustom.cpp in Sources */,
|
||||
15AE1BF519AAE01E00C27E9E /* CCControlSlider.cpp in Sources */,
|
||||
4DC06BEE1E8B604B00CA08B1 /* CCPhysicsManifoldWrapper.cpp in Sources */,
|
||||
15AE18B719AAD33D00C27E9E /* CCBSequenceProperty.cpp in Sources */,
|
||||
15AE18B919AAD33D00C27E9E /* CCControlButtonLoader.cpp in Sources */,
|
||||
50ABBE761925AB6F00A911A9 /* CCEventListenerTouch.cpp in Sources */,
|
||||
@@ -6471,6 +6515,7 @@
|
||||
4DED480B1DFFA4AF0070C5C4 /* b2Math.cpp in Sources */,
|
||||
1A57007A180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */,
|
||||
15AE1BEC19AAE01E00C27E9E /* CCControlColourPicker.cpp in Sources */,
|
||||
4DC06BD41E8A68D400CA08B1 /* CCPhysicsContactListener.cpp in Sources */,
|
||||
FA6F1B4E1D80F858007DD223 /* TimelineState.cpp in Sources */,
|
||||
50ABBEC01925AB6F00A911A9 /* CCValue.cpp in Sources */,
|
||||
50ABBD591925AB0000A911A9 /* Vec2.cpp in Sources */,
|
||||
@@ -6486,6 +6531,7 @@
|
||||
BA679B311CEC373000F875FA /* AssetsManagerEx.cpp in Sources */,
|
||||
1A57007E180BC5A10088DEC7 /* CCActionInterval.cpp in Sources */,
|
||||
15AE1BF319AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */,
|
||||
4DC06BD01E8A68D400CA08B1 /* CCPhysicsAABBQueryCallback.cpp in Sources */,
|
||||
1A570082180BC5A10088DEC7 /* CCActionManager.cpp in Sources */,
|
||||
4D6CF4381E83AAD5003327D4 /* CCCameraNode.cpp in Sources */,
|
||||
A0534A681B872FFD006B03E5 /* CCDownloader-apple.mm in Sources */,
|
||||
@@ -6519,7 +6565,6 @@
|
||||
292DB14A19B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */,
|
||||
1A5701A2180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */,
|
||||
50ABC00E1926664800A911A9 /* CCFileUtils.cpp in Sources */,
|
||||
4D938F9C1E77E5A400C35653 /* CCPhysicsContactListener.cpp in Sources */,
|
||||
BAFF7CAD1D59E0DA0051B92F /* CCComController.cpp in Sources */,
|
||||
BAFF7C8B1D59E0DA0051B92F /* CCArmatureAnimation.cpp in Sources */,
|
||||
299CF1FC19A434BC00C378C1 /* ccRandom.cpp in Sources */,
|
||||
@@ -6541,11 +6586,11 @@
|
||||
BAFF7D971D5C1CF80051B92F /* PathConstraint.c in Sources */,
|
||||
15AE18AD19AAD33D00C27E9E /* CCBFileLoader.cpp in Sources */,
|
||||
B5CE6DC91B3C05BA002B0419 /* UIRadioButton.cpp in Sources */,
|
||||
4D938F9B1E77E5A100C35653 /* CCPhysicsAABBQueryCallback.cpp in Sources */,
|
||||
BAFF7D771D5C1CF80051B92F /* Event.c in Sources */,
|
||||
15AE18AB19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */,
|
||||
15AE1B7219AADA9A00C27E9E /* UIListView.cpp in Sources */,
|
||||
4D2E69081CC543B40032DD5C /* CCGraphicsNode.cpp in Sources */,
|
||||
4DC06BE01E8A68D400CA08B1 /* CCPhysicsRayCastCallback.cpp in Sources */,
|
||||
1A5701BE180BCB5A0088DEC7 /* CCLabelAtlas.cpp in Sources */,
|
||||
4DED47F31DFFA4AF0070C5C4 /* b2CircleShape.cpp in Sources */,
|
||||
15FB20751AE7BF8600C31518 /* CCAutoPolygon.cpp in Sources */,
|
||||
@@ -6571,6 +6616,7 @@
|
||||
29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */,
|
||||
15AE18BD19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */,
|
||||
50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */,
|
||||
4D2816671E8CBB7200F26B06 /* CCPhysicsContactImpulse.cpp in Sources */,
|
||||
2980F0271BA9A5550059E678 /* CCUISingleLineTextField.mm in Sources */,
|
||||
BAFF7CD91D59E0DB0051B92F /* CCSpriteFrameCacheHelper.cpp in Sources */,
|
||||
1A5701EB180BCB8C0088DEC7 /* CCTransitionPageTurn.cpp in Sources */,
|
||||
@@ -6622,9 +6668,11 @@
|
||||
1A57022E180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */,
|
||||
50ABBD901925AB4100A911A9 /* CCGLProgramCache.cpp in Sources */,
|
||||
BAFF7C9F1D59E0DA0051B92F /* CCColliderDetector.cpp in Sources */,
|
||||
4DC06BE41E8A68D400CA08B1 /* CCPhysicsUtils.cpp in Sources */,
|
||||
4DED481B1DFFA4AF0070C5C4 /* b2Body.cpp in Sources */,
|
||||
BAFF7D631D5C1CF80051B92F /* AttachmentVertices.cpp in Sources */,
|
||||
ED3057931BEC77790083C3ED /* edtaa3func.cpp in Sources */,
|
||||
4DC06BDC1E8A68D400CA08B1 /* CCPhysicsDebugDraw.cpp in Sources */,
|
||||
15AE197F19AAD35700C27E9E /* CCTimeLine.cpp in Sources */,
|
||||
BAFF7D9F1D5C1CF80051B92F /* RegionAttachment.c in Sources */,
|
||||
1A57027F180BCC900088DEC7 /* CCSprite.cpp in Sources */,
|
||||
@@ -6635,7 +6683,6 @@
|
||||
BAFF7CF51D59E3840051B92F /* CocosStudioExtension.cpp in Sources */,
|
||||
FA6F1B741D80F858007DD223 /* CCTextureData.cpp in Sources */,
|
||||
BAFF7CC11D59E0DB0051B92F /* CCDecorativeDisplay.cpp in Sources */,
|
||||
4D28371A1E0B7B6300501B7F /* CCPhysicsDebugDraw.cpp in Sources */,
|
||||
2980F02A1BA9A5550059E678 /* UITextField+CCUITextInput.mm in Sources */,
|
||||
4DED48551DFFA4AF0070C5C4 /* b2PolygonContact.cpp in Sources */,
|
||||
15AE185919AAD31200C27E9E /* CDAudioManager.m in Sources */,
|
||||
|
||||
@@ -303,12 +303,15 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32\libs\*.*" "$(OutDir)"
|
||||
<ClCompile Include="..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\CCCameraNode.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\CCGraphicsNode.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\CCPhysicsAABBQueryCallback.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\CCPhysicsContactListener.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\CCPhysicsDebugDraw.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\CCPhysicsRayCastCallback.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\CCPhysicsUtils.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\CCScale9Sprite.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsAABBQueryCallback.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsContactImpulse.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsContactListener.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsDebugDraw.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsManifoldWrapper.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsRayCastCallback.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsUtils.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsWorldManifoldWrapper.cpp" />
|
||||
<ClCompile Include="..\editor-support\creator\Triangulate.cpp" />
|
||||
<ClCompile Include="..\math\CCAffineTransform.cpp" />
|
||||
<ClCompile Include="..\math\CCGeometry.cpp" />
|
||||
@@ -653,12 +656,16 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32\libs\*.*" "$(OutDir)"
|
||||
<ClInclude Include="..\editor-support\cocostudio\WidgetCallBackHandlerProtocol.h" />
|
||||
<ClInclude Include="..\editor-support\creator\CCCameraNode.h" />
|
||||
<ClInclude Include="..\editor-support\creator\CCGraphicsNode.h" />
|
||||
<ClInclude Include="..\editor-support\creator\CCPhysicsAABBQueryCallback.h" />
|
||||
<ClInclude Include="..\editor-support\creator\CCPhysicsContactListener.h" />
|
||||
<ClInclude Include="..\editor-support\creator\CCPhysicsDebugDraw.h" />
|
||||
<ClInclude Include="..\editor-support\creator\CCPhysicsRayCastCallback.h" />
|
||||
<ClInclude Include="..\editor-support\creator\CCPhysicsUtils.h" />
|
||||
<ClInclude Include="..\editor-support\creator\CCScale9Sprite.h" />
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsAABBQueryCallback.h" />
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsContactImpulse.h" />
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsContactListener.h" />
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsDebugDraw.h" />
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsDefine.h" />
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsManifoldWrapper.h" />
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsRayCastCallback.h" />
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsUtils.h" />
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsWorldManifoldWrapper.h" />
|
||||
<ClInclude Include="..\editor-support\creator\Triangulate.h" />
|
||||
<ClInclude Include="..\math\CCAffineTransform.h" />
|
||||
<ClInclude Include="..\math\CCGeometry.h" />
|
||||
|
||||
@@ -172,6 +172,9 @@
|
||||
<Filter Include="extension\AssetManager">
|
||||
<UniqueIdentifier>{c1b7ac70-432f-4d5b-bd3b-5ff5fce3436b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="creator\physics">
|
||||
<UniqueIdentifier>{7ea5175c-acae-4b2f-ae6e-50daf6131b12}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\external\sources\xxhash\xxhash.c">
|
||||
@@ -1091,21 +1094,6 @@
|
||||
<ClCompile Include="..\editor-support\creator\Triangulate.cpp">
|
||||
<Filter>creator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\CCPhysicsDebugDraw.cpp">
|
||||
<Filter>creator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\CCPhysicsUtils.cpp">
|
||||
<Filter>creator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\CCPhysicsAABBQueryCallback.cpp">
|
||||
<Filter>creator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\CCPhysicsContactListener.cpp">
|
||||
<Filter>creator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\CCPhysicsRayCastCallback.cpp">
|
||||
<Filter>creator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\extensions\assets-manager\AssetsManagerEx.cpp" />
|
||||
<ClCompile Include="..\..\extensions\assets-manager\CCEventAssetsManagerEx.cpp" />
|
||||
<ClCompile Include="..\..\extensions\assets-manager\CCEventListenerAssetsManagerEx.cpp" />
|
||||
@@ -1113,6 +1101,30 @@
|
||||
<ClCompile Include="..\editor-support\creator\CCCameraNode.cpp">
|
||||
<Filter>creator</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsAABBQueryCallback.cpp">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsContactImpulse.cpp">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsContactListener.cpp">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsDebugDraw.cpp">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsManifoldWrapper.cpp">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsRayCastCallback.cpp">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsUtils.cpp">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\creator\physics\CCPhysicsWorldManifoldWrapper.cpp">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\cocos2d.h" />
|
||||
@@ -2107,21 +2119,6 @@
|
||||
<ClInclude Include="..\editor-support\creator\Triangulate.h">
|
||||
<Filter>creator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\CCPhysicsAABBQueryCallback.h">
|
||||
<Filter>creator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\CCPhysicsContactListener.h">
|
||||
<Filter>creator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\CCPhysicsDebugDraw.h">
|
||||
<Filter>creator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\CCPhysicsRayCastCallback.h">
|
||||
<Filter>creator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\CCPhysicsUtils.h">
|
||||
<Filter>creator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\extensions\assets-manager\AssetsManagerEx.h" />
|
||||
<ClInclude Include="..\..\extensions\assets-manager\CCEventAssetsManagerEx.h" />
|
||||
<ClInclude Include="..\..\extensions\assets-manager\CCEventListenerAssetsManagerEx.h" />
|
||||
@@ -2148,6 +2145,33 @@
|
||||
<ClInclude Include="..\editor-support\creator\CCCameraNode.h">
|
||||
<Filter>creator</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsAABBQueryCallback.h">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsContactImpulse.h">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsContactListener.h">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsDebugDraw.h">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsDefine.h">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsManifoldWrapper.h">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsRayCastCallback.h">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsUtils.h">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\creator\physics\CCPhysicsWorldManifoldWrapper.h">
|
||||
<Filter>creator\physics</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\math\Mat4.inl">
|
||||
|
||||
@@ -8,11 +8,14 @@ LOCAL_MODULE_FILENAME := libcreator
|
||||
LOCAL_SRC_FILES := CCScale9Sprite.cpp \
|
||||
CCGraphicsNode.cpp \
|
||||
Triangulate.cpp \
|
||||
CCPhysicsDebugDraw.cpp \
|
||||
CCPhysicsUtils.cpp \
|
||||
CCPhysicsAABBQueryCallback.cpp \
|
||||
CCPhysicsContactListener.cpp \
|
||||
CCPhysicsRayCastCallback.cpp \
|
||||
physics/CCPhysicsDebugDraw.cpp \
|
||||
physics/CCPhysicsUtils.cpp \
|
||||
physics/CCPhysicsAABBQueryCallback.cpp \
|
||||
physics/CCPhysicsContactListener.cpp \
|
||||
physics/CCPhysicsRayCastCallback.cpp \
|
||||
physics/CCPhysicsManifoldWrapper.cpp \
|
||||
physics/CCPhysicsWorldManifoldWrapper.cpp \
|
||||
physics/CCPhysicsContactImpulse.cpp \
|
||||
CCCameraNode.cpp
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/..
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CREATOR_CCCAMERANODE_H__
|
||||
#define __CREATOR_CCCAMERANODE_H__
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* 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 CCPhysicsAABBQueryCallback_h
|
||||
#define CCPhysicsAABBQueryCallback_h
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "cocos2d.h"
|
||||
|
||||
namespace creator {
|
||||
|
||||
class CC_DLL PhysicsAABBQueryCallback : public b2QueryCallback
|
||||
{
|
||||
public:
|
||||
PhysicsAABBQueryCallback();
|
||||
PhysicsAABBQueryCallback(const b2Vec2& p);
|
||||
|
||||
~PhysicsAABBQueryCallback();
|
||||
|
||||
virtual bool ReportFixture(b2Fixture* fixture);
|
||||
|
||||
b2Fixture* getFixture();
|
||||
std::vector<b2Fixture*> getFixtures();
|
||||
|
||||
protected:
|
||||
b2Vec2 _point;
|
||||
std::vector<b2Fixture*> _fixtures;
|
||||
bool _isPoint;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* CCPhysicsAABBQueryCallback_h */
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* 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 PhysicsContactListener_H
|
||||
#define PhysicsContactListener_H
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "cocos2d.h"
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
namespace creator {
|
||||
|
||||
class CC_DLL PhysicsContactListener : public b2ContactListener
|
||||
{
|
||||
public:
|
||||
PhysicsContactListener();
|
||||
virtual ~PhysicsContactListener();
|
||||
|
||||
void setBeginContact(std::function<void(b2Contact* contact)> callback);
|
||||
void setEndContact(std::function<void(b2Contact* contact)> callback);
|
||||
void setPreSolve(std::function<void(b2Contact* contact, const b2Manifold* oldManifold)> callback);
|
||||
void setPostSolve(std::function<void(b2Contact* contact, const b2ContactImpulse* impulse)> callback);
|
||||
|
||||
|
||||
virtual void BeginContact(b2Contact* contact);
|
||||
virtual void EndContact(b2Contact* contact);
|
||||
virtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold);
|
||||
virtual void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse);
|
||||
|
||||
void registerContactFixture(b2Fixture* fixture);
|
||||
void unregisterContactFixture(b2Fixture* fixture);
|
||||
|
||||
protected:
|
||||
std::function<void(b2Contact* contact)> _beginContact;
|
||||
std::function<void(b2Contact* contact)> _endContact;
|
||||
std::function<void(b2Contact* contact, const b2Manifold* oldManifold)> _preSolve;
|
||||
std::function<void(b2Contact* contact, const b2ContactImpulse* impulse)> _postSolve;
|
||||
|
||||
std::vector<b2Fixture*> _contactFixtures;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* 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 PhysicsDebugDraw_H
|
||||
#define PhysicsDebugDraw_H
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "editor-support/creator/CCGraphicsNode.h"
|
||||
|
||||
namespace creator {
|
||||
|
||||
// This class implements debug drawing callbacks that are invoked
|
||||
// inside b2World::Step.
|
||||
class CC_DLL PhysicsDebugDraw : public b2Draw
|
||||
{
|
||||
public:
|
||||
PhysicsDebugDraw(float ratio = 32.0f);
|
||||
~PhysicsDebugDraw();
|
||||
|
||||
creator::GraphicsNode* getDrawer();
|
||||
|
||||
void ClearDraw();
|
||||
|
||||
void AddDrawerToNode(cocos2d::Node* node);
|
||||
|
||||
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);
|
||||
|
||||
protected:
|
||||
float mRatio;
|
||||
creator::GraphicsNode* _drawer;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* 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 CCPhysicsRayCastCallback_h
|
||||
#define CCPhysicsRayCastCallback_h
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "cocos2d.h"
|
||||
|
||||
namespace creator {
|
||||
|
||||
class CC_DLL PhysicsRayCastCallback : public b2RayCastCallback
|
||||
{
|
||||
public:
|
||||
PhysicsRayCastCallback(int type);
|
||||
~PhysicsRayCastCallback();
|
||||
|
||||
virtual float32 ReportFixture(b2Fixture* fixture, const b2Vec2& point, const b2Vec2& normal, float32 fraction);
|
||||
|
||||
std::vector<b2Fixture*>& getFixtures();
|
||||
std::vector<b2Vec2>& getPoints();
|
||||
std::vector<b2Vec2>& getNormals();
|
||||
std::vector<float>& getFractions();
|
||||
|
||||
int getType();
|
||||
|
||||
protected:
|
||||
int _rayCastType;
|
||||
|
||||
std::vector<b2Fixture*> _fixtures;
|
||||
std::vector<b2Vec2> _points;
|
||||
std::vector<b2Vec2> _normals;
|
||||
std::vector<float> _fractions;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* CCPhysicsRayCastCallback_h */
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* 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 PhysicsUtils_H
|
||||
#define PhysicsUtils_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "cocos2d.h"
|
||||
|
||||
namespace creator {
|
||||
|
||||
// This class implements debug drawing callbacks that are invoked
|
||||
// inside b2World::Step.
|
||||
class CC_DLL PhysicsUtils
|
||||
{
|
||||
public:
|
||||
PhysicsUtils();
|
||||
~PhysicsUtils();
|
||||
|
||||
void addB2Body(b2Body* body);
|
||||
void removeB2Body(b2Body* body);
|
||||
|
||||
void syncNode();
|
||||
|
||||
public:
|
||||
static const b2WorldManifold* getContactWorldManifold(b2Contact* contact);
|
||||
|
||||
protected:
|
||||
cocos2d::Vec2 _convertToNodePosition(cocos2d::Node* node, cocos2d::Vec2& position);
|
||||
float _convertToNodeRotation(cocos2d::Node* node, float rotation);
|
||||
|
||||
std::vector<b2Body*> _bodies;
|
||||
float PTM_RATIO;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CCPhysicsAABBQueryCallback_h
|
||||
#define CCPhysicsAABBQueryCallback_h
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "cocos2d.h"
|
||||
|
||||
namespace creator {
|
||||
|
||||
class CC_DLL PhysicsAABBQueryCallback : public b2QueryCallback
|
||||
{
|
||||
public:
|
||||
PhysicsAABBQueryCallback();
|
||||
PhysicsAABBQueryCallback(const b2Vec2& p);
|
||||
|
||||
~PhysicsAABBQueryCallback();
|
||||
|
||||
virtual bool ReportFixture(b2Fixture* fixture);
|
||||
|
||||
b2Fixture* getFixture();
|
||||
std::vector<b2Fixture*> getFixtures();
|
||||
|
||||
protected:
|
||||
b2Vec2 _point;
|
||||
std::vector<b2Fixture*> _fixtures;
|
||||
bool _isPoint;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* CCPhysicsAABBQueryCallback_h */
|
||||
@@ -0,0 +1,55 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCPhysicsContactImpulse.h"
|
||||
#include "CCPhysicsDefine.h"
|
||||
|
||||
namespace creator {
|
||||
PhysicsContactImpulse::PhysicsContactImpulse()
|
||||
{
|
||||
}
|
||||
PhysicsContactImpulse::~PhysicsContactImpulse()
|
||||
{
|
||||
}
|
||||
|
||||
void PhysicsContactImpulse::init(const b2ContactImpulse* impulse)
|
||||
{
|
||||
_impulse = *impulse;
|
||||
}
|
||||
|
||||
int PhysicsContactImpulse::getCount()
|
||||
{
|
||||
return _impulse.count;
|
||||
}
|
||||
|
||||
float32 PhysicsContactImpulse::getNormalImpulse(int index)
|
||||
{
|
||||
return _impulse.normalImpulses[index] * CC_PTM_RATIO;
|
||||
}
|
||||
float32 PhysicsContactImpulse::getTangentImpulse(int index)
|
||||
{
|
||||
return _impulse.tangentImpulses[index];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CCPhysicsContactImpulse_h
|
||||
#define CCPhysicsContactImpulse_h
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "cocos2d.h"
|
||||
|
||||
namespace creator {
|
||||
class CC_DLL PhysicsContactImpulse : public cocos2d::Ref
|
||||
{
|
||||
public:
|
||||
PhysicsContactImpulse();
|
||||
~PhysicsContactImpulse();
|
||||
|
||||
void init(const b2ContactImpulse* impulse);
|
||||
|
||||
int getCount();
|
||||
float32 getNormalImpulse(int index);
|
||||
float32 getTangentImpulse(int index);
|
||||
|
||||
protected:
|
||||
b2ContactImpulse _impulse;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif /* CCPhysicsContactImpulse_h */
|
||||
+11
-19
@@ -22,12 +22,12 @@ void PhysicsContactListener::setEndContact(std::function<void(b2Contact* contact
|
||||
_endContact = callback;
|
||||
}
|
||||
|
||||
void PhysicsContactListener::setPreSolve(std::function<void(b2Contact* contact, const b2Manifold* oldManifold)> callback)
|
||||
void PhysicsContactListener::setPreSolve(std::function<void(b2Contact* contact)> callback)
|
||||
{
|
||||
_preSolve = callback;
|
||||
}
|
||||
|
||||
void PhysicsContactListener::setPostSolve(std::function<void(b2Contact* contact, const b2ContactImpulse* impulse)> callback)
|
||||
void PhysicsContactListener::setPostSolve(std::function<void(b2Contact* contact, const PhysicsContactImpulse* impulse)> callback)
|
||||
{
|
||||
_postSolve = callback;
|
||||
}
|
||||
@@ -43,6 +43,7 @@ void PhysicsContactListener::BeginContact(b2Contact* contact)
|
||||
if (find(_contactFixtures.begin(), _contactFixtures.end(), fixtureA) != _contactFixtures.end() ||
|
||||
find(_contactFixtures.begin(), _contactFixtures.end(), fixtureB) != _contactFixtures.end())
|
||||
{
|
||||
_contactMap[contact] = true;
|
||||
_beginContact(contact);
|
||||
}
|
||||
|
||||
@@ -52,13 +53,11 @@ void PhysicsContactListener::EndContact(b2Contact* contact)
|
||||
{
|
||||
if (!_endContact) return;
|
||||
|
||||
b2Fixture* fixtureA = contact->GetFixtureA();
|
||||
b2Fixture* fixtureB = contact->GetFixtureB();
|
||||
|
||||
if (find(_contactFixtures.begin(), _contactFixtures.end(), fixtureA) != _contactFixtures.end() ||
|
||||
find(_contactFixtures.begin(), _contactFixtures.end(), fixtureB) != _contactFixtures.end())
|
||||
auto i = _contactMap.find(contact);
|
||||
if (i != _contactMap.end())
|
||||
{
|
||||
_endContact(contact);
|
||||
_contactMap.erase(i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,13 +65,9 @@ void PhysicsContactListener::PreSolve(b2Contact* contact, const b2Manifold* oldM
|
||||
{
|
||||
if (!_preSolve) return;
|
||||
|
||||
b2Fixture* fixtureA = contact->GetFixtureA();
|
||||
b2Fixture* fixtureB = contact->GetFixtureB();
|
||||
|
||||
if (find(_contactFixtures.begin(), _contactFixtures.end(), fixtureA) != _contactFixtures.end() ||
|
||||
find(_contactFixtures.begin(), _contactFixtures.end(), fixtureB) != _contactFixtures.end())
|
||||
if (_contactMap.find(contact) != _contactMap.end())
|
||||
{
|
||||
_preSolve(contact, oldManifold);
|
||||
_preSolve(contact);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,13 +75,10 @@ void PhysicsContactListener::PostSolve(b2Contact* contact, const b2ContactImpuls
|
||||
{
|
||||
if (!_postSolve) return;
|
||||
|
||||
b2Fixture* fixtureA = contact->GetFixtureA();
|
||||
b2Fixture* fixtureB = contact->GetFixtureB();
|
||||
|
||||
if (find(_contactFixtures.begin(), _contactFixtures.end(), fixtureA) != _contactFixtures.end() ||
|
||||
find(_contactFixtures.begin(), _contactFixtures.end(), fixtureB) != _contactFixtures.end())
|
||||
if (_contactMap.find(contact) != _contactMap.end())
|
||||
{
|
||||
_postSolve(contact, impulse);
|
||||
_impulse.init(impulse);
|
||||
_postSolve(contact, &_impulse);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PhysicsContactListener_H
|
||||
#define PhysicsContactListener_H
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "cocos2d.h"
|
||||
#include "CCPhysicsContactImpulse.h"
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace creator {
|
||||
|
||||
class CC_DLL PhysicsContactListener : public b2ContactListener
|
||||
{
|
||||
public:
|
||||
PhysicsContactListener();
|
||||
virtual ~PhysicsContactListener();
|
||||
|
||||
void setBeginContact(std::function<void(b2Contact* contact)> callback);
|
||||
void setEndContact(std::function<void(b2Contact* contact)> callback);
|
||||
void setPreSolve(std::function<void(b2Contact* contact)> callback);
|
||||
void setPostSolve(std::function<void(b2Contact* contact, const PhysicsContactImpulse* impulse)> callback);
|
||||
|
||||
|
||||
virtual void BeginContact(b2Contact* contact);
|
||||
virtual void EndContact(b2Contact* contact);
|
||||
virtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold);
|
||||
virtual void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse);
|
||||
|
||||
void registerContactFixture(b2Fixture* fixture);
|
||||
void unregisterContactFixture(b2Fixture* fixture);
|
||||
|
||||
protected:
|
||||
std::function<void(b2Contact* contact)> _beginContact;
|
||||
std::function<void(b2Contact* contact)> _endContact;
|
||||
std::function<void(b2Contact* contact)> _preSolve;
|
||||
std::function<void(b2Contact* contact, const PhysicsContactImpulse* impulse)> _postSolve;
|
||||
|
||||
std::vector<b2Fixture*> _contactFixtures;
|
||||
PhysicsContactImpulse _impulse;
|
||||
|
||||
std::unordered_map<b2Contact*, bool> _contactMap;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
+10
-16
@@ -1,19 +1,13 @@
|
||||
#include "CCPhysicsDebugDraw.h"
|
||||
#include "CCGL.h"
|
||||
#include "CCPhysicsDefine.h"
|
||||
|
||||
#include "cocos2d.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdarg>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace cocos2d;
|
||||
|
||||
namespace creator {
|
||||
|
||||
PhysicsDebugDraw::PhysicsDebugDraw( float32 ratio )
|
||||
: mRatio( ratio )
|
||||
PhysicsDebugDraw::PhysicsDebugDraw()
|
||||
{
|
||||
_drawer = GraphicsNode::create();
|
||||
_drawer->retain();
|
||||
@@ -47,9 +41,9 @@ void PhysicsDebugDraw::DrawPolygon(const b2Vec2* old_vertices, int vertexCount,
|
||||
|
||||
for( int i=0;i<vertexCount;i++) {
|
||||
if (i == 0)
|
||||
_drawer->moveTo(old_vertices[i].x * mRatio, old_vertices[i].y * mRatio);
|
||||
_drawer->moveTo(old_vertices[i].x * CC_PTM_RATIO, old_vertices[i].y * CC_PTM_RATIO);
|
||||
else {
|
||||
_drawer->lineTo(old_vertices[i].x * mRatio, old_vertices[i].y * mRatio);
|
||||
_drawer->lineTo(old_vertices[i].x * CC_PTM_RATIO, old_vertices[i].y * CC_PTM_RATIO);
|
||||
}
|
||||
}
|
||||
_drawer->close();
|
||||
@@ -63,9 +57,9 @@ void PhysicsDebugDraw::DrawSolidPolygon(const b2Vec2* old_vertices, int vertexCo
|
||||
|
||||
for( int i=0;i<vertexCount;i++) {
|
||||
if (i == 0)
|
||||
_drawer->moveTo(old_vertices[i].x * mRatio, old_vertices[i].y * mRatio);
|
||||
_drawer->moveTo(old_vertices[i].x * CC_PTM_RATIO, old_vertices[i].y * CC_PTM_RATIO);
|
||||
else {
|
||||
_drawer->lineTo(old_vertices[i].x * mRatio, old_vertices[i].y * mRatio);
|
||||
_drawer->lineTo(old_vertices[i].x * CC_PTM_RATIO, old_vertices[i].y * CC_PTM_RATIO);
|
||||
}
|
||||
}
|
||||
_drawer->close();
|
||||
@@ -77,7 +71,7 @@ void PhysicsDebugDraw::DrawCircle(const b2Vec2& center, float32 radius, const b2
|
||||
Color4F c(color.r, color.g, color.b, /*color.a*/0.5);
|
||||
_drawer->setStrokeColor(c);
|
||||
|
||||
_drawer->circle(center.x * mRatio, center.y * mRatio, radius * mRatio);
|
||||
_drawer->circle(center.x * CC_PTM_RATIO, center.y * CC_PTM_RATIO, radius * CC_PTM_RATIO);
|
||||
_drawer->stroke();
|
||||
}
|
||||
|
||||
@@ -86,7 +80,7 @@ void PhysicsDebugDraw::DrawSolidCircle(const b2Vec2& center, float32 radius, con
|
||||
Color4F c(color.r, color.g, color.b, /*color.a*/0.5);
|
||||
_drawer->setFillColor(c);
|
||||
|
||||
_drawer->circle(center.x * mRatio, center.y * mRatio, radius * mRatio);
|
||||
_drawer->circle(center.x * CC_PTM_RATIO, center.y * CC_PTM_RATIO, radius * CC_PTM_RATIO);
|
||||
_drawer->fill();
|
||||
}
|
||||
|
||||
@@ -95,8 +89,8 @@ void PhysicsDebugDraw::DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2C
|
||||
Color4F c(color.r, color.g, color.b, /*color.a*/0.5);
|
||||
_drawer->setStrokeColor(c);
|
||||
|
||||
_drawer->moveTo(p1.x * mRatio, p1.y * mRatio);
|
||||
_drawer->lineTo(p2.x * mRatio, p2.y * mRatio);
|
||||
_drawer->moveTo(p1.x * CC_PTM_RATIO, p1.y * CC_PTM_RATIO);
|
||||
_drawer->lineTo(p2.x * CC_PTM_RATIO, p2.y * CC_PTM_RATIO);
|
||||
_drawer->stroke();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PhysicsDebugDraw_H
|
||||
#define PhysicsDebugDraw_H
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "editor-support/creator/CCGraphicsNode.h"
|
||||
|
||||
namespace creator {
|
||||
|
||||
// This class implements debug drawing callbacks that are invoked
|
||||
// inside b2World::Step.
|
||||
class CC_DLL PhysicsDebugDraw : public b2Draw
|
||||
{
|
||||
public:
|
||||
PhysicsDebugDraw();
|
||||
~PhysicsDebugDraw();
|
||||
|
||||
creator::GraphicsNode* getDrawer();
|
||||
|
||||
void ClearDraw();
|
||||
|
||||
void AddDrawerToNode(cocos2d::Node* node);
|
||||
|
||||
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);
|
||||
|
||||
protected:
|
||||
creator::GraphicsNode* _drawer;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CCPhysicsDefine_h
|
||||
#define CCPhysicsDefine_h
|
||||
|
||||
#define CC_PTM_RATIO 32
|
||||
|
||||
#endif /* CCPhysicsDefine_h */
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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 "CCPhysicsManifoldWrapper.h"
|
||||
#include "CCPhysicsDefine.h"
|
||||
|
||||
namespace creator {
|
||||
PhysicsManifoldWrapper::PhysicsManifoldWrapper()
|
||||
{
|
||||
}
|
||||
PhysicsManifoldWrapper::~PhysicsManifoldWrapper()
|
||||
{
|
||||
}
|
||||
|
||||
void PhysicsManifoldWrapper::init(b2Contact* contact)
|
||||
{
|
||||
_contact = contact;
|
||||
_manifold = _contact->GetManifold();
|
||||
}
|
||||
|
||||
int PhysicsManifoldWrapper::getCount()
|
||||
{
|
||||
return _manifold->pointCount;
|
||||
}
|
||||
int PhysicsManifoldWrapper::getType()
|
||||
{
|
||||
return _manifold->type;
|
||||
}
|
||||
|
||||
float32 PhysicsManifoldWrapper::getX(int index)
|
||||
{
|
||||
return _manifold->points[index].localPoint.x * CC_PTM_RATIO;
|
||||
}
|
||||
float32 PhysicsManifoldWrapper::getY(int index)
|
||||
{
|
||||
return _manifold->points[index].localPoint.y * CC_PTM_RATIO;
|
||||
}
|
||||
float32 PhysicsManifoldWrapper::getNormalImpulse(int index)
|
||||
{
|
||||
return _manifold->points[index].normalImpulse * CC_PTM_RATIO;
|
||||
}
|
||||
float32 PhysicsManifoldWrapper::getTangentImpulse(int index)
|
||||
{
|
||||
return _manifold->points[index].tangentImpulse;
|
||||
}
|
||||
float32 PhysicsManifoldWrapper::getLocalNormalX()
|
||||
{
|
||||
return _manifold->localNormal.x;
|
||||
}
|
||||
float32 PhysicsManifoldWrapper::getLocalNormalY()
|
||||
{
|
||||
return _manifold->localNormal.y;
|
||||
}
|
||||
float32 PhysicsManifoldWrapper::getLocalPointX()
|
||||
{
|
||||
return _manifold->localPoint.x * CC_PTM_RATIO;
|
||||
}
|
||||
float32 PhysicsManifoldWrapper::getLocalPointY()
|
||||
{
|
||||
return _manifold->localPoint.y * CC_PTM_RATIO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CCPhysicsManifoldWrapper_h
|
||||
#define CCPhysicsManifoldWrapper_h
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "cocos2d.h"
|
||||
|
||||
namespace creator {
|
||||
class CC_DLL PhysicsManifoldWrapper : public cocos2d::Ref
|
||||
{
|
||||
public:
|
||||
PhysicsManifoldWrapper();
|
||||
~PhysicsManifoldWrapper();
|
||||
|
||||
void init(b2Contact* contact);
|
||||
|
||||
int getCount();
|
||||
int getType();
|
||||
float32 getX(int index);
|
||||
float32 getY(int index);
|
||||
float32 getNormalImpulse(int index);
|
||||
float32 getTangentImpulse(int index);
|
||||
float32 getLocalNormalX();
|
||||
float32 getLocalNormalY();
|
||||
float32 getLocalPointX();
|
||||
float32 getLocalPointY();
|
||||
|
||||
protected:
|
||||
b2Contact* _contact;
|
||||
b2Manifold* _manifold;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif /* CCPhysicsWorldManifoldWrapper_h */
|
||||
@@ -0,0 +1,59 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CCPhysicsRayCastCallback_h
|
||||
#define CCPhysicsRayCastCallback_h
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "cocos2d.h"
|
||||
|
||||
namespace creator {
|
||||
|
||||
class CC_DLL PhysicsRayCastCallback : public b2RayCastCallback
|
||||
{
|
||||
public:
|
||||
PhysicsRayCastCallback(int type);
|
||||
~PhysicsRayCastCallback();
|
||||
|
||||
virtual float32 ReportFixture(b2Fixture* fixture, const b2Vec2& point, const b2Vec2& normal, float32 fraction);
|
||||
|
||||
std::vector<b2Fixture*>& getFixtures();
|
||||
std::vector<b2Vec2>& getPoints();
|
||||
std::vector<b2Vec2>& getNormals();
|
||||
std::vector<float>& getFractions();
|
||||
|
||||
int getType();
|
||||
|
||||
protected:
|
||||
int _rayCastType;
|
||||
|
||||
std::vector<b2Fixture*> _fixtures;
|
||||
std::vector<b2Vec2> _points;
|
||||
std::vector<b2Vec2> _normals;
|
||||
std::vector<float> _fractions;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* CCPhysicsRayCastCallback_h */
|
||||
+15
-7
@@ -7,15 +7,16 @@
|
||||
//
|
||||
|
||||
#include "CCPhysicsUtils.h"
|
||||
#include "CCPhysicsDefine.h"
|
||||
|
||||
using namespace cocos2d;
|
||||
|
||||
namespace creator {
|
||||
|
||||
static b2WorldManifold _worldManifold;
|
||||
static PhysicsWorldManifoldWrapper _worldManifoldWrapper;
|
||||
static PhysicsManifoldWrapper _manifoldWrapper;
|
||||
|
||||
PhysicsUtils::PhysicsUtils()
|
||||
: PTM_RATIO(32)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -48,7 +49,7 @@ void PhysicsUtils::syncNode()
|
||||
|
||||
const b2Vec2& pos = body->GetPosition();
|
||||
|
||||
Vec2 position(pos.x*PTM_RATIO, pos.y*PTM_RATIO);
|
||||
Vec2 position(pos.x*CC_PTM_RATIO, pos.y*CC_PTM_RATIO);
|
||||
float angle = -CC_RADIANS_TO_DEGREES(body->GetAngle());
|
||||
|
||||
if (node->getParent() && node->getParent()->getParent()) {
|
||||
@@ -61,11 +62,18 @@ void PhysicsUtils::syncNode()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const b2WorldManifold* PhysicsUtils::getContactWorldManifold(b2Contact* contact)
|
||||
|
||||
const PhysicsWorldManifoldWrapper* PhysicsUtils::getContactWorldManifoldWrapper(b2Contact* contact)
|
||||
{
|
||||
contact->GetWorldManifold(&_worldManifold);
|
||||
return &_worldManifold;
|
||||
_worldManifoldWrapper.init(contact);
|
||||
contact->GetWorldManifold(_worldManifoldWrapper.getb2WorldManifold());
|
||||
return &_worldManifoldWrapper;
|
||||
}
|
||||
|
||||
const PhysicsManifoldWrapper* PhysicsUtils::getContactManifoldWrapper(b2Contact* contact)
|
||||
{
|
||||
_manifoldWrapper.init(contact);
|
||||
return &_manifoldWrapper;
|
||||
}
|
||||
|
||||
cocos2d::Vec2 PhysicsUtils::_convertToNodePosition(cocos2d::Node* node, cocos2d::Vec2& position)
|
||||
@@ -0,0 +1,63 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PhysicsUtils_H
|
||||
#define PhysicsUtils_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "cocos2d.h"
|
||||
|
||||
#include "CCPhysicsWorldManifoldWrapper.h"
|
||||
#include "CCPhysicsManifoldWrapper.h"
|
||||
|
||||
namespace creator {
|
||||
|
||||
// This class implements debug drawing callbacks that are invoked
|
||||
// inside b2World::Step.
|
||||
class CC_DLL PhysicsUtils
|
||||
{
|
||||
public:
|
||||
PhysicsUtils();
|
||||
~PhysicsUtils();
|
||||
|
||||
public:
|
||||
void addB2Body(b2Body* body);
|
||||
void removeB2Body(b2Body* body);
|
||||
|
||||
void syncNode();
|
||||
public:
|
||||
static const PhysicsWorldManifoldWrapper* getContactWorldManifoldWrapper(b2Contact* contact);
|
||||
static const PhysicsManifoldWrapper* getContactManifoldWrapper(b2Contact* contact);
|
||||
protected:
|
||||
cocos2d::Vec2 _convertToNodePosition(cocos2d::Node* node, cocos2d::Vec2& position);
|
||||
float _convertToNodeRotation(cocos2d::Node* node, float rotation);
|
||||
|
||||
std::vector<b2Body*> _bodies;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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 "CCPhysicsWorldManifoldWrapper.h"
|
||||
#include "CCPhysicsDefine.h"
|
||||
|
||||
namespace creator {
|
||||
PhysicsWorldManifoldWrapper::PhysicsWorldManifoldWrapper()
|
||||
{
|
||||
}
|
||||
PhysicsWorldManifoldWrapper::~PhysicsWorldManifoldWrapper()
|
||||
{
|
||||
}
|
||||
|
||||
void PhysicsWorldManifoldWrapper::init(b2Contact* contact)
|
||||
{
|
||||
_contact = contact;
|
||||
}
|
||||
b2WorldManifold* PhysicsWorldManifoldWrapper::getb2WorldManifold()
|
||||
{
|
||||
return &_manifold;
|
||||
}
|
||||
|
||||
int PhysicsWorldManifoldWrapper::getCount()
|
||||
{
|
||||
b2Manifold* m = _contact->GetManifold();
|
||||
return m->pointCount;
|
||||
}
|
||||
|
||||
float32 PhysicsWorldManifoldWrapper::getX(int index)
|
||||
{
|
||||
return _manifold.points[index].x * CC_PTM_RATIO;
|
||||
}
|
||||
float32 PhysicsWorldManifoldWrapper::getY(int index)
|
||||
{
|
||||
return _manifold.points[index].y * CC_PTM_RATIO;
|
||||
}
|
||||
float32 PhysicsWorldManifoldWrapper::getSeparation(int index)
|
||||
{
|
||||
return _manifold.separations[index] * CC_PTM_RATIO;
|
||||
}
|
||||
float32 PhysicsWorldManifoldWrapper::getNormalX()
|
||||
{
|
||||
return _manifold.normal.x;
|
||||
}
|
||||
float32 PhysicsWorldManifoldWrapper::getNormalY()
|
||||
{
|
||||
return _manifold.normal.y;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CCPhysicsWorldManifoldWrapper_h
|
||||
#define CCPhysicsWorldManifoldWrapper_h
|
||||
|
||||
#include "Box2D/Box2D.h"
|
||||
#include "cocos2d.h"
|
||||
|
||||
namespace creator {
|
||||
class CC_DLL PhysicsWorldManifoldWrapper : public cocos2d::Ref
|
||||
{
|
||||
public:
|
||||
PhysicsWorldManifoldWrapper();
|
||||
~PhysicsWorldManifoldWrapper();
|
||||
|
||||
void init(b2Contact* contact);
|
||||
b2WorldManifold* getb2WorldManifold();
|
||||
|
||||
int getCount();
|
||||
float32 getX(int index);
|
||||
float32 getY(int index);
|
||||
float32 getSeparation(int index);
|
||||
float32 getNormalX();
|
||||
float32 getNormalY();
|
||||
|
||||
protected:
|
||||
b2WorldManifold _manifold;
|
||||
b2Contact* _contact;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif /* CCPhysicsWorldManifoldWrapper_h */
|
||||
@@ -785,6 +785,88 @@ PhysicsDebugDraw : function (
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class PhysicsWorldManifoldWrapper
|
||||
*/
|
||||
cc.PhysicsWorldManifoldWrapper = {
|
||||
|
||||
/**
|
||||
* @method getSeparation
|
||||
* @param {int} arg0
|
||||
* @return {float}
|
||||
*/
|
||||
getSeparation : function (
|
||||
int
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getX
|
||||
* @param {int} arg0
|
||||
* @return {float}
|
||||
*/
|
||||
getX : function (
|
||||
int
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getY
|
||||
* @param {int} arg0
|
||||
* @return {float}
|
||||
*/
|
||||
getY : function (
|
||||
int
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getCount
|
||||
* @return {int}
|
||||
*/
|
||||
getCount : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getNormalY
|
||||
* @return {float}
|
||||
*/
|
||||
getNormalY : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getNormalX
|
||||
* @return {float}
|
||||
*/
|
||||
getNormalX : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method PhysicsWorldManifoldWrapper
|
||||
* @constructor
|
||||
*/
|
||||
PhysicsWorldManifoldWrapper : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class PhysicsUtils
|
||||
*/
|
||||
@@ -818,6 +900,30 @@ b2body
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getContactManifoldWrapper
|
||||
* @param {b2Contact} arg0
|
||||
* @return {creator::PhysicsManifoldWrapper}
|
||||
*/
|
||||
getContactManifoldWrapper : function (
|
||||
b2contact
|
||||
)
|
||||
{
|
||||
return creator::PhysicsManifoldWrapper;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getContactWorldManifoldWrapper
|
||||
* @param {b2Contact} arg0
|
||||
* @return {creator::PhysicsWorldManifoldWrapper}
|
||||
*/
|
||||
getContactWorldManifoldWrapper : function (
|
||||
b2contact
|
||||
)
|
||||
{
|
||||
return creator::PhysicsWorldManifoldWrapper;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method PhysicsUtils
|
||||
* @constructor
|
||||
@@ -829,6 +935,56 @@ PhysicsUtils : function (
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class PhysicsContactImpulse
|
||||
*/
|
||||
cc.PhysicsContactImpulse = {
|
||||
|
||||
/**
|
||||
* @method getCount
|
||||
* @return {int}
|
||||
*/
|
||||
getCount : function (
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getNormalImpulse
|
||||
* @param {int} arg0
|
||||
* @return {float}
|
||||
*/
|
||||
getNormalImpulse : function (
|
||||
int
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getTangentImpulse
|
||||
* @param {int} arg0
|
||||
* @return {float}
|
||||
*/
|
||||
getTangentImpulse : function (
|
||||
int
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method PhysicsContactImpulse
|
||||
* @constructor
|
||||
*/
|
||||
PhysicsContactImpulse : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class PhysicsContactListener
|
||||
*/
|
||||
|
||||
@@ -3310,7 +3310,7 @@ bool js_box2dclasses_b2Fixture_GetAABB(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_box2dclasses_b2Fixture_GetAABB : Error processing arguments");
|
||||
const b2AABB& ret = cobj->GetAABB(arg0);
|
||||
JS::RootedValue jsret(cx);
|
||||
#pragma warning NO CONVERSION FROM NATIVE FOR b2AABB;
|
||||
jsret = b2AABB_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
#include "scripting/js-bindings/manual/cocos2d_specifics.hpp"
|
||||
#include "creator/CCScale9Sprite.h"
|
||||
#include "creator/CCGraphicsNode.h"
|
||||
#include "editor-support/creator/CCPhysicsDebugDraw.h"
|
||||
#include "editor-support/creator/CCPhysicsUtils.h"
|
||||
#include "editor-support/creator/CCPhysicsContactListener.h"
|
||||
#include "editor-support/creator/CCPhysicsAABBQueryCallback.h"
|
||||
#include "editor-support/creator/CCPhysicsRayCastCallback.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsDebugDraw.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsUtils.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsContactListener.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsAABBQueryCallback.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsRayCastCallback.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsWorldManifoldWrapper.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsContactImpulse.h"
|
||||
#include "editor-support/creator/CCCameraNode.h"
|
||||
#include "scripting/js-bindings/manual/box2d/js_bindings_box2d_manual.h"
|
||||
|
||||
@@ -1853,6 +1855,193 @@ void js_register_creator_PhysicsDebugDraw(JSContext *cx, JS::HandleObject global
|
||||
jsb_register_class<creator::PhysicsDebugDraw>(cx, jsb_creator_PhysicsDebugDraw_class, proto, parent_proto);
|
||||
}
|
||||
|
||||
JSClass *jsb_creator_PhysicsWorldManifoldWrapper_class;
|
||||
JSObject *jsb_creator_PhysicsWorldManifoldWrapper_prototype;
|
||||
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getSeparation(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
creator::PhysicsWorldManifoldWrapper* cobj = (creator::PhysicsWorldManifoldWrapper *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_creator_PhysicsWorldManifoldWrapper_getSeparation : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
int arg0 = 0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_creator_PhysicsWorldManifoldWrapper_getSeparation : Error processing arguments");
|
||||
double ret = cobj->getSeparation(arg0);
|
||||
JS::RootedValue jsret(cx);
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_creator_PhysicsWorldManifoldWrapper_getSeparation : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getX(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
creator::PhysicsWorldManifoldWrapper* cobj = (creator::PhysicsWorldManifoldWrapper *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_creator_PhysicsWorldManifoldWrapper_getX : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
int arg0 = 0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_creator_PhysicsWorldManifoldWrapper_getX : Error processing arguments");
|
||||
double ret = cobj->getX(arg0);
|
||||
JS::RootedValue jsret(cx);
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_creator_PhysicsWorldManifoldWrapper_getX : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getY(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
creator::PhysicsWorldManifoldWrapper* cobj = (creator::PhysicsWorldManifoldWrapper *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_creator_PhysicsWorldManifoldWrapper_getY : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
int arg0 = 0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_creator_PhysicsWorldManifoldWrapper_getY : Error processing arguments");
|
||||
double ret = cobj->getY(arg0);
|
||||
JS::RootedValue jsret(cx);
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_creator_PhysicsWorldManifoldWrapper_getY : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getCount(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
creator::PhysicsWorldManifoldWrapper* cobj = (creator::PhysicsWorldManifoldWrapper *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_creator_PhysicsWorldManifoldWrapper_getCount : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
int ret = cobj->getCount();
|
||||
JS::RootedValue jsret(cx);
|
||||
jsret = int32_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_creator_PhysicsWorldManifoldWrapper_getCount : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getNormalY(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
creator::PhysicsWorldManifoldWrapper* cobj = (creator::PhysicsWorldManifoldWrapper *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_creator_PhysicsWorldManifoldWrapper_getNormalY : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
double ret = cobj->getNormalY();
|
||||
JS::RootedValue jsret(cx);
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_creator_PhysicsWorldManifoldWrapper_getNormalY : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getNormalX(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
creator::PhysicsWorldManifoldWrapper* cobj = (creator::PhysicsWorldManifoldWrapper *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_creator_PhysicsWorldManifoldWrapper_getNormalX : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
double ret = cobj->getNormalX();
|
||||
JS::RootedValue jsret(cx);
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_creator_PhysicsWorldManifoldWrapper_getNormalX : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
creator::PhysicsWorldManifoldWrapper* cobj = new (std::nothrow) creator::PhysicsWorldManifoldWrapper();
|
||||
|
||||
js_type_class_t *typeClass = js_get_type_from_native<creator::PhysicsWorldManifoldWrapper>(cobj);
|
||||
|
||||
// link the native object with the javascript object
|
||||
JS::RootedObject jsobj(cx, jsb_ref_create_jsobject(cx, cobj, typeClass, "creator::PhysicsWorldManifoldWrapper"));
|
||||
args.rval().set(OBJECT_TO_JSVAL(jsobj));
|
||||
if (JS_HasProperty(cx, jsobj, "_ctor", &ok) && ok)
|
||||
ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(jsobj), "_ctor", args);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void js_register_creator_PhysicsWorldManifoldWrapper(JSContext *cx, JS::HandleObject global) {
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_class = (JSClass *)calloc(1, sizeof(JSClass));
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_class->name = "PhysicsWorldManifoldWrapper";
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_class->addProperty = JS_PropertyStub;
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_class->delProperty = JS_DeletePropertyStub;
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_class->getProperty = JS_PropertyStub;
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_class->setProperty = JS_StrictPropertyStub;
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_class->enumerate = JS_EnumerateStub;
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_class->resolve = JS_ResolveStub;
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_class->convert = JS_ConvertStub;
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2);
|
||||
|
||||
static JSPropertySpec properties[] = {
|
||||
JS_PS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec funcs[] = {
|
||||
JS_FN("getSeparation", js_creator_PhysicsWorldManifoldWrapper_getSeparation, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getX", js_creator_PhysicsWorldManifoldWrapper_getX, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getY", js_creator_PhysicsWorldManifoldWrapper_getY, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getCount", js_creator_PhysicsWorldManifoldWrapper_getCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getNormalY", js_creator_PhysicsWorldManifoldWrapper_getNormalY, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getNormalX", js_creator_PhysicsWorldManifoldWrapper_getNormalX, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
JSFunctionSpec *st_funcs = NULL;
|
||||
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_prototype = JS_InitClass(
|
||||
cx, global,
|
||||
JS::NullPtr(),
|
||||
jsb_creator_PhysicsWorldManifoldWrapper_class,
|
||||
js_creator_PhysicsWorldManifoldWrapper_constructor, 0, // constructor
|
||||
properties,
|
||||
funcs,
|
||||
NULL, // no static properties
|
||||
st_funcs);
|
||||
|
||||
JS::RootedObject proto(cx, jsb_creator_PhysicsWorldManifoldWrapper_prototype);
|
||||
JS::RootedValue className(cx, std_string_to_jsval(cx, "PhysicsWorldManifoldWrapper"));
|
||||
JS_SetProperty(cx, proto, "_className", className);
|
||||
JS_SetProperty(cx, proto, "__nativeObj", JS::TrueHandleValue);
|
||||
JS_SetProperty(cx, proto, "__is_ref", JS::TrueHandleValue);
|
||||
// add the proto and JSClass to the type->js info hash table
|
||||
jsb_register_class<creator::PhysicsWorldManifoldWrapper>(cx, jsb_creator_PhysicsWorldManifoldWrapper_class, proto, JS::NullPtr());
|
||||
}
|
||||
|
||||
JSClass *jsb_creator_PhysicsUtils_class;
|
||||
JSObject *jsb_creator_PhysicsUtils_prototype;
|
||||
|
||||
@@ -1928,6 +2117,68 @@ bool js_creator_PhysicsUtils_removeB2Body(JSContext *cx, uint32_t argc, jsval *v
|
||||
JS_ReportError(cx, "js_creator_PhysicsUtils_removeB2Body : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_creator_PhysicsUtils_getContactManifoldWrapper(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
if (argc == 1) {
|
||||
b2Contact* arg0 = nullptr;
|
||||
do {
|
||||
if (args.get(0).isNull()) { arg0 = nullptr; break; }
|
||||
if (!args.get(0).isObject()) { ok = false; break; }
|
||||
js_proxy_t *jsProxy;
|
||||
JS::RootedObject tmpObj(cx, args.get(0).toObjectOrNull());
|
||||
jsProxy = jsb_get_js_proxy(tmpObj);
|
||||
arg0 = (b2Contact*)(jsProxy ? jsProxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
|
||||
} while (0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_creator_PhysicsUtils_getContactManifoldWrapper : Error processing arguments");
|
||||
|
||||
const creator::PhysicsManifoldWrapper* ret = creator::PhysicsUtils::getContactManifoldWrapper(arg0);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
if (ret) {
|
||||
jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject<creator::PhysicsManifoldWrapper>(cx, (creator::PhysicsManifoldWrapper*)ret));
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
};
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
JS_ReportError(cx, "js_creator_PhysicsUtils_getContactManifoldWrapper : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool js_creator_PhysicsUtils_getContactWorldManifoldWrapper(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
if (argc == 1) {
|
||||
b2Contact* arg0 = nullptr;
|
||||
do {
|
||||
if (args.get(0).isNull()) { arg0 = nullptr; break; }
|
||||
if (!args.get(0).isObject()) { ok = false; break; }
|
||||
js_proxy_t *jsProxy;
|
||||
JS::RootedObject tmpObj(cx, args.get(0).toObjectOrNull());
|
||||
jsProxy = jsb_get_js_proxy(tmpObj);
|
||||
arg0 = (b2Contact*)(jsProxy ? jsProxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
|
||||
} while (0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_creator_PhysicsUtils_getContactWorldManifoldWrapper : Error processing arguments");
|
||||
|
||||
const creator::PhysicsWorldManifoldWrapper* ret = creator::PhysicsUtils::getContactWorldManifoldWrapper(arg0);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
if (ret) {
|
||||
jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject<creator::PhysicsWorldManifoldWrapper>(cx, (creator::PhysicsWorldManifoldWrapper*)ret));
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
};
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
JS_ReportError(cx, "js_creator_PhysicsUtils_getContactWorldManifoldWrapper : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool js_creator_PhysicsUtils_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
@@ -1992,7 +2243,11 @@ void js_register_creator_PhysicsUtils(JSContext *cx, JS::HandleObject global) {
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
JSFunctionSpec *st_funcs = NULL;
|
||||
static JSFunctionSpec st_funcs[] = {
|
||||
JS_FN("getContactManifoldWrapper", js_creator_PhysicsUtils_getContactManifoldWrapper, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getContactWorldManifoldWrapper", js_creator_PhysicsUtils_getContactWorldManifoldWrapper, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
jsb_creator_PhysicsUtils_prototype = JS_InitClass(
|
||||
cx, global,
|
||||
@@ -2013,6 +2268,132 @@ void js_register_creator_PhysicsUtils(JSContext *cx, JS::HandleObject global) {
|
||||
jsb_register_class<creator::PhysicsUtils>(cx, jsb_creator_PhysicsUtils_class, proto, JS::NullPtr());
|
||||
}
|
||||
|
||||
JSClass *jsb_creator_PhysicsContactImpulse_class;
|
||||
JSObject *jsb_creator_PhysicsContactImpulse_prototype;
|
||||
|
||||
bool js_creator_PhysicsContactImpulse_getCount(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
creator::PhysicsContactImpulse* cobj = (creator::PhysicsContactImpulse *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_creator_PhysicsContactImpulse_getCount : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
int ret = cobj->getCount();
|
||||
JS::RootedValue jsret(cx);
|
||||
jsret = int32_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_creator_PhysicsContactImpulse_getCount : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_creator_PhysicsContactImpulse_getNormalImpulse(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
creator::PhysicsContactImpulse* cobj = (creator::PhysicsContactImpulse *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_creator_PhysicsContactImpulse_getNormalImpulse : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
int arg0 = 0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_creator_PhysicsContactImpulse_getNormalImpulse : Error processing arguments");
|
||||
double ret = cobj->getNormalImpulse(arg0);
|
||||
JS::RootedValue jsret(cx);
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_creator_PhysicsContactImpulse_getNormalImpulse : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_creator_PhysicsContactImpulse_getTangentImpulse(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
creator::PhysicsContactImpulse* cobj = (creator::PhysicsContactImpulse *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_creator_PhysicsContactImpulse_getTangentImpulse : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
int arg0 = 0;
|
||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_creator_PhysicsContactImpulse_getTangentImpulse : Error processing arguments");
|
||||
double ret = cobj->getTangentImpulse(arg0);
|
||||
JS::RootedValue jsret(cx);
|
||||
jsret = DOUBLE_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_creator_PhysicsContactImpulse_getTangentImpulse : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_creator_PhysicsContactImpulse_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
creator::PhysicsContactImpulse* cobj = new (std::nothrow) creator::PhysicsContactImpulse();
|
||||
|
||||
js_type_class_t *typeClass = js_get_type_from_native<creator::PhysicsContactImpulse>(cobj);
|
||||
|
||||
// link the native object with the javascript object
|
||||
JS::RootedObject jsobj(cx, jsb_ref_create_jsobject(cx, cobj, typeClass, "creator::PhysicsContactImpulse"));
|
||||
args.rval().set(OBJECT_TO_JSVAL(jsobj));
|
||||
if (JS_HasProperty(cx, jsobj, "_ctor", &ok) && ok)
|
||||
ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(jsobj), "_ctor", args);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void js_register_creator_PhysicsContactImpulse(JSContext *cx, JS::HandleObject global) {
|
||||
jsb_creator_PhysicsContactImpulse_class = (JSClass *)calloc(1, sizeof(JSClass));
|
||||
jsb_creator_PhysicsContactImpulse_class->name = "PhysicsContactImpulse";
|
||||
jsb_creator_PhysicsContactImpulse_class->addProperty = JS_PropertyStub;
|
||||
jsb_creator_PhysicsContactImpulse_class->delProperty = JS_DeletePropertyStub;
|
||||
jsb_creator_PhysicsContactImpulse_class->getProperty = JS_PropertyStub;
|
||||
jsb_creator_PhysicsContactImpulse_class->setProperty = JS_StrictPropertyStub;
|
||||
jsb_creator_PhysicsContactImpulse_class->enumerate = JS_EnumerateStub;
|
||||
jsb_creator_PhysicsContactImpulse_class->resolve = JS_ResolveStub;
|
||||
jsb_creator_PhysicsContactImpulse_class->convert = JS_ConvertStub;
|
||||
jsb_creator_PhysicsContactImpulse_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2);
|
||||
|
||||
static JSPropertySpec properties[] = {
|
||||
JS_PS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec funcs[] = {
|
||||
JS_FN("getCount", js_creator_PhysicsContactImpulse_getCount, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getNormalImpulse", js_creator_PhysicsContactImpulse_getNormalImpulse, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getTangentImpulse", js_creator_PhysicsContactImpulse_getTangentImpulse, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
JSFunctionSpec *st_funcs = NULL;
|
||||
|
||||
jsb_creator_PhysicsContactImpulse_prototype = JS_InitClass(
|
||||
cx, global,
|
||||
JS::NullPtr(),
|
||||
jsb_creator_PhysicsContactImpulse_class,
|
||||
js_creator_PhysicsContactImpulse_constructor, 0, // constructor
|
||||
properties,
|
||||
funcs,
|
||||
NULL, // no static properties
|
||||
st_funcs);
|
||||
|
||||
JS::RootedObject proto(cx, jsb_creator_PhysicsContactImpulse_prototype);
|
||||
JS::RootedValue className(cx, std_string_to_jsval(cx, "PhysicsContactImpulse"));
|
||||
JS_SetProperty(cx, proto, "_className", className);
|
||||
JS_SetProperty(cx, proto, "__nativeObj", JS::TrueHandleValue);
|
||||
JS_SetProperty(cx, proto, "__is_ref", JS::TrueHandleValue);
|
||||
// add the proto and JSClass to the type->js info hash table
|
||||
jsb_register_class<creator::PhysicsContactImpulse>(cx, jsb_creator_PhysicsContactImpulse_class, proto, JS::NullPtr());
|
||||
}
|
||||
|
||||
JSClass *jsb_creator_PhysicsContactListener_class;
|
||||
JSObject *jsb_creator_PhysicsContactListener_prototype;
|
||||
|
||||
@@ -2593,8 +2974,10 @@ void register_all_creator(JSContext* cx, JS::HandleObject obj) {
|
||||
js_register_creator_PhysicsRayCastCallback(cx, ns);
|
||||
js_register_creator_PhysicsDebugDraw(cx, ns);
|
||||
js_register_creator_PhysicsContactListener(cx, ns);
|
||||
js_register_creator_PhysicsContactImpulse(cx, ns);
|
||||
js_register_creator_PhysicsUtils(cx, ns);
|
||||
js_register_creator_Scale9SpriteV2(cx, ns);
|
||||
js_register_creator_PhysicsWorldManifoldWrapper(cx, ns);
|
||||
js_register_creator_GraphicsNode(cx, ns);
|
||||
js_register_creator_PhysicsAABBQueryCallback(cx, ns);
|
||||
js_register_creator_CameraNode(cx, ns);
|
||||
|
||||
@@ -98,6 +98,21 @@ bool js_creator_PhysicsDebugDraw_ClearDraw(JSContext *cx, uint32_t argc, jsval *
|
||||
bool js_creator_PhysicsDebugDraw_AddDrawerToNode(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsDebugDraw_PhysicsDebugDraw(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_creator_PhysicsWorldManifoldWrapper_class;
|
||||
extern JSObject *jsb_creator_PhysicsWorldManifoldWrapper_prototype;
|
||||
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
void js_creator_PhysicsWorldManifoldWrapper_finalize(JSContext *cx, JSObject *obj);
|
||||
void js_register_creator_PhysicsWorldManifoldWrapper(JSContext *cx, JS::HandleObject global);
|
||||
void register_all_creator(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getSeparation(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getX(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getY(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getCount(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getNormalY(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_getNormalX(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsWorldManifoldWrapper_PhysicsWorldManifoldWrapper(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_creator_PhysicsUtils_class;
|
||||
extern JSObject *jsb_creator_PhysicsUtils_prototype;
|
||||
|
||||
@@ -108,8 +123,22 @@ void register_all_creator(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_creator_PhysicsUtils_addB2Body(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsUtils_syncNode(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsUtils_removeB2Body(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsUtils_getContactManifoldWrapper(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsUtils_getContactWorldManifoldWrapper(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsUtils_PhysicsUtils(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_creator_PhysicsContactImpulse_class;
|
||||
extern JSObject *jsb_creator_PhysicsContactImpulse_prototype;
|
||||
|
||||
bool js_creator_PhysicsContactImpulse_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
void js_creator_PhysicsContactImpulse_finalize(JSContext *cx, JSObject *obj);
|
||||
void js_register_creator_PhysicsContactImpulse(JSContext *cx, JS::HandleObject global);
|
||||
void register_all_creator(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_creator_PhysicsContactImpulse_getCount(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsContactImpulse_getNormalImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsContactImpulse_getTangentImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_creator_PhysicsContactImpulse_PhysicsContactImpulse(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_creator_PhysicsContactListener_class;
|
||||
extern JSObject *jsb_creator_PhysicsContactListener_prototype;
|
||||
|
||||
|
||||
@@ -814,6 +814,33 @@ jsval array_of_b2Vec2_to_jsval(JSContext* cx, const std::vector<b2Vec2>& vs)
|
||||
return OBJECT_TO_JSVAL(jsret);
|
||||
}
|
||||
|
||||
jsval b2AABB_to_jsval(JSContext* cx, const b2AABB& v)
|
||||
{
|
||||
JS::RootedObject object(cx, JS_NewObject(cx, NULL, JS::NullPtr(), JS::NullPtr()));
|
||||
if (!object) {
|
||||
return JSVAL_VOID;
|
||||
}
|
||||
|
||||
JS::RootedObject lowerBound(cx, JS_NewObject(cx, NULL, JS::NullPtr(), JS::NullPtr()));
|
||||
if (!JS_DefineProperty(cx, lowerBound, "x", v.lowerBound.x, JSPROP_ENUMERATE | JSPROP_PERMANENT) ||
|
||||
!JS_DefineProperty(cx, lowerBound, "y", v.lowerBound.y, JSPROP_ENUMERATE | JSPROP_PERMANENT) ) {
|
||||
return JSVAL_VOID;
|
||||
}
|
||||
|
||||
JS::RootedObject upperBound(cx, JS_NewObject(cx, NULL, JS::NullPtr(), JS::NullPtr()));
|
||||
if (!JS_DefineProperty(cx, upperBound, "x", v.upperBound.x, JSPROP_ENUMERATE | JSPROP_PERMANENT) ||
|
||||
!JS_DefineProperty(cx, upperBound, "y", v.upperBound.y, JSPROP_ENUMERATE | JSPROP_PERMANENT) ) {
|
||||
return JSVAL_VOID;
|
||||
}
|
||||
|
||||
if (!JS_DefineProperty(cx, object, "lowerBound", lowerBound, JSPROP_ENUMERATE | JSPROP_PERMANENT) ||
|
||||
!JS_DefineProperty(cx, object, "upperBound", upperBound, JSPROP_ENUMERATE | JSPROP_PERMANENT) ) {
|
||||
return JSVAL_VOID;
|
||||
}
|
||||
|
||||
return OBJECT_TO_JSVAL(object);
|
||||
}
|
||||
|
||||
|
||||
extern JSClass *jsb_b2Shape_class;
|
||||
extern JSObject *jsb_b2Shape_prototype;
|
||||
@@ -1256,7 +1283,6 @@ bool js_box2dclasses_b2ChainShape_CreateLoop(JSContext *cx, uint32_t argc, jsval
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void register_all_box2dclasses_manual(JSContext* cx, JS::HandleObject obj) {
|
||||
JS::RootedObject tmpObj(cx);
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ jsval b2Manifold_to_jsval(JSContext* cx, const b2Manifold* v);
|
||||
jsval b2ContactImpulse_to_jsval(JSContext* cx, const b2ContactImpulse* v);
|
||||
jsval array_of_b2Fixture_to_jsval(JSContext* cx, const std::vector<b2Fixture*>& fixtures);
|
||||
jsval array_of_b2Vec2_to_jsval(JSContext* cx, const std::vector<b2Vec2>& vs);
|
||||
jsval b2AABB_to_jsval(JSContext* cx, const b2AABB& v);
|
||||
|
||||
void register_all_box2dclasses_manual(JSContext* cx, JS::HandleObject obj);
|
||||
|
||||
|
||||
@@ -34,10 +34,11 @@
|
||||
|
||||
#include "scripting/js-bindings/auto/jsb_creator_auto.hpp"
|
||||
|
||||
#include "editor-support/creator/CCPhysicsContactListener.h"
|
||||
#include "editor-support/creator/CCPhysicsUtils.h"
|
||||
#include "editor-support/creator/CCPhysicsAABBQueryCallback.h"
|
||||
#include "editor-support/creator/CCPhysicsRayCastCallback.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsContactListener.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsUtils.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsAABBQueryCallback.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsRayCastCallback.h"
|
||||
#include "editor-support/creator/physics/CCPhysicsContactImpulse.h"
|
||||
|
||||
USING_NS_CC_EXT;
|
||||
|
||||
@@ -150,27 +151,22 @@ bool js_creator_PhysicsContactListener_setPreSolve(JSContext *cx, uint32_t argc,
|
||||
creator::PhysicsContactListener* cobj = (creator::PhysicsContactListener *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_creator_PhysicsContactListener_setPreSolve : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
std::function<void (b2Contact *, const b2Manifold *)> arg0;
|
||||
std::function<void (b2Contact *)> arg0;
|
||||
do {
|
||||
if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION)
|
||||
{
|
||||
JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull());
|
||||
std::shared_ptr<JSFunctionWrapper> func(new JSFunctionWrapper(cx, jstarget, args.get(0), args.thisv()));
|
||||
auto lambda = [=](b2Contact* larg0, const b2Manifold* larg1) -> void {
|
||||
auto lambda = [=](b2Contact* larg0) -> void {
|
||||
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
|
||||
jsval largv[2];
|
||||
jsval largv[1];
|
||||
if (larg0) {
|
||||
largv[0] = OBJECT_TO_JSVAL(js_get_or_create_jsobject<b2Contact>(cx, (b2Contact*)larg0));
|
||||
} else {
|
||||
largv[0] = JSVAL_NULL;
|
||||
};
|
||||
if (larg1) {
|
||||
largv[1] = b2Manifold_to_jsval(cx, larg1);
|
||||
} else {
|
||||
largv[1] = JSVAL_NULL;
|
||||
};
|
||||
JS::RootedValue rval(cx);
|
||||
bool succeed = func->invoke(JS::HandleValueArray::fromMarkedLocation(2, largv), &rval);
|
||||
bool succeed = func->invoke(JS::HandleValueArray::fromMarkedLocation(1, largv), &rval);
|
||||
if (!succeed && JS_IsExceptionPending(cx)) {
|
||||
JS_ReportPendingException(cx);
|
||||
}
|
||||
@@ -202,13 +198,13 @@ bool js_creator_PhysicsContactListener_setPostSolve(JSContext *cx, uint32_t argc
|
||||
creator::PhysicsContactListener* cobj = (creator::PhysicsContactListener *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_creator_PhysicsContactListener_setPostSolve : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
std::function<void (b2Contact *, const b2ContactImpulse *)> arg0;
|
||||
std::function<void (b2Contact *, const creator::PhysicsContactImpulse *)> arg0;
|
||||
do {
|
||||
if(JS_TypeOfValue(cx, args.get(0)) == JSTYPE_FUNCTION)
|
||||
{
|
||||
JS::RootedObject jstarget(cx, args.thisv().toObjectOrNull());
|
||||
std::shared_ptr<JSFunctionWrapper> func(new JSFunctionWrapper(cx, jstarget, args.get(0), args.thisv()));
|
||||
auto lambda = [=](b2Contact* larg0, const b2ContactImpulse* larg1) -> void {
|
||||
auto lambda = [=](b2Contact* larg0, const creator::PhysicsContactImpulse* larg1) -> void {
|
||||
JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET
|
||||
jsval largv[2];
|
||||
if (larg0) {
|
||||
@@ -217,7 +213,7 @@ bool js_creator_PhysicsContactListener_setPostSolve(JSContext *cx, uint32_t argc
|
||||
largv[0] = JSVAL_NULL;
|
||||
};
|
||||
if (larg1) {
|
||||
largv[1] = b2ContactImpulse_to_jsval(cx, (b2ContactImpulse*)larg1);
|
||||
largv[1] = OBJECT_TO_JSVAL(js_get_or_create_jsobject<creator::PhysicsContactImpulse>(cx, (creator::PhysicsContactImpulse*)larg1));
|
||||
} else {
|
||||
largv[1] = JSVAL_NULL;
|
||||
};
|
||||
@@ -245,73 +241,6 @@ bool js_creator_PhysicsContactListener_setPostSolve(JSContext *cx, uint32_t argc
|
||||
return false;
|
||||
}
|
||||
|
||||
bool js_creator_PhysicsUtils_getContactWorldManifold(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
if (argc == 1) {
|
||||
b2Contact* arg0 = nullptr;
|
||||
do {
|
||||
if (args.get(0).isNull()) { arg0 = nullptr; break; }
|
||||
if (!args.get(0).isObject()) { ok = false; break; }
|
||||
js_proxy_t *jsProxy;
|
||||
JS::RootedObject tmpObj(cx, args.get(0).toObjectOrNull());
|
||||
jsProxy = jsb_get_js_proxy(tmpObj);
|
||||
arg0 = (b2Contact*)(jsProxy ? jsProxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
|
||||
} while (0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_creator_PhysicsUtils_getContactWorldManifold : Error processing arguments");
|
||||
|
||||
const b2WorldManifold* ret = creator::PhysicsUtils::getContactWorldManifold(arg0);
|
||||
|
||||
//
|
||||
jsval jsret = JSVAL_NULL;
|
||||
|
||||
JS::RootedObject tmp(cx, JS_NewObject(cx, NULL, JS::NullPtr(), JS::NullPtr()));
|
||||
|
||||
ok = JS_DefineProperty(cx, tmp, "normal", JS::RootedValue(cx, b2Vec2_to_jsval(cx, ret->normal)), JSPROP_ENUMERATE | JSPROP_PERMANENT);
|
||||
|
||||
|
||||
b2Manifold* manifold = arg0->GetManifold();
|
||||
int count = manifold->pointCount;
|
||||
|
||||
// points
|
||||
JS::RootedObject jsretPoints(cx, JS_NewArrayObject(cx, 0));
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
const b2Vec2& p = ret->points[i];
|
||||
|
||||
if (!JS_SetElement(cx, jsretPoints, i, JS::RootedValue(cx, b2Vec2_to_jsval(cx, p)))) {
|
||||
ok = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
ok &= JS_DefineProperty(cx, tmp, "points", jsretPoints, JSPROP_ENUMERATE | JSPROP_PERMANENT);
|
||||
|
||||
// separations
|
||||
JS::RootedObject jsretSeparations(cx, JS_NewArrayObject(cx, 0));
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
float32 v = ret->separations[i];
|
||||
|
||||
if (!JS_SetElement(cx, jsretSeparations, i, v)) {
|
||||
ok = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
ok &= JS_DefineProperty(cx, tmp, "separations", jsretSeparations, JSPROP_ENUMERATE | JSPROP_PERMANENT);
|
||||
|
||||
if (ok) {
|
||||
jsret = OBJECT_TO_JSVAL(tmp);
|
||||
}
|
||||
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
JS_ReportError(cx, "js_creator_PhysicsUtils_getContactWorldManifold : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool js_creator_PhysicsAABBQueryCallback_getFixtures(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
@@ -400,10 +329,7 @@ void register_all_creatorclasses_manual(JSContext* cx, JS::HandleObject obj) {
|
||||
JS_DefineFunction(cx, tmpObj, "setPostSolve", js_creator_PhysicsContactListener_setPostSolve, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT);
|
||||
JS_DefineFunction(cx, tmpObj, "setBeginContact", js_creator_PhysicsContactListener_setBeginContact, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT);
|
||||
JS_DefineFunction(cx, tmpObj, "setEndContact", js_creator_PhysicsContactListener_setEndContact, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT);
|
||||
|
||||
tmpObj.set(jsb_creator_PhysicsUtils_prototype);
|
||||
JS_DefineFunction(cx, tmpObj, "getContactWorldManifold", js_creator_PhysicsUtils_getContactWorldManifold, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT);
|
||||
|
||||
|
||||
tmpObj.set(jsb_creator_PhysicsAABBQueryCallback_prototype);
|
||||
JS_DefineFunction(cx, tmpObj, "getFixtures", js_creator_PhysicsAABBQueryCallback_getFixtures, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT);
|
||||
|
||||
|
||||
Submodule native/tools/bindings-generator updated: 30c6b8237e...b32f0335fa
@@ -26,7 +26,7 @@ cxxgenerator_headers =
|
||||
extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s
|
||||
|
||||
# what headers to parse
|
||||
headers = %(creatordir)s/CCScale9Sprite.h %(creatordir)s/CCGraphicsNode.h %(creatordir)s/CCPhysicsDebugDraw.h %(creatordir)s/CCPhysicsUtils.h %(creatordir)s/CCPhysicsContactListener.h %(creatordir)s/CCPhysicsAABBQueryCallback.h %(creatordir)s/CCPhysicsRayCastCallback.h %(creatordir)s/CCCameraNode.h
|
||||
headers = %(creatordir)s/CCScale9Sprite.h %(creatordir)s/CCGraphicsNode.h %(creatordir)s/physics/CCPhysicsDebugDraw.h %(creatordir)s/physics/CCPhysicsUtils.h %(creatordir)s/physics/CCPhysicsContactListener.h %(creatordir)s/physics/CCPhysicsAABBQueryCallback.h %(creatordir)s/physics/CCPhysicsRayCastCallback.h %(creatordir)s/physics/CCPhysicsWorldManifoldWrapper.h %(creatordir)s/physics/CCPhysicsContactImpulse.h %(creatordir)s/CCCameraNode.h
|
||||
|
||||
cpp_headers = scripting/js-bindings/manual/box2d/js_bindings_box2d_manual.h
|
||||
|
||||
@@ -34,7 +34,7 @@ replace_headers = CCScale9Sprite.h::creator/CCScale9Sprite.h,CCGraphicsNode.h::c
|
||||
|
||||
# what classes to produce code for. You can use regular expressions here. When testing the regular
|
||||
# expression, it will be enclosed in "^$", like this: "^Menu*$".
|
||||
classes = Scale9SpriteV2 GraphicsNode PhysicsDebugDraw PhysicsUtils PhysicsContactListener PhysicsAABBQueryCallback PhysicsRayCastCallback CameraNode
|
||||
classes = Scale9SpriteV2 GraphicsNode PhysicsDebugDraw PhysicsUtils PhysicsContactListener PhysicsAABBQueryCallback PhysicsRayCastCallback PhysicsWorldManifoldWrapper PhysicsContactImpulse CameraNode
|
||||
|
||||
classes_need_extend = Scale9SpriteV2 GraphicsNode
|
||||
|
||||
@@ -47,9 +47,10 @@ classes_need_extend = Scale9SpriteV2 GraphicsNode
|
||||
|
||||
skip = PhysicsDebugDraw::[DrawPolygon DrawSolidPolygon DrawCircle DrawSolidCircle DrawSegment DrawTransform],
|
||||
PhysicsContactListener::[BeginContact EndContact PreSolve PostSolve setBeginContact setEndContact setPreSolve setPostSolve],
|
||||
PhysicsUtils::[getContactWorldManifold],
|
||||
PhysicsAABBQueryCallback::[ReportFixture getFixtures],
|
||||
PhysicsRayCastCallback::[ReportFixture getFixtures getNormals getPoints],
|
||||
PhysicsWorldManifoldWrapper::[init getb2WorldManifold],
|
||||
PhysicsContactImpulse::[init],
|
||||
CameraNode::[(.*)Visit]
|
||||
|
||||
rename_functions =
|
||||
|
||||
Reference in New Issue
Block a user