diff --git a/CMakeLists.txt b/CMakeLists.txt index 83acf01d5458..26c0cfebe540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,7 @@ endif() option(USE_CHIPMUNK "Use chipmunk for physics library" ON) option(USE_BOX2D "Use box2d for physics library" OFF) option(USE_BULLET "Use bullet for physics3d library" ON) +option(USE_RECAST "Use Recast for navigation mesh" ON) option(USE_WEBP "Use WebP codec" ${USE_WEBP_DEFAULT}) option(BUILD_SHARED_LIBS "Build shared libraries" OFF) option(DEBUG_MODE "Debug or release?" ON) @@ -267,6 +268,22 @@ else() add_definitions(-DCC_USE_3D_PHYSICS=0) endif(USE_BULLET) +# Recast (not prebuilded, exists as source) +if(USE_RECAST) + if(USE_PREBUILT_LIBS) + add_subdirectory(external/recast) + set(RECAST_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/recast) + set(RECAST_LIBRARIES recast) + else() + cocos_find_package(recast RECAST REQUIRED) + set(RECAST_LIBRARIES recast) + endif() + message(STATUS "Recast include dirs: ${RECAST_INCLUDE_DIRS}") + add_definitions(-DCC_USE_NAVMESH=1) +else() + add_definitions(-DCC_USE_NAVMESH=0) +endif(USE_RECAST) + # Tinyxml2 (not prebuilded, exists as source) if(USE_PREBUILT_LIBS) add_subdirectory(external/tinyxml2) diff --git a/build/cocos2d-js-win32.sln b/build/cocos2d-js-win32.sln index d07005a164a0..e425e0970acf 100644 --- a/build/cocos2d-js-win32.sln +++ b/build/cocos2d-js-win32.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +VisualStudioVersion = 12.0.21005.1 MinimumVisualStudioVersion = 12.0.21005.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" EndProject @@ -16,6 +16,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "js-tests", "..\tests\js-tes EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\external\bullet\proj.win32\libbullet.vcxproj", "{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast", "..\external\recast\proj.win32\librecast.vcxproj", "{41E34993-647E-4282-8384-4AB1AE31A452}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM = Debug|ARM @@ -60,6 +62,12 @@ Global {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|ARM.ActiveCfg = Release|Win32 {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.ActiveCfg = Release|Win32 {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.Build.0 = Release|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|ARM.ActiveCfg = Debug|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.ActiveCfg = Debug|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.Build.0 = Debug|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Release|ARM.ActiveCfg = Release|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.ActiveCfg = Release|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -68,6 +76,7 @@ Global {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {92D54E36-7916-48EF-A951-224DD3B25442} {929480E7-23C0-4DF6-8456-096D71547116} = {92D54E36-7916-48EF-A951-224DD3B25442} {012DFF48-A13F-4F52-B07B-F8B9D21CE95B} = {92D54E36-7916-48EF-A951-224DD3B25442} + {41E34993-647E-4282-8384-4AB1AE31A452} = {92D54E36-7916-48EF-A951-224DD3B25442} EndGlobalSection GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} diff --git a/build/cocos2d-js-win8.1-universal.sln b/build/cocos2d-js-win8.1-universal.sln index 0b34f599a921..fdc72dcf64b5 100644 --- a/build/cocos2d-js-win8.1-universal.sln +++ b/build/cocos2d-js-win8.1-universal.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 +VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 12.0.21005.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libcocos2d", "libcocos2d", "{B3F299D4-B4CA-4F0B-8BE2-FB328483BC13}" EndProject @@ -53,14 +53,24 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.Windows", "..\ext EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.WindowsPhone", "..\external\bullet\proj.win8.1-universal\libbullet.WindowsPhone\libbullet.WindowsPhone.vcxproj", "{E35634BD-B91B-4A6D-B957-96F56DD065F9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "librecast", "librecast", "{B8419273-177E-467D-AE4F-002BFDF050BF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast.Shared", "..\external\recast\proj.win8.1-universal\librecast.Shared\librecast.Shared.vcxitems", "{F39A11FB-0D36-4B0A-91F1-345F1F0C9AA9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast.Windows", "..\external\recast\proj.win8.1-universal\librecast.Windows\librecast.Windows.vcxproj", "{19E35654-A3EC-48FA-BB21-082A2356C87C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast.WindowsPhone", "..\external\recast\proj.win8.1-universal\librecast.WindowsPhone\librecast.WindowsPhone.vcxproj", "{D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution ..\tests\js-tests\project\proj.win8.1-universal\App.Shared\js-tests.Shared.vcxitems*{ae6763f6-1549-441e-afb5-377be1c776dc}*SharedItemsImports = 9 ..\tests\js-tests\project\proj.win8.1-universal\App.Shared\js-tests.Shared.vcxitems*{94874b5b-398f-448a-a366-35a35dc1db9c}*SharedItemsImports = 4 ..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{9335005f-678e-4e8e-9b84-50037216aec8}*SharedItemsImports = 4 + ..\external\recast\proj.win8.1-universal\librecast.Shared\librecast.Shared.vcxitems*{19e35654-a3ec-48fa-bb21-082a2356c87c}*SharedItemsImports = 4 ..\tests\js-tests\project\proj.win8.1-universal\App.Shared\js-tests.Shared.vcxitems*{70914fc8-7709-4cd6-b86b-c63fde5478db}*SharedItemsImports = 4 ..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{cc1da216-a80d-4be4-b309-acb6af313aff}*SharedItemsImports = 4 ..\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{4a3c6ba8-c227-498b-aa21-40bda27b461f}*SharedItemsImports = 9 + ..\external\recast\proj.win8.1-universal\librecast.Shared\librecast.Shared.vcxitems*{f39a11fb-0d36-4b0a-91f1-345f1f0c9aa9}*SharedItemsImports = 9 ..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{e35634bd-b91b-4a6d-b957-96f56dd065f9}*SharedItemsImports = 4 ..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{ec2b1292-2d8c-4feb-a84b-2550b32c1ae7}*SharedItemsImports = 4 ..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{adafd00d-a0d6-46ef-9f0b-ea2880bfe1de}*SharedItemsImports = 9 @@ -73,6 +83,7 @@ Global ..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{22f3b9df-1209-4574-8331-003966f562bf}*SharedItemsImports = 4 ..\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{22f798d8-bfff-4754-996f-a5395343d5ec}*SharedItemsImports = 4 ..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{f3550fe0-c795-44f6-8feb-093eb68143ae}*SharedItemsImports = 4 + ..\external\recast\proj.win8.1-universal\librecast.Shared\librecast.Shared.vcxitems*{d3bcfc1a-94bd-43b7-9c15-3f48ac6a9fac}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM = Debug|ARM @@ -225,6 +236,28 @@ Global {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.ActiveCfg = Release|Win32 {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.Build.0 = Release|Win32 {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|x64.ActiveCfg = Release|Win32 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|ARM.ActiveCfg = Debug|ARM + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|ARM.Build.0 = Debug|ARM + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|Win32.ActiveCfg = Debug|Win32 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|Win32.Build.0 = Debug|Win32 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|x64.ActiveCfg = Debug|x64 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|x64.Build.0 = Debug|x64 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|ARM.ActiveCfg = Release|ARM + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|ARM.Build.0 = Release|ARM + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|Win32.ActiveCfg = Release|Win32 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|Win32.Build.0 = Release|Win32 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|x64.ActiveCfg = Release|x64 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|x64.Build.0 = Release|x64 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Debug|ARM.ActiveCfg = Debug|ARM + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Debug|ARM.Build.0 = Debug|ARM + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Debug|Win32.Build.0 = Debug|Win32 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Debug|x64.ActiveCfg = Debug|Win32 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Release|ARM.ActiveCfg = Release|ARM + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Release|ARM.Build.0 = Release|ARM + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Release|Win32.ActiveCfg = Release|Win32 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Release|Win32.Build.0 = Release|Win32 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -251,5 +284,9 @@ Global {16AF311F-74CA-45A3-A82D-6334200FB124} = {9A66AB4C-057B-4675-849D-5D69B98C728C} {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7} = {9A66AB4C-057B-4675-849D-5D69B98C728C} {E35634BD-B91B-4A6D-B957-96F56DD065F9} = {9A66AB4C-057B-4675-849D-5D69B98C728C} + {B8419273-177E-467D-AE4F-002BFDF050BF} = {85630454-74EA-4B5B-9B62-0E459B4476CB} + {F39A11FB-0D36-4B0A-91F1-345F1F0C9AA9} = {B8419273-177E-467D-AE4F-002BFDF050BF} + {19E35654-A3EC-48FA-BB21-082A2356C87C} = {B8419273-177E-467D-AE4F-002BFDF050BF} + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC} = {B8419273-177E-467D-AE4F-002BFDF050BF} EndGlobalSection EndGlobal diff --git a/build/cocos2d-win32.sln b/build/cocos2d-win32.sln index bf1f8bb66ae2..0e4094696eec 100644 --- a/build/cocos2d-win32.sln +++ b/build/cocos2d-win32.sln @@ -1,7 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 # Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 12.0.21005.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win32\cpp-tests.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}" EndProject @@ -26,6 +25,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\external\Box EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\external\bullet\proj.win32\libbullet.vcxproj", "{012DFF48-A13F-4F52-B07B-F8B9D21CE95B}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast", "..\external\recast\proj.win32\librecast.vcxproj", "{41E34993-647E-4282-8384-4AB1AE31A452}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM = Debug|ARM @@ -88,6 +89,12 @@ Global {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|ARM.ActiveCfg = Release|Win32 {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.ActiveCfg = Release|Win32 {012DFF48-A13F-4F52-B07B-F8B9D21CE95B}.Release|Win32.Build.0 = Release|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|ARM.ActiveCfg = Debug|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.ActiveCfg = Debug|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Debug|Win32.Build.0 = Debug|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Release|ARM.ActiveCfg = Release|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.ActiveCfg = Release|Win32 + {41E34993-647E-4282-8384-4AB1AE31A452}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -96,6 +103,7 @@ Global {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {92D54E36-7916-48EF-A951-224DD3B25442} {929480E7-23C0-4DF6-8456-096D71547116} = {92D54E36-7916-48EF-A951-224DD3B25442} {012DFF48-A13F-4F52-B07B-F8B9D21CE95B} = {92D54E36-7916-48EF-A951-224DD3B25442} + {41E34993-647E-4282-8384-4AB1AE31A452} = {92D54E36-7916-48EF-A951-224DD3B25442} EndGlobalSection GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} diff --git a/build/cocos2d-win8.1-universal.sln b/build/cocos2d-win8.1-universal.sln index e850e1c54210..e1b039a300e3 100644 --- a/build/cocos2d-win8.1-universal.sln +++ b/build/cocos2d-win8.1-universal.sln @@ -53,13 +53,23 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.Windows", "..\ext EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet.WindowsPhone", "..\external\bullet\proj.win8.1-universal\libbullet.WindowsPhone\libbullet.WindowsPhone.vcxproj", "{E35634BD-B91B-4A6D-B957-96F56DD065F9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "librecast", "librecast", "{F07894BD-4919-4C5F-9CCD-1B8168466573}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast.Shared", "..\external\recast\proj.win8.1-universal\librecast.Shared\librecast.Shared.vcxitems", "{F39A11FB-0D36-4B0A-91F1-345F1F0C9AA9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast.Windows", "..\external\recast\proj.win8.1-universal\librecast.Windows\librecast.Windows.vcxproj", "{19E35654-A3EC-48FA-BB21-082A2356C87C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "librecast.WindowsPhone", "..\external\recast\proj.win8.1-universal\librecast.WindowsPhone\librecast.WindowsPhone.vcxproj", "{D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution ..\cocos\2d\libcocos2d_8_1\libcocos2d_8_1\libcocos2d_8_1.Shared\libcocos2d_8_1.Shared.vcxitems*{9335005f-678e-4e8e-9b84-50037216aec8}*SharedItemsImports = 4 ..\tests\cpp-tests\proj.win8.1-universal\cpp-tests.Shared\cpp-tests.Shared.vcxitems*{15247c71-5289-4913-b88f-e253cc353720}*SharedItemsImports = 4 + ..\external\recast\proj.win8.1-universal\librecast.Shared\librecast.Shared.vcxitems*{19e35654-a3ec-48fa-bb21-082a2356c87c}*SharedItemsImports = 4 ..\tests\cpp-empty-test\proj.win8.1-universal\HelloCpp.Shared\HelloCpp.Shared.vcxitems*{a3ad93e4-0b2f-4c58-9181-69bed2e42e3e}*SharedItemsImports = 9 ..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{cc1da216-a80d-4be4-b309-acb6af313aff}*SharedItemsImports = 4 ..\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{4a3c6ba8-c227-498b-aa21-40bda27b461f}*SharedItemsImports = 9 + ..\external\recast\proj.win8.1-universal\librecast.Shared\librecast.Shared.vcxitems*{f39a11fb-0d36-4b0a-91f1-345f1f0c9aa9}*SharedItemsImports = 9 ..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{e35634bd-b91b-4a6d-b957-96f56dd065f9}*SharedItemsImports = 4 ..\tests\cpp-empty-test\proj.win8.1-universal\HelloCpp.Shared\HelloCpp.Shared.vcxitems*{79a8fcda-4b12-4dd1-b676-ff148d651638}*SharedItemsImports = 4 ..\external\bullet\proj.win8.1-universal\libbullet.Shared\libbullet.Shared.vcxitems*{ec2b1292-2d8c-4feb-a84b-2550b32c1ae7}*SharedItemsImports = 4 @@ -72,6 +82,7 @@ Global ..\external\Box2D\proj.win8.1-universal\libbox2d.Shared\libbox2d.Shared.vcxitems*{22f798d8-bfff-4754-996f-a5395343d5ec}*SharedItemsImports = 4 ..\cocos\editor-support\spine\proj.win8.1-universal\libSpine.Shared\libSpine.Shared.vcxitems*{f3550fe0-c795-44f6-8feb-093eb68143ae}*SharedItemsImports = 4 ..\tests\cpp-tests\proj.win8.1-universal\cpp-tests.Shared\cpp-tests.Shared.vcxitems*{f2bae06b-caae-43ee-b21b-57fa48db04fa}*SharedItemsImports = 4 + ..\external\recast\proj.win8.1-universal\librecast.Shared\librecast.Shared.vcxitems*{d3bcfc1a-94bd-43b7-9c15-3f48ac6a9fac}*SharedItemsImports = 4 ..\tests\cpp-empty-test\proj.win8.1-universal\HelloCpp.Shared\HelloCpp.Shared.vcxitems*{396fe85e-bb05-4b92-bccb-f89aed4ea41a}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -235,6 +246,28 @@ Global {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.ActiveCfg = Release|Win32 {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|Win32.Build.0 = Release|Win32 {E35634BD-B91B-4A6D-B957-96F56DD065F9}.Release|x64.ActiveCfg = Release|Win32 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|ARM.ActiveCfg = Debug|ARM + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|ARM.Build.0 = Debug|ARM + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|Win32.ActiveCfg = Debug|Win32 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|Win32.Build.0 = Debug|Win32 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|x64.ActiveCfg = Debug|x64 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Debug|x64.Build.0 = Debug|x64 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|ARM.ActiveCfg = Release|ARM + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|ARM.Build.0 = Release|ARM + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|Win32.ActiveCfg = Release|Win32 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|Win32.Build.0 = Release|Win32 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|x64.ActiveCfg = Release|x64 + {19E35654-A3EC-48FA-BB21-082A2356C87C}.Release|x64.Build.0 = Release|x64 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Debug|ARM.ActiveCfg = Debug|ARM + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Debug|ARM.Build.0 = Debug|ARM + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Debug|Win32.Build.0 = Debug|Win32 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Debug|x64.ActiveCfg = Debug|Win32 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Release|ARM.ActiveCfg = Release|ARM + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Release|ARM.Build.0 = Release|ARM + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Release|Win32.ActiveCfg = Release|Win32 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Release|Win32.Build.0 = Release|Win32 + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -261,5 +294,9 @@ Global {16AF311F-74CA-45A3-A82D-6334200FB124} = {0500043C-7E95-4351-97D6-0382A8C92DD3} {EC2B1292-2D8C-4FEB-A84B-2550B32C1AE7} = {0500043C-7E95-4351-97D6-0382A8C92DD3} {E35634BD-B91B-4A6D-B957-96F56DD065F9} = {0500043C-7E95-4351-97D6-0382A8C92DD3} + {F07894BD-4919-4C5F-9CCD-1B8168466573} = {85630454-74EA-4B5B-9B62-0E459B4476CB} + {F39A11FB-0D36-4B0A-91F1-345F1F0C9AA9} = {F07894BD-4919-4C5F-9CCD-1B8168466573} + {19E35654-A3EC-48FA-BB21-082A2356C87C} = {F07894BD-4919-4C5F-9CCD-1B8168466573} + {D3BCFC1A-94BD-43B7-9C15-3F48AC6A9FAC} = {F07894BD-4919-4C5F-9CCD-1B8168466573} EndGlobalSection EndGlobal diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index ec849ddbd479..d029cef82f2b 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -2613,6 +2613,26 @@ B665E43B1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B665E1F01AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.cpp */; }; B665E43C1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1F11AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.h */; }; B665E43D1AA80A6600DDB1C5 /* CCPUVortexAffectorTranslator.h in Headers */ = {isa = PBXBuildFile; fileRef = B665E1F11AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.h */; }; + B677B0C91B18492D006762CB /* CCNavMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0BF1B18492D006762CB /* CCNavMesh.cpp */; }; + B677B0CA1B18492D006762CB /* CCNavMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0BF1B18492D006762CB /* CCNavMesh.cpp */; }; + B677B0CB1B18492D006762CB /* CCNavMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C01B18492D006762CB /* CCNavMesh.h */; }; + B677B0CC1B18492D006762CB /* CCNavMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C01B18492D006762CB /* CCNavMesh.h */; }; + B677B0CD1B18492D006762CB /* CCNavMeshAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C11B18492D006762CB /* CCNavMeshAgent.cpp */; }; + B677B0CE1B18492D006762CB /* CCNavMeshAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C11B18492D006762CB /* CCNavMeshAgent.cpp */; }; + B677B0CF1B18492D006762CB /* CCNavMeshAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C21B18492D006762CB /* CCNavMeshAgent.h */; }; + B677B0D01B18492D006762CB /* CCNavMeshAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C21B18492D006762CB /* CCNavMeshAgent.h */; }; + B677B0D11B18492D006762CB /* CCNavMeshDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C31B18492D006762CB /* CCNavMeshDebugDraw.cpp */; }; + B677B0D21B18492D006762CB /* CCNavMeshDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C31B18492D006762CB /* CCNavMeshDebugDraw.cpp */; }; + B677B0D31B18492D006762CB /* CCNavMeshDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C41B18492D006762CB /* CCNavMeshDebugDraw.h */; }; + B677B0D41B18492D006762CB /* CCNavMeshDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C41B18492D006762CB /* CCNavMeshDebugDraw.h */; }; + B677B0D51B18492D006762CB /* CCNavMeshObstacle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C51B18492D006762CB /* CCNavMeshObstacle.cpp */; }; + B677B0D61B18492D006762CB /* CCNavMeshObstacle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C51B18492D006762CB /* CCNavMeshObstacle.cpp */; }; + B677B0D71B18492D006762CB /* CCNavMeshObstacle.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C61B18492D006762CB /* CCNavMeshObstacle.h */; }; + B677B0D81B18492D006762CB /* CCNavMeshObstacle.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C61B18492D006762CB /* CCNavMeshObstacle.h */; }; + B677B0D91B18492D006762CB /* CCNavMeshUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C71B18492D006762CB /* CCNavMeshUtils.cpp */; }; + B677B0DA1B18492D006762CB /* CCNavMeshUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B677B0C71B18492D006762CB /* CCNavMeshUtils.cpp */; }; + B677B0DB1B18492D006762CB /* CCNavMeshUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C81B18492D006762CB /* CCNavMeshUtils.h */; }; + B677B0DC1B18492D006762CB /* CCNavMeshUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = B677B0C81B18492D006762CB /* CCNavMeshUtils.h */; }; B68778F81A8CA82E00643ABF /* CCParticle3DAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F01A8CA82E00643ABF /* CCParticle3DAffector.cpp */; }; B68778F91A8CA82E00643ABF /* CCParticle3DAffector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B68778F01A8CA82E00643ABF /* CCParticle3DAffector.cpp */; }; B68778FA1A8CA82E00643ABF /* CCParticle3DAffector.h in Headers */ = {isa = PBXBuildFile; fileRef = B68778F11A8CA82E00643ABF /* CCParticle3DAffector.h */; }; @@ -3463,6 +3483,88 @@ B6D38B8F1AC3AFAC00043997 /* CCTextureCube.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6D38B881AC3AFAC00043997 /* CCTextureCube.cpp */; }; B6D38B901AC3AFAC00043997 /* CCTextureCube.h in Headers */ = {isa = PBXBuildFile; fileRef = B6D38B891AC3AFAC00043997 /* CCTextureCube.h */; }; B6D38B911AC3AFAC00043997 /* CCTextureCube.h in Headers */ = {isa = PBXBuildFile; fileRef = B6D38B891AC3AFAC00043997 /* CCTextureCube.h */; }; + B6DD2FA71B04825B00E47F5F /* DebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F7A1B04825B00E47F5F /* DebugDraw.cpp */; }; + B6DD2FA81B04825B00E47F5F /* DebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F7A1B04825B00E47F5F /* DebugDraw.cpp */; }; + B6DD2FA91B04825B00E47F5F /* DebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F7B1B04825B00E47F5F /* DebugDraw.h */; }; + B6DD2FAA1B04825B00E47F5F /* DebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F7B1B04825B00E47F5F /* DebugDraw.h */; }; + B6DD2FAB1B04825B00E47F5F /* DetourDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F7C1B04825B00E47F5F /* DetourDebugDraw.cpp */; }; + B6DD2FAC1B04825B00E47F5F /* DetourDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F7C1B04825B00E47F5F /* DetourDebugDraw.cpp */; }; + B6DD2FAD1B04825B00E47F5F /* DetourDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F7D1B04825B00E47F5F /* DetourDebugDraw.h */; }; + B6DD2FAE1B04825B00E47F5F /* DetourDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F7D1B04825B00E47F5F /* DetourDebugDraw.h */; }; + B6DD2FAF1B04825B00E47F5F /* RecastDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F7E1B04825B00E47F5F /* RecastDebugDraw.cpp */; }; + B6DD2FB01B04825B00E47F5F /* RecastDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F7E1B04825B00E47F5F /* RecastDebugDraw.cpp */; }; + B6DD2FB11B04825B00E47F5F /* RecastDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F7F1B04825B00E47F5F /* RecastDebugDraw.h */; }; + B6DD2FB21B04825B00E47F5F /* RecastDebugDraw.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F7F1B04825B00E47F5F /* RecastDebugDraw.h */; }; + B6DD2FB31B04825B00E47F5F /* RecastDump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F801B04825B00E47F5F /* RecastDump.cpp */; }; + B6DD2FB41B04825B00E47F5F /* RecastDump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F801B04825B00E47F5F /* RecastDump.cpp */; }; + B6DD2FB51B04825B00E47F5F /* RecastDump.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F811B04825B00E47F5F /* RecastDump.h */; }; + B6DD2FB61B04825B00E47F5F /* RecastDump.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F811B04825B00E47F5F /* RecastDump.h */; }; + B6DD2FB71B04825B00E47F5F /* DetourAlloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F831B04825B00E47F5F /* DetourAlloc.cpp */; }; + B6DD2FB81B04825B00E47F5F /* DetourAlloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F831B04825B00E47F5F /* DetourAlloc.cpp */; }; + B6DD2FB91B04825B00E47F5F /* DetourAlloc.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F841B04825B00E47F5F /* DetourAlloc.h */; }; + B6DD2FBA1B04825B00E47F5F /* DetourAlloc.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F841B04825B00E47F5F /* DetourAlloc.h */; }; + B6DD2FBB1B04825B00E47F5F /* DetourAssert.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F851B04825B00E47F5F /* DetourAssert.h */; }; + B6DD2FBC1B04825B00E47F5F /* DetourAssert.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F851B04825B00E47F5F /* DetourAssert.h */; }; + B6DD2FBD1B04825B00E47F5F /* DetourCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F861B04825B00E47F5F /* DetourCommon.cpp */; }; + B6DD2FBE1B04825B00E47F5F /* DetourCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F861B04825B00E47F5F /* DetourCommon.cpp */; }; + B6DD2FBF1B04825B00E47F5F /* DetourCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F871B04825B00E47F5F /* DetourCommon.h */; }; + B6DD2FC01B04825B00E47F5F /* DetourCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F871B04825B00E47F5F /* DetourCommon.h */; }; + B6DD2FC11B04825B00E47F5F /* DetourMath.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F881B04825B00E47F5F /* DetourMath.h */; }; + B6DD2FC21B04825B00E47F5F /* DetourMath.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F881B04825B00E47F5F /* DetourMath.h */; }; + B6DD2FC31B04825B00E47F5F /* DetourNavMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F891B04825B00E47F5F /* DetourNavMesh.cpp */; }; + B6DD2FC41B04825B00E47F5F /* DetourNavMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F891B04825B00E47F5F /* DetourNavMesh.cpp */; }; + B6DD2FC51B04825B00E47F5F /* DetourNavMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F8A1B04825B00E47F5F /* DetourNavMesh.h */; }; + B6DD2FC61B04825B00E47F5F /* DetourNavMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F8A1B04825B00E47F5F /* DetourNavMesh.h */; }; + B6DD2FC71B04825B00E47F5F /* DetourNavMeshBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F8B1B04825B00E47F5F /* DetourNavMeshBuilder.cpp */; }; + B6DD2FC81B04825B00E47F5F /* DetourNavMeshBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F8B1B04825B00E47F5F /* DetourNavMeshBuilder.cpp */; }; + B6DD2FC91B04825B00E47F5F /* DetourNavMeshBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F8C1B04825B00E47F5F /* DetourNavMeshBuilder.h */; }; + B6DD2FCA1B04825B00E47F5F /* DetourNavMeshBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F8C1B04825B00E47F5F /* DetourNavMeshBuilder.h */; }; + B6DD2FCB1B04825B00E47F5F /* DetourNavMeshQuery.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F8D1B04825B00E47F5F /* DetourNavMeshQuery.cpp */; }; + B6DD2FCC1B04825B00E47F5F /* DetourNavMeshQuery.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F8D1B04825B00E47F5F /* DetourNavMeshQuery.cpp */; }; + B6DD2FCD1B04825B00E47F5F /* DetourNavMeshQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F8E1B04825B00E47F5F /* DetourNavMeshQuery.h */; }; + B6DD2FCE1B04825B00E47F5F /* DetourNavMeshQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F8E1B04825B00E47F5F /* DetourNavMeshQuery.h */; }; + B6DD2FCF1B04825B00E47F5F /* DetourNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F8F1B04825B00E47F5F /* DetourNode.cpp */; }; + B6DD2FD01B04825B00E47F5F /* DetourNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F8F1B04825B00E47F5F /* DetourNode.cpp */; }; + B6DD2FD11B04825B00E47F5F /* DetourNode.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F901B04825B00E47F5F /* DetourNode.h */; }; + B6DD2FD21B04825B00E47F5F /* DetourNode.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F901B04825B00E47F5F /* DetourNode.h */; }; + B6DD2FD31B04825B00E47F5F /* DetourStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F911B04825B00E47F5F /* DetourStatus.h */; }; + B6DD2FD41B04825B00E47F5F /* DetourStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F911B04825B00E47F5F /* DetourStatus.h */; }; + B6DD2FD51B04825B00E47F5F /* DetourCrowd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F931B04825B00E47F5F /* DetourCrowd.cpp */; }; + B6DD2FD61B04825B00E47F5F /* DetourCrowd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F931B04825B00E47F5F /* DetourCrowd.cpp */; }; + B6DD2FD71B04825B00E47F5F /* DetourCrowd.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F941B04825B00E47F5F /* DetourCrowd.h */; }; + B6DD2FD81B04825B00E47F5F /* DetourCrowd.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F941B04825B00E47F5F /* DetourCrowd.h */; }; + B6DD2FD91B04825B00E47F5F /* DetourLocalBoundary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F951B04825B00E47F5F /* DetourLocalBoundary.cpp */; }; + B6DD2FDA1B04825B00E47F5F /* DetourLocalBoundary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F951B04825B00E47F5F /* DetourLocalBoundary.cpp */; }; + B6DD2FDB1B04825B00E47F5F /* DetourLocalBoundary.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F961B04825B00E47F5F /* DetourLocalBoundary.h */; }; + B6DD2FDC1B04825B00E47F5F /* DetourLocalBoundary.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F961B04825B00E47F5F /* DetourLocalBoundary.h */; }; + B6DD2FDD1B04825B00E47F5F /* DetourObstacleAvoidance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F971B04825B00E47F5F /* DetourObstacleAvoidance.cpp */; }; + B6DD2FDE1B04825B00E47F5F /* DetourObstacleAvoidance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F971B04825B00E47F5F /* DetourObstacleAvoidance.cpp */; }; + B6DD2FDF1B04825B00E47F5F /* DetourObstacleAvoidance.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F981B04825B00E47F5F /* DetourObstacleAvoidance.h */; }; + B6DD2FE01B04825B00E47F5F /* DetourObstacleAvoidance.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F981B04825B00E47F5F /* DetourObstacleAvoidance.h */; }; + B6DD2FE11B04825B00E47F5F /* DetourPathCorridor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F991B04825B00E47F5F /* DetourPathCorridor.cpp */; }; + B6DD2FE21B04825B00E47F5F /* DetourPathCorridor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F991B04825B00E47F5F /* DetourPathCorridor.cpp */; }; + B6DD2FE31B04825B00E47F5F /* DetourPathCorridor.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F9A1B04825B00E47F5F /* DetourPathCorridor.h */; }; + B6DD2FE41B04825B00E47F5F /* DetourPathCorridor.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F9A1B04825B00E47F5F /* DetourPathCorridor.h */; }; + B6DD2FE51B04825B00E47F5F /* DetourPathQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F9B1B04825B00E47F5F /* DetourPathQueue.cpp */; }; + B6DD2FE61B04825B00E47F5F /* DetourPathQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F9B1B04825B00E47F5F /* DetourPathQueue.cpp */; }; + B6DD2FE71B04825B00E47F5F /* DetourPathQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F9C1B04825B00E47F5F /* DetourPathQueue.h */; }; + B6DD2FE81B04825B00E47F5F /* DetourPathQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F9C1B04825B00E47F5F /* DetourPathQueue.h */; }; + B6DD2FE91B04825B00E47F5F /* DetourProximityGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F9D1B04825B00E47F5F /* DetourProximityGrid.cpp */; }; + B6DD2FEA1B04825B00E47F5F /* DetourProximityGrid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2F9D1B04825B00E47F5F /* DetourProximityGrid.cpp */; }; + B6DD2FEB1B04825B00E47F5F /* DetourProximityGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F9E1B04825B00E47F5F /* DetourProximityGrid.h */; }; + B6DD2FEC1B04825B00E47F5F /* DetourProximityGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2F9E1B04825B00E47F5F /* DetourProximityGrid.h */; }; + B6DD2FED1B04825B00E47F5F /* DetourTileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FA01B04825B00E47F5F /* DetourTileCache.cpp */; }; + B6DD2FEE1B04825B00E47F5F /* DetourTileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FA01B04825B00E47F5F /* DetourTileCache.cpp */; }; + B6DD2FEF1B04825B00E47F5F /* DetourTileCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2FA11B04825B00E47F5F /* DetourTileCache.h */; }; + B6DD2FF01B04825B00E47F5F /* DetourTileCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2FA11B04825B00E47F5F /* DetourTileCache.h */; }; + B6DD2FF11B04825B00E47F5F /* DetourTileCacheBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FA21B04825B00E47F5F /* DetourTileCacheBuilder.cpp */; }; + B6DD2FF21B04825B00E47F5F /* DetourTileCacheBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FA21B04825B00E47F5F /* DetourTileCacheBuilder.cpp */; }; + B6DD2FF31B04825B00E47F5F /* DetourTileCacheBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2FA31B04825B00E47F5F /* DetourTileCacheBuilder.h */; }; + B6DD2FF41B04825B00E47F5F /* DetourTileCacheBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2FA31B04825B00E47F5F /* DetourTileCacheBuilder.h */; }; + B6DD2FF51B04825B00E47F5F /* fastlz.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FA51B04825B00E47F5F /* fastlz.c */; }; + B6DD2FF61B04825B00E47F5F /* fastlz.c in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FA51B04825B00E47F5F /* fastlz.c */; }; + B6DD2FF71B04825B00E47F5F /* fastlz.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2FA61B04825B00E47F5F /* fastlz.h */; }; + B6DD2FF81B04825B00E47F5F /* fastlz.h in Headers */ = {isa = PBXBuildFile; fileRef = B6DD2FA61B04825B00E47F5F /* fastlz.h */; }; D0FD03491A3B51AA00825BB5 /* CCAllocatorBase.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD033B1A3B51AA00825BB5 /* CCAllocatorBase.h */; }; D0FD034A1A3B51AA00825BB5 /* CCAllocatorBase.h in Headers */ = {isa = PBXBuildFile; fileRef = D0FD033B1A3B51AA00825BB5 /* CCAllocatorBase.h */; }; D0FD034B1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FD033C1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp */; }; @@ -4898,6 +5000,16 @@ B665E1EF1AA80A6500DDB1C5 /* CCPUVortexAffector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUVortexAffector.h; path = Particle3D/PU/CCPUVortexAffector.h; sourceTree = ""; }; B665E1F01AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCPUVortexAffectorTranslator.cpp; path = Particle3D/PU/CCPUVortexAffectorTranslator.cpp; sourceTree = ""; }; B665E1F11AA80A6500DDB1C5 /* CCPUVortexAffectorTranslator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCPUVortexAffectorTranslator.h; path = Particle3D/PU/CCPUVortexAffectorTranslator.h; sourceTree = ""; }; + B677B0BF1B18492D006762CB /* CCNavMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNavMesh.cpp; path = ../cocos/navmesh/CCNavMesh.cpp; sourceTree = ""; }; + B677B0C01B18492D006762CB /* CCNavMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNavMesh.h; path = ../cocos/navmesh/CCNavMesh.h; sourceTree = ""; }; + B677B0C11B18492D006762CB /* CCNavMeshAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNavMeshAgent.cpp; path = ../cocos/navmesh/CCNavMeshAgent.cpp; sourceTree = ""; }; + B677B0C21B18492D006762CB /* CCNavMeshAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNavMeshAgent.h; path = ../cocos/navmesh/CCNavMeshAgent.h; sourceTree = ""; }; + B677B0C31B18492D006762CB /* CCNavMeshDebugDraw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNavMeshDebugDraw.cpp; path = ../cocos/navmesh/CCNavMeshDebugDraw.cpp; sourceTree = ""; }; + B677B0C41B18492D006762CB /* CCNavMeshDebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNavMeshDebugDraw.h; path = ../cocos/navmesh/CCNavMeshDebugDraw.h; sourceTree = ""; }; + B677B0C51B18492D006762CB /* CCNavMeshObstacle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNavMeshObstacle.cpp; path = ../cocos/navmesh/CCNavMeshObstacle.cpp; sourceTree = ""; }; + B677B0C61B18492D006762CB /* CCNavMeshObstacle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNavMeshObstacle.h; path = ../cocos/navmesh/CCNavMeshObstacle.h; sourceTree = ""; }; + B677B0C71B18492D006762CB /* CCNavMeshUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCNavMeshUtils.cpp; path = ../cocos/navmesh/CCNavMeshUtils.cpp; sourceTree = ""; }; + B677B0C81B18492D006762CB /* CCNavMeshUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCNavMeshUtils.h; path = ../cocos/navmesh/CCNavMeshUtils.h; sourceTree = ""; }; B67C624319D4186F00F11FC6 /* ccShader_3D_ColorNormal.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_ColorNormal.frag; sourceTree = ""; }; B67C624419D4186F00F11FC6 /* ccShader_3D_ColorNormalTex.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_ColorNormalTex.frag; sourceTree = ""; }; B67C624519D4186F00F11FC6 /* ccShader_3D_PositionNormalTex.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_PositionNormalTex.vert; sourceTree = ""; }; @@ -5330,6 +5442,47 @@ B6D38B951AC3B45600043997 /* ccShader_3D_Particle.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Particle.vert; sourceTree = ""; }; B6D38B961AC3B45600043997 /* ccShader_3D_Skybox.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Skybox.frag; sourceTree = ""; }; B6D38B971AC3B45600043997 /* ccShader_3D_Skybox.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Skybox.vert; sourceTree = ""; }; + B6DD2F7A1B04825B00E47F5F /* DebugDraw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DebugDraw.cpp; sourceTree = ""; }; + B6DD2F7B1B04825B00E47F5F /* DebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebugDraw.h; sourceTree = ""; }; + B6DD2F7C1B04825B00E47F5F /* DetourDebugDraw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourDebugDraw.cpp; sourceTree = ""; }; + B6DD2F7D1B04825B00E47F5F /* DetourDebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourDebugDraw.h; sourceTree = ""; }; + B6DD2F7E1B04825B00E47F5F /* RecastDebugDraw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RecastDebugDraw.cpp; sourceTree = ""; }; + B6DD2F7F1B04825B00E47F5F /* RecastDebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecastDebugDraw.h; sourceTree = ""; }; + B6DD2F801B04825B00E47F5F /* RecastDump.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RecastDump.cpp; sourceTree = ""; }; + B6DD2F811B04825B00E47F5F /* RecastDump.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecastDump.h; sourceTree = ""; }; + B6DD2F831B04825B00E47F5F /* DetourAlloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourAlloc.cpp; sourceTree = ""; }; + B6DD2F841B04825B00E47F5F /* DetourAlloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourAlloc.h; sourceTree = ""; }; + B6DD2F851B04825B00E47F5F /* DetourAssert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourAssert.h; sourceTree = ""; }; + B6DD2F861B04825B00E47F5F /* DetourCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourCommon.cpp; sourceTree = ""; }; + B6DD2F871B04825B00E47F5F /* DetourCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourCommon.h; sourceTree = ""; }; + B6DD2F881B04825B00E47F5F /* DetourMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourMath.h; sourceTree = ""; }; + B6DD2F891B04825B00E47F5F /* DetourNavMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourNavMesh.cpp; sourceTree = ""; }; + B6DD2F8A1B04825B00E47F5F /* DetourNavMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourNavMesh.h; sourceTree = ""; }; + B6DD2F8B1B04825B00E47F5F /* DetourNavMeshBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourNavMeshBuilder.cpp; sourceTree = ""; }; + B6DD2F8C1B04825B00E47F5F /* DetourNavMeshBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourNavMeshBuilder.h; sourceTree = ""; }; + B6DD2F8D1B04825B00E47F5F /* DetourNavMeshQuery.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourNavMeshQuery.cpp; sourceTree = ""; }; + B6DD2F8E1B04825B00E47F5F /* DetourNavMeshQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourNavMeshQuery.h; sourceTree = ""; }; + B6DD2F8F1B04825B00E47F5F /* DetourNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourNode.cpp; sourceTree = ""; }; + B6DD2F901B04825B00E47F5F /* DetourNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourNode.h; sourceTree = ""; }; + B6DD2F911B04825B00E47F5F /* DetourStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourStatus.h; sourceTree = ""; }; + B6DD2F931B04825B00E47F5F /* DetourCrowd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourCrowd.cpp; sourceTree = ""; }; + B6DD2F941B04825B00E47F5F /* DetourCrowd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourCrowd.h; sourceTree = ""; }; + B6DD2F951B04825B00E47F5F /* DetourLocalBoundary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourLocalBoundary.cpp; sourceTree = ""; }; + B6DD2F961B04825B00E47F5F /* DetourLocalBoundary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourLocalBoundary.h; sourceTree = ""; }; + B6DD2F971B04825B00E47F5F /* DetourObstacleAvoidance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourObstacleAvoidance.cpp; sourceTree = ""; }; + B6DD2F981B04825B00E47F5F /* DetourObstacleAvoidance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourObstacleAvoidance.h; sourceTree = ""; }; + B6DD2F991B04825B00E47F5F /* DetourPathCorridor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourPathCorridor.cpp; sourceTree = ""; }; + B6DD2F9A1B04825B00E47F5F /* DetourPathCorridor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourPathCorridor.h; sourceTree = ""; }; + B6DD2F9B1B04825B00E47F5F /* DetourPathQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourPathQueue.cpp; sourceTree = ""; }; + B6DD2F9C1B04825B00E47F5F /* DetourPathQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourPathQueue.h; sourceTree = ""; }; + B6DD2F9D1B04825B00E47F5F /* DetourProximityGrid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourProximityGrid.cpp; sourceTree = ""; }; + B6DD2F9E1B04825B00E47F5F /* DetourProximityGrid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourProximityGrid.h; sourceTree = ""; }; + B6DD2FA01B04825B00E47F5F /* DetourTileCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourTileCache.cpp; sourceTree = ""; }; + B6DD2FA11B04825B00E47F5F /* DetourTileCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourTileCache.h; sourceTree = ""; }; + B6DD2FA21B04825B00E47F5F /* DetourTileCacheBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetourTileCacheBuilder.cpp; sourceTree = ""; }; + B6DD2FA31B04825B00E47F5F /* DetourTileCacheBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetourTileCacheBuilder.h; sourceTree = ""; }; + B6DD2FA51B04825B00E47F5F /* fastlz.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fastlz.c; sourceTree = ""; }; + B6DD2FA61B04825B00E47F5F /* fastlz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fastlz.h; sourceTree = ""; }; D0FD033B1A3B51AA00825BB5 /* CCAllocatorBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAllocatorBase.h; sourceTree = ""; }; D0FD033C1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCAllocatorDiagnostics.cpp; sourceTree = ""; }; D0FD033D1A3B51AA00825BB5 /* CCAllocatorDiagnostics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCAllocatorDiagnostics.h; sourceTree = ""; }; @@ -5436,6 +5589,7 @@ 1A57033E180BD0490088DEC7 /* external */, 1551A341158F2AB200E66CFE /* Frameworks */, 46A170851807CE87005B8026 /* math */, + B6DD2F351B04805400E47F5F /* navmesh */, 1AAF5360180E3374000584C8 /* network */, 46A170611807CE7A005B8026 /* physics */, B6CAAFD11AF9A98E00B9B856 /* physics3d */, @@ -5937,6 +6091,7 @@ 1A57033E180BD0490088DEC7 /* external */ = { isa = PBXGroup; children = ( + B6DD2F731B04820C00E47F5F /* recast */, B6CAB0021AF9A9EE00B9B856 /* bullet */, 15FB20781AE7C57D00C31518 /* poly2tri */, 382383E11A258FA7002C4610 /* flatbuffers */, @@ -8519,6 +8674,116 @@ path = MiniCLTask; sourceTree = ""; }; + B6DD2F351B04805400E47F5F /* navmesh */ = { + isa = PBXGroup; + children = ( + B677B0BF1B18492D006762CB /* CCNavMesh.cpp */, + B677B0C01B18492D006762CB /* CCNavMesh.h */, + B677B0C11B18492D006762CB /* CCNavMeshAgent.cpp */, + B677B0C21B18492D006762CB /* CCNavMeshAgent.h */, + B677B0C31B18492D006762CB /* CCNavMeshDebugDraw.cpp */, + B677B0C41B18492D006762CB /* CCNavMeshDebugDraw.h */, + B677B0C51B18492D006762CB /* CCNavMeshObstacle.cpp */, + B677B0C61B18492D006762CB /* CCNavMeshObstacle.h */, + B677B0C71B18492D006762CB /* CCNavMeshUtils.cpp */, + B677B0C81B18492D006762CB /* CCNavMeshUtils.h */, + ); + name = navmesh; + sourceTree = ""; + }; + B6DD2F731B04820C00E47F5F /* recast */ = { + isa = PBXGroup; + children = ( + B6DD2F791B04825B00E47F5F /* DebugUtils */, + B6DD2F821B04825B00E47F5F /* Detour */, + B6DD2F921B04825B00E47F5F /* DetourCrowd */, + B6DD2F9F1B04825B00E47F5F /* DetourTileCache */, + B6DD2FA41B04825B00E47F5F /* fastlz */, + ); + name = recast; + sourceTree = ""; + }; + B6DD2F791B04825B00E47F5F /* DebugUtils */ = { + isa = PBXGroup; + children = ( + B6DD2F7A1B04825B00E47F5F /* DebugDraw.cpp */, + B6DD2F7B1B04825B00E47F5F /* DebugDraw.h */, + B6DD2F7C1B04825B00E47F5F /* DetourDebugDraw.cpp */, + B6DD2F7D1B04825B00E47F5F /* DetourDebugDraw.h */, + B6DD2F7E1B04825B00E47F5F /* RecastDebugDraw.cpp */, + B6DD2F7F1B04825B00E47F5F /* RecastDebugDraw.h */, + B6DD2F801B04825B00E47F5F /* RecastDump.cpp */, + B6DD2F811B04825B00E47F5F /* RecastDump.h */, + ); + name = DebugUtils; + path = ../external/recast/DebugUtils; + sourceTree = ""; + }; + B6DD2F821B04825B00E47F5F /* Detour */ = { + isa = PBXGroup; + children = ( + B6DD2F831B04825B00E47F5F /* DetourAlloc.cpp */, + B6DD2F841B04825B00E47F5F /* DetourAlloc.h */, + B6DD2F851B04825B00E47F5F /* DetourAssert.h */, + B6DD2F861B04825B00E47F5F /* DetourCommon.cpp */, + B6DD2F871B04825B00E47F5F /* DetourCommon.h */, + B6DD2F881B04825B00E47F5F /* DetourMath.h */, + B6DD2F891B04825B00E47F5F /* DetourNavMesh.cpp */, + B6DD2F8A1B04825B00E47F5F /* DetourNavMesh.h */, + B6DD2F8B1B04825B00E47F5F /* DetourNavMeshBuilder.cpp */, + B6DD2F8C1B04825B00E47F5F /* DetourNavMeshBuilder.h */, + B6DD2F8D1B04825B00E47F5F /* DetourNavMeshQuery.cpp */, + B6DD2F8E1B04825B00E47F5F /* DetourNavMeshQuery.h */, + B6DD2F8F1B04825B00E47F5F /* DetourNode.cpp */, + B6DD2F901B04825B00E47F5F /* DetourNode.h */, + B6DD2F911B04825B00E47F5F /* DetourStatus.h */, + ); + name = Detour; + path = ../external/recast/Detour; + sourceTree = ""; + }; + B6DD2F921B04825B00E47F5F /* DetourCrowd */ = { + isa = PBXGroup; + children = ( + B6DD2F931B04825B00E47F5F /* DetourCrowd.cpp */, + B6DD2F941B04825B00E47F5F /* DetourCrowd.h */, + B6DD2F951B04825B00E47F5F /* DetourLocalBoundary.cpp */, + B6DD2F961B04825B00E47F5F /* DetourLocalBoundary.h */, + B6DD2F971B04825B00E47F5F /* DetourObstacleAvoidance.cpp */, + B6DD2F981B04825B00E47F5F /* DetourObstacleAvoidance.h */, + B6DD2F991B04825B00E47F5F /* DetourPathCorridor.cpp */, + B6DD2F9A1B04825B00E47F5F /* DetourPathCorridor.h */, + B6DD2F9B1B04825B00E47F5F /* DetourPathQueue.cpp */, + B6DD2F9C1B04825B00E47F5F /* DetourPathQueue.h */, + B6DD2F9D1B04825B00E47F5F /* DetourProximityGrid.cpp */, + B6DD2F9E1B04825B00E47F5F /* DetourProximityGrid.h */, + ); + name = DetourCrowd; + path = ../external/recast/DetourCrowd; + sourceTree = ""; + }; + B6DD2F9F1B04825B00E47F5F /* DetourTileCache */ = { + isa = PBXGroup; + children = ( + B6DD2FA01B04825B00E47F5F /* DetourTileCache.cpp */, + B6DD2FA11B04825B00E47F5F /* DetourTileCache.h */, + B6DD2FA21B04825B00E47F5F /* DetourTileCacheBuilder.cpp */, + B6DD2FA31B04825B00E47F5F /* DetourTileCacheBuilder.h */, + ); + name = DetourTileCache; + path = ../external/recast/DetourTileCache; + sourceTree = ""; + }; + B6DD2FA41B04825B00E47F5F /* fastlz */ = { + isa = PBXGroup; + children = ( + B6DD2FA51B04825B00E47F5F /* fastlz.c */, + B6DD2FA61B04825B00E47F5F /* fastlz.h */, + ); + name = fastlz; + path = ../external/recast/fastlz; + sourceTree = ""; + }; D0FD03391A3B51AA00825BB5 /* allocator */ = { isa = PBXGroup; children = ( @@ -8620,12 +8885,15 @@ 50ABBD3E1925AB0000A911A9 /* CCGeometry.h in Headers */, B6CAB34F1AF9AA1A00B9B856 /* gim_geom_types.h in Headers */, 15AE1A7719AAD40300C27E9E /* b2EdgeAndPolygonContact.h in Headers */, + B6DD2FD11B04825B00E47F5F /* DetourNode.h in Headers */, 15AE18F719AAD35000C27E9E /* CCBatchNode.h in Headers */, 15AE181419AAD2F700C27E9E /* CCAnimationCurve.h in Headers */, 50ABBE631925AB6F00A911A9 /* CCEventListenerAcceleration.h in Headers */, B665E4281AA80A6600DDB1C5 /* CCPUUtil.h in Headers */, B665E2601AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandlerTranslator.h in Headers */, 15AE1C1419AAE2C600C27E9E /* CCPhysicsSprite.h in Headers */, + B6DD2FE71B04825B00E47F5F /* DetourPathQueue.h in Headers */, + B6DD2FBB1B04825B00E47F5F /* DetourAssert.h in Headers */, 46A170EE1807CECA005B8026 /* CCPhysicsShape.h in Headers */, B6CAB3D91AF9AA1A00B9B856 /* btSolverBody.h in Headers */, 15AE1A5C19AAD40300C27E9E /* b2Timer.h in Headers */, @@ -8664,12 +8932,14 @@ B665E2841AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandler.h in Headers */, B6CAB52D1AF9AA1A00B9B856 /* btSerializer.h in Headers */, B665E3E01AA80A6600DDB1C5 /* CCPUSimpleSpline.h in Headers */, + B6DD2FAD1B04825B00E47F5F /* DetourDebugDraw.h in Headers */, B665E42C1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.h in Headers */, B665E3B41AA80A6500DDB1C5 /* CCPURendererTranslator.h in Headers */, B6CAAFF01AF9A9E100B9B856 /* CCPhysics3DDebugDrawer.h in Headers */, 1A57006B180BC5A10088DEC7 /* CCActionCatmullRom.h in Headers */, B665E3BC1AA80A6500DDB1C5 /* CCPURibbonTrailRender.h in Headers */, B6CAB3371AF9AA1A00B9B856 /* btQuantization.h in Headers */, + B677B0CB1B18492D006762CB /* CCNavMesh.h in Headers */, B6CAB4371AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedCode.h in Headers */, B665E2A81AA80A6500DDB1C5 /* CCPUEventHandlerTranslator.h in Headers */, 4D76BE3C1A4AAF0A00102962 /* CCActionTimelineNode.h in Headers */, @@ -8683,6 +8953,7 @@ 15AE1BD319AAE01E00C27E9E /* CCControlPotentiometer.h in Headers */, 15AE1B6E19AADA9900C27E9E /* UIHelper.h in Headers */, B230ED7319B417AE00364AA8 /* CCTrianglesCommand.h in Headers */, + B6DD2FB11B04825B00E47F5F /* RecastDebugDraw.h in Headers */, B6CAB2F71AF9AA1A00B9B856 /* btTriangleBuffer.h in Headers */, B665E2D41AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h in Headers */, 15AE187F19AAD33D00C27E9E /* CCBKeyframe.h in Headers */, @@ -8700,7 +8971,9 @@ 15AE182A19AAD2F700C27E9E /* CCMeshSkin.h in Headers */, B276EF5F1988D1D500CD400F /* CCVertexIndexData.h in Headers */, 1A57007F180BC5A10088DEC7 /* CCActionInterval.h in Headers */, + B6DD2FDB1B04825B00E47F5F /* DetourLocalBoundary.h in Headers */, B6CAB3491AF9AA1A00B9B856 /* gim_clip_polygon.h in Headers */, + B677B0DB1B18492D006762CB /* CCNavMeshUtils.h in Headers */, B6CAAFE41AF9A9E100B9B856 /* CCPhysics3D.h in Headers */, 15AE1A7F19AAD40300C27E9E /* b2DistanceJoint.h in Headers */, B665E3301AA80A6500DDB1C5 /* CCPUOnCountObserverTranslator.h in Headers */, @@ -8752,6 +9025,8 @@ 15AE191219AAD35000C27E9E /* CCProcessBase.h in Headers */, 15AE1BB619AADFEF00C27E9E /* SocketIO.h in Headers */, B665E2F41AA80A6500DDB1C5 /* CCPULineEmitterTranslator.h in Headers */, + B6DD2FB91B04825B00E47F5F /* DetourAlloc.h in Headers */, + B6DD2FF71B04825B00E47F5F /* fastlz.h in Headers */, B665E2D81AA80A6500DDB1C5 /* CCPUJetAffector.h in Headers */, 1A570093180BC5A10088DEC7 /* CCActionTween.h in Headers */, B6CAB3CF1AF9AA1A00B9B856 /* btSequentialImpulseConstraintSolver.h in Headers */, @@ -8825,6 +9100,7 @@ 15AE1B6C19AADA9900C27E9E /* UIWidget.h in Headers */, B665E2681AA80A6500DDB1C5 /* CCPUDoExpireEventHandlerTranslator.h in Headers */, 15FB208B1AE7C57D00C31518 /* utils.h in Headers */, + B6DD2FB51B04825B00E47F5F /* RecastDump.h in Headers */, B6CAB3411AF9AA1A00B9B856 /* gim_bitset.h in Headers */, 15AE180E19AAD2F700C27E9E /* CCAnimate3D.h in Headers */, 1A5701B3180BCB590088DEC7 /* CCFontFNT.h in Headers */, @@ -8842,6 +9118,7 @@ B6CAB3E91AF9AA1A00B9B856 /* btDiscreteDynamicsWorld.h in Headers */, B6CAB2F31AF9AA1A00B9B856 /* btTetrahedronShape.h in Headers */, B6CAB4231AF9AA1A00B9B856 /* btMLCPSolverInterface.h in Headers */, + B6DD2FE31B04825B00E47F5F /* DetourPathCorridor.h in Headers */, 50ED2BE019BEAF7900A0AB90 /* UIEditBoxImpl-win32.h in Headers */, B6CAB5011AF9AA1A00B9B856 /* btConvexHullComputer.h in Headers */, 15AE197119AAD35700C27E9E /* CCFrame.h in Headers */, @@ -8934,6 +9211,7 @@ B665E3081AA80A6500DDB1C5 /* CCPUMeshSurfaceEmitterTranslator.h in Headers */, 15AE184219AAD2F700C27E9E /* CCSprite3D.h in Headers */, B665E3181AA80A6500DDB1C5 /* CCPUObserverTranslator.h in Headers */, + B6DD2FC91B04825B00E47F5F /* DetourNavMeshBuilder.h in Headers */, B6CAB5111AF9AA1A00B9B856 /* btMatrix3x3.h in Headers */, B665E3201AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.h in Headers */, B665E2A01AA80A6500DDB1C5 /* CCPUEventHandler.h in Headers */, @@ -8982,6 +9260,7 @@ B6CAB50B1AF9AA1A00B9B856 /* btHashMap.h in Headers */, 15AE1A6719AAD40300C27E9E /* b2World.h in Headers */, B6CAB3571AF9AA1A00B9B856 /* gim_math.h in Headers */, + B677B0D71B18492D006762CB /* CCNavMeshObstacle.h in Headers */, 15AE199B19AAD39600C27E9E /* PageViewReader.h in Headers */, B665E2A41AA80A6500DDB1C5 /* CCPUEventHandlerManager.h in Headers */, 15AE1A6219AAD40300C27E9E /* b2Fixture.h in Headers */, @@ -9008,6 +9287,7 @@ 15AE188519AAD33D00C27E9E /* CCBSequence.h in Headers */, 15FB20951AE7C57D00C31518 /* cdt.h in Headers */, B665E3541AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h in Headers */, + B6DD2FDF1B04825B00E47F5F /* DetourObstacleAvoidance.h in Headers */, B6CAB4F11AF9AA1A00B9B856 /* Win32ThreadSupport.h in Headers */, 50643BE219BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, B29A7DF519EE1B7700872B35 /* Skeleton.h in Headers */, @@ -9017,6 +9297,7 @@ 5034CA49191D591100CE6051 /* ccShader_Label_df.frag in Headers */, 292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */, B29A7DD919EE1B7700872B35 /* SkeletonRenderer.h in Headers */, + B6DD2FC11B04825B00E47F5F /* DetourMath.h in Headers */, 50CB247919D9C5A100687767 /* AudioEngine-inl.h in Headers */, 1A01C68C18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, B6CAB0001AF9A9E100B9B856 /* CCPhysicsSprite3D.h in Headers */, @@ -9040,6 +9321,7 @@ 15AE1A5419AAD40300C27E9E /* b2GrowableStack.h in Headers */, 15AE1B4E19AADA9900C27E9E /* UIListView.h in Headers */, 1A570284180BCC900088DEC7 /* CCSpriteBatchNode.h in Headers */, + B6DD2FD71B04825B00E47F5F /* DetourCrowd.h in Headers */, 5034CA2B191D591100CE6051 /* ccShader_PositionTextureA8Color.vert in Headers */, B665E2041AA80A6500DDB1C5 /* CCPUAlignAffectorTranslator.h in Headers */, B6CAB3A11AF9AA1A00B9B856 /* btKinematicCharacterController.h in Headers */, @@ -9064,6 +9346,7 @@ B665E3501AA80A6500DDB1C5 /* CCPUOnPositionObserverTranslator.h in Headers */, B68778FA1A8CA82E00643ABF /* CCParticle3DAffector.h in Headers */, 15AE1BA019AADFDF00C27E9E /* UILayout.h in Headers */, + B677B0CF1B18492D006762CB /* CCNavMeshAgent.h in Headers */, 1A570294180BCCAB0088DEC7 /* CCAnimation.h in Headers */, B665E4081AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitter.h in Headers */, B6CAB28B1AF9AA1A00B9B856 /* btCapsuleShape.h in Headers */, @@ -9240,6 +9523,7 @@ B6CAB1FF1AF9AA1A00B9B856 /* btDispatcher.h in Headers */, 15AE188B19AAD33D00C27E9E /* CCControlLoader.h in Headers */, B29A7DF719EE1B7700872B35 /* Attachment.h in Headers */, + B6DD2FA91B04825B00E47F5F /* DebugDraw.h in Headers */, 15FB208D1AE7C57D00C31518 /* poly2tri.h in Headers */, B6CAB3091AF9AA1A00B9B856 /* btTriangleMesh.h in Headers */, B6CAB4AF1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.h in Headers */, @@ -9256,10 +9540,12 @@ B6CAB1E31AF9AA1A00B9B856 /* btBulletDynamicsCommon.h in Headers */, 382384311A259112002C4610 /* ParticleReader.h in Headers */, B6CAB3BD1AF9AA1A00B9B856 /* btGeneric6DofSpringConstraint.h in Headers */, + B6DD2FBF1B04825B00E47F5F /* DetourCommon.h in Headers */, B665E3D01AA80A6600DDB1C5 /* CCPUScriptCompiler.h in Headers */, 5034CA35191D591100CE6051 /* ccShader_PositionTexture.frag in Headers */, 15AE1BB219AADFEF00C27E9E /* HttpClient.h in Headers */, B6CAB3FD1AF9AA1A00B9B856 /* btMultiBodyConstraint.h in Headers */, + B6DD2FF31B04825B00E47F5F /* DetourTileCacheBuilder.h in Headers */, 15AE197619AAD35700C27E9E /* CCTimelineMacro.h in Headers */, 50ABBE6F1925AB6F00A911A9 /* CCEventListenerKeyboard.h in Headers */, 15AE1A5619AAD40300C27E9E /* b2Math.h in Headers */, @@ -9337,7 +9623,9 @@ B665E2881AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h in Headers */, B665E2441AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h in Headers */, B665E2281AA80A6500DDB1C5 /* CCPUBillboardChain.h in Headers */, + B6DD2FD31B04825B00E47F5F /* DetourStatus.h in Headers */, 15AE18A919AAD33D00C27E9E /* CCSpriteLoader.h in Headers */, + B677B0D31B18492D006762CB /* CCNavMeshDebugDraw.h in Headers */, 15AE198419AAD36400C27E9E /* WidgetReaderProtocol.h in Headers */, B6CAB53D1AF9AA1A00B9B856 /* cl_MiniCL_Defs.h in Headers */, 50ABBEC91925AB6F00A911A9 /* firePngData.h in Headers */, @@ -9471,6 +9759,7 @@ B6CAB2EB1AF9AA1A00B9B856 /* btStaticPlaneShape.h in Headers */, 3EACC9A219F5014D00EB3C5E /* CCCamera.h in Headers */, B6CAB5331AF9AA1A00B9B856 /* btTransformUtil.h in Headers */, + B6DD2FEF1B04825B00E47F5F /* DetourTileCache.h in Headers */, 50ABBECD1925AB6F00A911A9 /* s3tc.h in Headers */, B6CAB3651AF9AA1A00B9B856 /* btContinuousConvexCollision.h in Headers */, 15AE1BD119AAE01E00C27E9E /* CCControlHuePicker.h in Headers */, @@ -9479,7 +9768,10 @@ 50ABBE771925AB6F00A911A9 /* CCEventListenerTouch.h in Headers */, 5034CA33191D591100CE6051 /* ccShader_PositionTexture_uColor.frag in Headers */, B665E4341AA80A6600DDB1C5 /* CCPUVertexEmitter.h in Headers */, + B6DD2FEB1B04825B00E47F5F /* DetourProximityGrid.h in Headers */, + B6DD2FC51B04825B00E47F5F /* DetourNavMesh.h in Headers */, 50ABC0171926664800A911A9 /* CCImage.h in Headers */, + B6DD2FCD1B04825B00E47F5F /* DetourNavMeshQuery.h in Headers */, 50ABBDA91925AB4100A911A9 /* CCRenderCommand.h in Headers */, B6CAB3791AF9AA1A00B9B856 /* btGjkEpaPenetrationDepthSolver.h in Headers */, 50ABBD951925AB4100A911A9 /* CCGLProgramState.h in Headers */, @@ -9587,8 +9879,10 @@ B6CAB4061AF9AA1A00B9B856 /* btMultiBodyDynamicsWorld.h in Headers */, ED74D76A1A5B8A2600157FD4 /* CCPhysicsHelper.h in Headers */, 5034CA40191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */, + B6DD2FD41B04825B00E47F5F /* DetourStatus.h in Headers */, B665E2891AA80A6500DDB1C5 /* CCPUDoStopSystemEventHandlerTranslator.h in Headers */, 15AE184719AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */, + B6DD2FC21B04825B00E47F5F /* DetourMath.h in Headers */, B6CAB5101AF9AA1A00B9B856 /* btList.h in Headers */, 15AE1BFC19AAE01E00C27E9E /* CCControlUtils.h in Headers */, 15AE193519AAD35100C27E9E /* CCActionObject.h in Headers */, @@ -9604,7 +9898,9 @@ B257B4511989D5E800D9A687 /* CCPrimitive.h in Headers */, 50643BE319BFCF1800EF68ED /* CCPlatformConfig.h in Headers */, B665E27D1AA80A6500DDB1C5 /* CCPUDoScaleEventHandler.h in Headers */, + B6DD2FE81B04825B00E47F5F /* DetourPathQueue.h in Headers */, B6CAB29E1AF9AA1A00B9B856 /* btConeShape.h in Headers */, + B677B0D81B18492D006762CB /* CCNavMeshObstacle.h in Headers */, 15AE181F19AAD2F700C27E9E /* CCBundle3DData.h in Headers */, 15AE193119AAD35100C27E9E /* CCActionManagerEx.h in Headers */, 15AE185B19AAD31200C27E9E /* CDOpenALSupport.h in Headers */, @@ -9628,6 +9924,7 @@ B6CAB32E1AF9AA1A00B9B856 /* btGImpactMassUtil.h in Headers */, B6CAB43C1AF9AA1A00B9B856 /* btGpu3DGridBroadphaseSharedTypes.h in Headers */, 50643BD619BFAEDA00EF68ED /* CCPlatformDefine.h in Headers */, + B6DD2FCE1B04825B00E47F5F /* DetourNavMeshQuery.h in Headers */, 1A570068180BC5A10088DEC7 /* CCActionCamera.h in Headers */, B29A7E1E19EE1B7700872B35 /* PolygonBatch.h in Headers */, B6CAB4E61AF9AA1A00B9B856 /* SpuSampleTaskProcess.h in Headers */, @@ -9643,6 +9940,7 @@ B665E4311AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.h in Headers */, B6CAB2C21AF9AA1A00B9B856 /* btEmptyShape.h in Headers */, B665E3C51AA80A6600DDB1C5 /* CCPUScaleAffectorTranslator.h in Headers */, + B6DD2FF81B04825B00E47F5F /* fastlz.h in Headers */, B665E4351AA80A6600DDB1C5 /* CCPUVertexEmitter.h in Headers */, B665E2451AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffector.h in Headers */, B6CAB3381AF9AA1A00B9B856 /* btQuantization.h in Headers */, @@ -9701,6 +9999,7 @@ B6CAB5341AF9AA1A00B9B856 /* btTransformUtil.h in Headers */, 1A570088180BC5A10088DEC7 /* CCActionPageTurn3D.h in Headers */, 15AE1B9319AADA9A00C27E9E /* UIHelper.h in Headers */, + B677B0DC1B18492D006762CB /* CCNavMeshUtils.h in Headers */, 50ABBD9E1925AB4100A911A9 /* ccGLStateCache.h in Headers */, B665E2111AA80A6500DDB1C5 /* CCPUBaseForceAffector.h in Headers */, B665E30D1AA80A6500DDB1C5 /* CCPUNoise.h in Headers */, @@ -9759,6 +10058,7 @@ 50ABBD571925AB0000A911A9 /* TransformUtils.h in Headers */, B665E2711AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.h in Headers */, 1A570115180BC8EE0088DEC7 /* CCDrawNode.h in Headers */, + B677B0D41B18492D006762CB /* CCNavMeshDebugDraw.h in Headers */, B6CAB2341AF9AA1A00B9B856 /* btCollisionWorld.h in Headers */, 1A57011E180BC90D0088DEC7 /* CCGrabber.h in Headers */, B6CAB4A21AF9AA1A00B9B856 /* PosixThreadSupport.h in Headers */, @@ -9811,13 +10111,16 @@ B665E3E51AA80A6600DDB1C5 /* CCPUSineForceAffector.h in Headers */, 182C5CE81A9D725400C30D34 /* UserCameraReader.h in Headers */, 15AE1A4C19AAD3D500C27E9E /* b2EdgeShape.h in Headers */, + B6DD2FB21B04825B00E47F5F /* RecastDebugDraw.h in Headers */, B6CAB39C1AF9AA1A00B9B856 /* btVoronoiSimplexSolver.h in Headers */, B6CAB2701AF9AA1A00B9B856 /* btSphereSphereCollisionAlgorithm.h in Headers */, 1A5701B4180BCB590088DEC7 /* CCFontFNT.h in Headers */, + B6DD2FBC1B04825B00E47F5F /* DetourAssert.h in Headers */, 15AE18D419AAD33D00C27E9E /* CCParticleSystemQuadLoader.h in Headers */, B665E3411AA80A6500DDB1C5 /* CCPUOnEventFlagObserverTranslator.h in Headers */, B6CAB5041AF9AA1A00B9B856 /* btDefaultMotionState.h in Headers */, B6CAB52A1AF9AA1A00B9B856 /* btScalar.h in Headers */, + B6DD2FF41B04825B00E47F5F /* DetourTileCacheBuilder.h in Headers */, B29A7DFA19EE1B7700872B35 /* Json.h in Headers */, 3823842B1A2590F9002C4610 /* NodeReader.h in Headers */, B6CAB3241AF9AA1A00B9B856 /* btGeometryOperations.h in Headers */, @@ -9831,6 +10134,7 @@ 15AE18CB19AAD33D00C27E9E /* CCMenuLoader.h in Headers */, B665E4011AA80A6600DDB1C5 /* CCPUSphereCollider.h in Headers */, B6CAB31E1AF9AA1A00B9B856 /* btContactProcessing.h in Headers */, + B6DD2FC61B04825B00E47F5F /* DetourNavMesh.h in Headers */, 1A5701BC180BCB5A0088DEC7 /* CCLabel.h in Headers */, B665E2D51AA80A6500DDB1C5 /* CCPUInterParticleColliderTranslator.h in Headers */, 1A5701C0180BCB5A0088DEC7 /* CCLabelAtlas.h in Headers */, @@ -9848,6 +10152,7 @@ B6CAB4EE1AF9AA1A00B9B856 /* vectormath2bullet.h in Headers */, 15AE1BBA19AADFF000C27E9E /* HttpClient.h in Headers */, B6CAB2241AF9AA1A00B9B856 /* btCollisionConfiguration.h in Headers */, + B6DD2FCA1B04825B00E47F5F /* DetourNavMeshBuilder.h in Headers */, 292DB14619B4574100A80320 /* UIEditBoxImpl-android.h in Headers */, B6CAB49E1AF9AA1A00B9B856 /* PlatformDefinitions.h in Headers */, B665E2DD1AA80A6500DDB1C5 /* CCPUJetAffectorTranslator.h in Headers */, @@ -9881,6 +10186,7 @@ 15AE196219AAD35100C27E9E /* CCSSceneReader.h in Headers */, 1A01C69518F57BE800EFE3A6 /* CCFloat.h in Headers */, B665E2011AA80A6500DDB1C5 /* CCPUAlignAffector.h in Headers */, + B6DD2FEC1B04825B00E47F5F /* DetourProximityGrid.h in Headers */, B6CAB49C1AF9AA1A00B9B856 /* HeapManager.h in Headers */, 1A5701CA180BCB5A0088DEC7 /* CCLabelTextFormatter.h in Headers */, B6CAB25C1AF9AA1A00B9B856 /* btHashedSimplePairCache.h in Headers */, @@ -9920,8 +10226,10 @@ 1A5701E9180BCB8C0088DEC7 /* CCTransition.h in Headers */, 15AE198F19AAD36E00C27E9E /* CheckBoxReader.h in Headers */, B665E3911AA80A6500DDB1C5 /* CCPUPlaneCollider.h in Headers */, + B6DD2FAE1B04825B00E47F5F /* DetourDebugDraw.h in Headers */, 382384011A258FA7002C4610 /* util.h in Headers */, 18956BB51A9DFBFD006E9155 /* Particle3DReader.h in Headers */, + B6DD2FD81B04825B00E47F5F /* DetourCrowd.h in Headers */, B6CAB34A1AF9AA1A00B9B856 /* gim_clip_polygon.h in Headers */, B665E3F91AA80A6600DDB1C5 /* CCPUSlaveEmitterTranslator.h in Headers */, B665E2551AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.h in Headers */, @@ -9958,12 +10266,14 @@ 1A57020B180BCBDF0088DEC7 /* CCMotionStreak.h in Headers */, B665E2211AA80A6500DDB1C5 /* CCPUBehaviourManager.h in Headers */, 15AE195219AAD35100C27E9E /* CCDecorativeDisplay.h in Headers */, + B6DD2FAA1B04825B00E47F5F /* DebugDraw.h in Headers */, 15AE196619AAD35100C27E9E /* CCTween.h in Headers */, 15AE194619AAD35100C27E9E /* CCComAttribute.h in Headers */, B6CAB5181AF9AA1A00B9B856 /* btMotionState.h in Headers */, B6CAAFE51AF9A9E100B9B856 /* CCPhysics3D.h in Headers */, B6CAB1F41AF9AA1A00B9B856 /* btCollisionAlgorithm.h in Headers */, 382384241A2590DA002C4610 /* GameMapReader.h in Headers */, + B6DD2FDC1B04825B00E47F5F /* DetourLocalBoundary.h in Headers */, 15AE1ABD19AAD40300C27E9E /* b2PolygonAndCircleContact.h in Headers */, 15AE1AA819AAD40300C27E9E /* b2Island.h in Headers */, B665E2391AA80A6500DDB1C5 /* CCPUBoxEmitterTranslator.h in Headers */, @@ -9984,6 +10294,7 @@ 15FB20961AE7C57D00C31518 /* cdt.h in Headers */, 15AE1AC919AAD40300C27E9E /* b2Joint.h in Headers */, 382383EF1A258FA7002C4610 /* flatbuffers.h in Headers */, + B677B0CC1B18492D006762CB /* CCNavMesh.h in Headers */, B6D38B911AC3AFAC00043997 /* CCTextureCube.h in Headers */, B665E2811AA80A6500DDB1C5 /* CCPUDoScaleEventHandlerTranslator.h in Headers */, 15AE196819AAD35100C27E9E /* CCUtilMath.h in Headers */, @@ -10038,6 +10349,7 @@ B6CAB1F81AF9AA1A00B9B856 /* btDbvt.h in Headers */, B665E35D1AA80A6500DDB1C5 /* CCPUOnRandomObserver.h in Headers */, 1A570281180BCC900088DEC7 /* CCSprite.h in Headers */, + B6DD2FD21B04825B00E47F5F /* DetourNode.h in Headers */, 1A570285180BCC900088DEC7 /* CCSpriteBatchNode.h in Headers */, 15AE193B19AAD35100C27E9E /* CCArmatureDataManager.h in Headers */, 1A570289180BCC900088DEC7 /* CCSpriteFrame.h in Headers */, @@ -10080,6 +10392,7 @@ 1A5702ED180BCE750088DEC7 /* CCTileMapAtlas.h in Headers */, 15AE195E19AAD35100C27E9E /* CCSkin.h in Headers */, B6CAB3CC1AF9AA1A00B9B856 /* btPoint2PointConstraint.h in Headers */, + B6DD2FE01B04825B00E47F5F /* DetourObstacleAvoidance.h in Headers */, B6CAB5081AF9AA1A00B9B856 /* btGeometryUtil.h in Headers */, 1A5702F1180BCE750088DEC7 /* CCTMXLayer.h in Headers */, 15FB20771AE7BF8600C31518 /* MarchingSquare.h in Headers */, @@ -10148,6 +10461,7 @@ 15AE1BBE19AADFF000C27E9E /* SocketIO.h in Headers */, B665E3351AA80A6500DDB1C5 /* CCPUOnEmissionObserver.h in Headers */, B665E3811AA80A6500DDB1C5 /* CCPUParticleSystem3DTranslator.h in Headers */, + B6DD2FBA1B04825B00E47F5F /* DetourAlloc.h in Headers */, B6CAB4D21AF9AA1A00B9B856 /* SpuConvexPenetrationDepthSolver.h in Headers */, B665E2151AA80A6500DDB1C5 /* CCPUBaseForceAffectorTranslator.h in Headers */, 1A01C69B18F57BE800EFE3A6 /* CCSet.h in Headers */, @@ -10179,8 +10493,10 @@ B6CAB3761AF9AA1A00B9B856 /* btGjkEpa2.h in Headers */, 182C5CD91A98F30500C30D34 /* Sprite3DReader.h in Headers */, 50ABBE301925AB6F00A911A9 /* ccConfig.h in Headers */, + B6DD2FE41B04825B00E47F5F /* DetourPathCorridor.h in Headers */, 15AE195819AAD35100C27E9E /* CCInputDelegate.h in Headers */, B6CAB3281AF9AA1A00B9B856 /* btGImpactBvh.h in Headers */, + B6DD2FB61B04825B00E47F5F /* RecastDump.h in Headers */, 50ABBDAC1925AB4100A911A9 /* CCRenderCommandPool.h in Headers */, B6CAB24C1AF9AA1A00B9B856 /* btConvexPlaneCollisionAlgorithm.h in Headers */, B665E3CD1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.h in Headers */, @@ -10279,6 +10595,7 @@ 299CF1FE19A434BC00C378C1 /* ccRandom.h in Headers */, B665E3BD1AA80A6500DDB1C5 /* CCPURibbonTrailRender.h in Headers */, 50ABBDBC1925AB4100A911A9 /* CCTextureAtlas.h in Headers */, + B6DD2FC01B04825B00E47F5F /* DetourCommon.h in Headers */, B6CAAFE91AF9A9E100B9B856 /* CCPhysics3DComponent.h in Headers */, 15AE182319AAD2F700C27E9E /* CCBundleReader.h in Headers */, 182C5CB51A95964F00C30D34 /* Node3DReader.h in Headers */, @@ -10316,6 +10633,7 @@ B6CAB3001AF9AA1A00B9B856 /* btTriangleIndexVertexArray.h in Headers */, B6CAB3881AF9AA1A00B9B856 /* btPersistentManifold.h in Headers */, B68779031A8CA82E00643ABF /* CCParticle3DRender.h in Headers */, + B6DD2FF01B04825B00E47F5F /* DetourTileCache.h in Headers */, 15AE195A19AAD35100C27E9E /* CCProcessBase.h in Headers */, 15AE193D19AAD35100C27E9E /* CCArmatureDefine.h in Headers */, B6CAB37A1AF9AA1A00B9B856 /* btGjkEpaPenetrationDepthSolver.h in Headers */, @@ -10389,6 +10707,7 @@ 15AE18D219AAD33D00C27E9E /* CCNodeLoaderListener.h in Headers */, 15AE184D19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, B665E3551AA80A6500DDB1C5 /* CCPUOnQuotaObserver.h in Headers */, + B677B0D01B18492D006762CB /* CCNavMeshAgent.h in Headers */, B665E3C91AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.h in Headers */, B665E3FD1AA80A6600DDB1C5 /* CCPUSphere.h in Headers */, B68778FB1A8CA82E00643ABF /* CCParticle3DAffector.h in Headers */, @@ -10545,6 +10864,7 @@ 15AE189D19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */, B665E2461AA80A6500DDB1C5 /* CCPUCollisionAvoidanceAffectorTranslator.cpp in Sources */, B68779041A8CA82E00643ABF /* CCParticleSystem3D.cpp in Sources */, + B6DD2FB71B04825B00E47F5F /* DetourAlloc.cpp in Sources */, 5027253C190BF1B900AAF4ED /* cocos2d.cpp in Sources */, 50ABC0611926664800A911A9 /* CCCommon-mac.mm in Sources */, 50ABBDB11925AB4100A911A9 /* ccShaders.cpp in Sources */, @@ -10570,6 +10890,7 @@ B6CAB41F1AF9AA1A00B9B856 /* btMLCPSolver.cpp in Sources */, 46A170E61807CECA005B8026 /* CCPhysicsBody.cpp in Sources */, B665E40A1AA80A6600DDB1C5 /* CCPUSphereSurfaceEmitterTranslator.cpp in Sources */, + B677B0D91B18492D006762CB /* CCNavMeshUtils.cpp in Sources */, 50ABBDA71925AB4100A911A9 /* CCRenderCommand.cpp in Sources */, B665E35E1AA80A6500DDB1C5 /* CCPUOnRandomObserverTranslator.cpp in Sources */, B6CAB2931AF9AA1A00B9B856 /* btCompoundShape.cpp in Sources */, @@ -10645,6 +10966,7 @@ B6CAB4D91AF9AA1A00B9B856 /* SpuMinkowskiPenetrationDepthSolver.cpp in Sources */, B665E3CE1AA80A6600DDB1C5 /* CCPUScriptCompiler.cpp in Sources */, 15AE18E819AAD35000C27E9E /* CCActionManagerEx.cpp in Sources */, + B677B0CD1B18492D006762CB /* CCNavMeshAgent.cpp in Sources */, B29A7DDB19EE1B7700872B35 /* Event.c in Sources */, 15AE191B19AAD35000C27E9E /* CCTransformHelp.cpp in Sources */, 15AE190319AAD35000C27E9E /* CCComRender.cpp in Sources */, @@ -10666,6 +10988,7 @@ B6CAB2451AF9AA1A00B9B856 /* btConvexConvexAlgorithm.cpp in Sources */, 15AE1B9D19AADFDF00C27E9E /* UIVBox.cpp in Sources */, B665E2B61AA80A6500DDB1C5 /* CCPUForceFieldAffector.cpp in Sources */, + B6DD2FD51B04825B00E47F5F /* DetourCrowd.cpp in Sources */, 1A570079180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, 15AE1A7019AAD40300C27E9E /* b2Contact.cpp in Sources */, 15AE18A619AAD33D00C27E9E /* CCScrollViewLoader.cpp in Sources */, @@ -10673,6 +10996,7 @@ 15AE184419AAD2F700C27E9E /* CCSprite3DMaterial.cpp in Sources */, 50ABBE591925AB6F00A911A9 /* CCEventKeyboard.cpp in Sources */, B665E2FA1AA80A6500DDB1C5 /* CCPUMaterialManager.cpp in Sources */, + B6DD2FAF1B04825B00E47F5F /* RecastDebugDraw.cpp in Sources */, B29A7DDF19EE1B7700872B35 /* IkConstraintData.c in Sources */, B665E3921AA80A6500DDB1C5 /* CCPUPlaneColliderTranslator.cpp in Sources */, 1A57007D180BC5A10088DEC7 /* CCActionInterval.cpp in Sources */, @@ -10690,6 +11014,7 @@ B665E3CA1AA80A6600DDB1C5 /* CCPUScaleVelocityAffectorTranslator.cpp in Sources */, 1A57008D180BC5A10088DEC7 /* CCActionTiledGrid.cpp in Sources */, B665E26E1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandlerTranslator.cpp in Sources */, + B6DD2FF11B04825B00E47F5F /* DetourTileCacheBuilder.cpp in Sources */, B665E1FE1AA80A6500DDB1C5 /* CCPUAlignAffector.cpp in Sources */, B665E2961AA80A6500DDB1C5 /* CCPUEmitterManager.cpp in Sources */, 1A570091180BC5A10088DEC7 /* CCActionTween.cpp in Sources */, @@ -10726,11 +11051,13 @@ B6CAAFF61AF9A9E100B9B856 /* CCPhysics3DShape.cpp in Sources */, B6CAB3071AF9AA1A00B9B856 /* btTriangleMesh.cpp in Sources */, B29A7E1319EE1B7700872B35 /* Bone.c in Sources */, + B677B0C91B18492D006762CB /* CCNavMesh.cpp in Sources */, B665E1F61AA80A6500DDB1C5 /* CCPUAffectorManager.cpp in Sources */, 292DB14919B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */, B6CAB2511AF9AA1A00B9B856 /* btEmptyCollisionAlgorithm.cpp in Sources */, 15AE181019AAD2F700C27E9E /* CCAnimation3D.cpp in Sources */, 1A01C68418F57BE800EFE3A6 /* CCArray.cpp in Sources */, + B6DD2FDD1B04825B00E47F5F /* DetourObstacleAvoidance.cpp in Sources */, 1A570112180BC8EE0088DEC7 /* CCDrawNode.cpp in Sources */, B6CAB4B11AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.cpp in Sources */, 15AE186D19AAD31D00C27E9E /* SimpleAudioEngine_objc.m in Sources */, @@ -10745,6 +11072,7 @@ 382383FE1A258FA7002C4610 /* idl_parser.cpp in Sources */, 1A57011F180BC90D0088DEC7 /* CCGrid.cpp in Sources */, B665E26A1AA80A6500DDB1C5 /* CCPUDoFreezeEventHandler.cpp in Sources */, + B6DD2FD91B04825B00E47F5F /* DetourLocalBoundary.cpp in Sources */, 15AE187A19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */, 15AE1B6D19AADA9900C27E9E /* UIHelper.cpp in Sources */, 15AE1A8A19AAD40300C27E9E /* b2PulleyJoint.cpp in Sources */, @@ -10757,6 +11085,7 @@ B6CAB2D51AF9AA1A00B9B856 /* btOptimizedBvh.cpp in Sources */, 50CB247B19D9C5A100687767 /* AudioEngine-inl.mm in Sources */, 1A5701A1180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, + B6DD2FC71B04825B00E47F5F /* DetourNavMeshBuilder.cpp in Sources */, B29A7DFF19EE1B7700872B35 /* Json.c in Sources */, B6CAB3111AF9AA1A00B9B856 /* btUniformScalingShape.cpp in Sources */, 15AE1A8619AAD40300C27E9E /* b2MouseJoint.cpp in Sources */, @@ -10770,6 +11099,7 @@ 1A5701B1180BCB590088DEC7 /* CCFontFNT.cpp in Sources */, B6CAB4A51AF9AA1A00B9B856 /* SequentialThreadSupport.cpp in Sources */, 15AE181619AAD2F700C27E9E /* CCAttachNode.cpp in Sources */, + B6DD2FE91B04825B00E47F5F /* DetourProximityGrid.cpp in Sources */, B29A7DED19EE1B7700872B35 /* IkConstraint.c in Sources */, 18956BB21A9DFBFD006E9155 /* Particle3DReader.cpp in Sources */, 1A5701B5180BCB590088DEC7 /* CCFontFreeType.cpp in Sources */, @@ -10799,6 +11129,7 @@ B6CAB3D51AF9AA1A00B9B856 /* btSolve2LinearConstraint.cpp in Sources */, B6CAB2591AF9AA1A00B9B856 /* btHashedSimplePairCache.cpp in Sources */, 382F7ADC1AB1292A002EBECF /* CCObjectExtensionData.cpp in Sources */, + B6DD2FAB1B04825B00E47F5F /* DetourDebugDraw.cpp in Sources */, 15AE191719AAD35000C27E9E /* CCSpriteFrameCacheHelper.cpp in Sources */, B665E2E21AA80A6500DDB1C5 /* CCPULineAffectorTranslator.cpp in Sources */, B6CAB2A31AF9AA1A00B9B856 /* btConvexHullShape.cpp in Sources */, @@ -10823,6 +11154,7 @@ 3EACC9A419F5014D00EB3C5E /* CCLight.cpp in Sources */, B6CAB4C91AF9AA1A00B9B856 /* SpuCollisionShapes.cpp in Sources */, B6CAB38B1AF9AA1A00B9B856 /* btPolyhedralContactClipping.cpp in Sources */, + B677B0D51B18492D006762CB /* CCNavMeshObstacle.cpp in Sources */, B665E42E1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffectorTranslator.cpp in Sources */, 1A5701E2180BCB8C0088DEC7 /* CCScene.cpp in Sources */, B6CAB5351AF9AA1A00B9B856 /* btVector3.cpp in Sources */, @@ -10886,6 +11218,7 @@ B665E3FE1AA80A6600DDB1C5 /* CCPUSphereCollider.cpp in Sources */, B6CAB3591AF9AA1A00B9B856 /* gim_memory.cpp in Sources */, B665E25A1AA80A6500DDB1C5 /* CCPUDoEnableComponentEventHandler.cpp in Sources */, + B6DD2FB31B04825B00E47F5F /* RecastDump.cpp in Sources */, B6CAB2BB1AF9AA1A00B9B856 /* btCylinderShape.cpp in Sources */, 15AE1BD019AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */, B6CAAFFA1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp in Sources */, @@ -10927,6 +11260,7 @@ B29A7DF319EE1B7700872B35 /* AttachmentLoader.c in Sources */, B6CAB3331AF9AA1A00B9B856 /* btGImpactShape.cpp in Sources */, 382383F01A258FA7002C4610 /* flatc.cpp in Sources */, + B6DD2FA71B04825B00E47F5F /* DebugDraw.cpp in Sources */, B665E31A1AA80A6500DDB1C5 /* CCPUOnClearObserver.cpp in Sources */, 1A57028A180BCC900088DEC7 /* CCSpriteFrameCache.cpp in Sources */, 15AE18E619AAD35000C27E9E /* CCActionFrameEasing.cpp in Sources */, @@ -10947,6 +11281,7 @@ 1A570296180BCCAB0088DEC7 /* CCAnimationCache.cpp in Sources */, B29A7E1B19EE1B7700872B35 /* SkeletonJson.c in Sources */, 50ABBE351925AB6F00A911A9 /* CCConsole.cpp in Sources */, + B6DD2FED1B04825B00E47F5F /* DetourTileCache.cpp in Sources */, B665E3FA1AA80A6600DDB1C5 /* CCPUSphere.cpp in Sources */, 50ABBEAF1925AB6F00A911A9 /* CCUserDefault.cpp in Sources */, 15AE1BCB19AAE01E00C27E9E /* CCControlButton.cpp in Sources */, @@ -11016,6 +11351,7 @@ B665E3621AA80A6500DDB1C5 /* CCPUOnTimeObserver.cpp in Sources */, 15AE18DF19AAD35000C27E9E /* TriggerBase.cpp in Sources */, 15AE1A7219AAD40300C27E9E /* b2ContactSolver.cpp in Sources */, + B6DD2FE11B04825B00E47F5F /* DetourPathCorridor.cpp in Sources */, B665E2BE1AA80A6500DDB1C5 /* CCPUGeometryRotator.cpp in Sources */, 3823841A1A2590D2002C4610 /* ComAudioReader.cpp in Sources */, 15AE1BC519AAE00000C27E9E /* AssetsManager.cpp in Sources */, @@ -11048,6 +11384,7 @@ 1A570310180BCF190088DEC7 /* CCComponentContainer.cpp in Sources */, 15AE190719AAD35000C27E9E /* CCDatas.cpp in Sources */, 1A01C69C18F57BE800EFE3A6 /* CCString.cpp in Sources */, + B6DD2FCB1B04825B00E47F5F /* DetourNavMeshQuery.cpp in Sources */, B6CAB26D1AF9AA1A00B9B856 /* btSphereSphereCollisionAlgorithm.cpp in Sources */, B6CAB3251AF9AA1A00B9B856 /* btGImpactBvh.cpp in Sources */, B665E2721AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp in Sources */, @@ -11102,6 +11439,7 @@ 15AE18FA19AAD35000C27E9E /* CCColliderDetector.cpp in Sources */, 50ABBEA71925AB6F00A911A9 /* CCTouch.cpp in Sources */, 15AE191319AAD35000C27E9E /* CCSGUIReader.cpp in Sources */, + B6DD2FBD1B04825B00E47F5F /* DetourCommon.cpp in Sources */, 15AE186819AAD31D00C27E9E /* CDXMacOSXSupport.mm in Sources */, B665E3221AA80A6500DDB1C5 /* CCPUOnCollisionObserver.cpp in Sources */, 15AE191519AAD35000C27E9E /* CCSkin.cpp in Sources */, @@ -11145,6 +11483,7 @@ B665E2921AA80A6500DDB1C5 /* CCPUEmitter.cpp in Sources */, 15B3708419EE414C00ABE682 /* Downloader.cpp in Sources */, 50ABC0631926664800A911A9 /* CCDevice-mac.mm in Sources */, + B677B0D11B18492D006762CB /* CCNavMeshDebugDraw.cpp in Sources */, 15AE1A2819AAD3D500C27E9E /* b2Collision.cpp in Sources */, 15AE1B6719AADA9900C27E9E /* UIScale9Sprite.cpp in Sources */, 292DB14319B4574100A80320 /* UIEditBoxImpl-android.cpp in Sources */, @@ -11184,6 +11523,7 @@ B665E4021AA80A6600DDB1C5 /* CCPUSphereColliderTranslator.cpp in Sources */, 15AE1A3619AAD3D500C27E9E /* b2PolygonShape.cpp in Sources */, D0FD03531A3B51AA00825BB5 /* CCAllocatorGlobalNewDelete.cpp in Sources */, + B6DD2FE51B04825B00E47F5F /* DetourPathQueue.cpp in Sources */, B665E39A1AA80A6500DDB1C5 /* CCPUPointEmitterTranslator.cpp in Sources */, 50ABBD9B1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */, 15AE188119AAD33D00C27E9E /* CCBReader.cpp in Sources */, @@ -11229,12 +11569,15 @@ B6CAB3811AF9AA1A00B9B856 /* btMinkowskiPenetrationDepthSolver.cpp in Sources */, B6CAB4AD1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.cpp in Sources */, 50ABBE9F1925AB6F00A911A9 /* CCScheduler.cpp in Sources */, + B6DD2FC31B04825B00E47F5F /* DetourNavMesh.cpp in Sources */, + B6DD2FCF1B04825B00E47F5F /* DetourNode.cpp in Sources */, 15AE1C1119AAE2C600C27E9E /* CCPhysicsDebugNode.cpp in Sources */, B665E2521AA80A6500DDB1C5 /* CCPUDoAffectorEventHandler.cpp in Sources */, 50ABC0151926664800A911A9 /* CCImage.cpp in Sources */, 50ABBE231925AB6F00A911A9 /* base64.cpp in Sources */, B665E3AA1AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp in Sources */, 15AE1B5D19AADA9900C27E9E /* UITextBMFont.cpp in Sources */, + B6DD2FF51B04825B00E47F5F /* fastlz.c in Sources */, B665E3561AA80A6500DDB1C5 /* CCPUOnQuotaObserverTranslator.cpp in Sources */, 382384361A259126002C4610 /* ProjectNodeReader.cpp in Sources */, B665E37A1AA80A6500DDB1C5 /* CCPUParticleSystem3D.cpp in Sources */, @@ -11312,6 +11655,7 @@ B665E38F1AA80A6500DDB1C5 /* CCPUPlaneCollider.cpp in Sources */, B665E21B1AA80A6500DDB1C5 /* CCPUBehaviour.cpp in Sources */, B6CAB2CA1AF9AA1A00B9B856 /* btMinkowskiSumShape.cpp in Sources */, + B6DD2FE61B04825B00E47F5F /* DetourPathQueue.cpp in Sources */, B665E38B1AA80A6500DDB1C5 /* CCPUPlane.cpp in Sources */, B665E2731AA80A6500DDB1C5 /* CCPUDoPlacementParticleEventHandler.cpp in Sources */, 15AE1C0519AAE01E00C27E9E /* CCTableViewCell.cpp in Sources */, @@ -11334,6 +11678,7 @@ B665E35B1AA80A6500DDB1C5 /* CCPUOnRandomObserver.cpp in Sources */, 50ABC0161926664800A911A9 /* CCImage.cpp in Sources */, B665E3AB1AA80A6500DDB1C5 /* CCPURandomiserTranslator.cpp in Sources */, + B6DD2FE21B04825B00E47F5F /* DetourPathCorridor.cpp in Sources */, 1A01C6A518F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */, 292DB14E19B4574100A80320 /* UIEditBoxImpl-mac.mm in Sources */, B6CAB4BC1AF9AA1A00B9B856 /* SpuGatheringCollisionDispatcher.cpp in Sources */, @@ -11355,11 +11700,13 @@ 50ABBE561925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, 382F7ADD1AB1292A002EBECF /* CCObjectExtensionData.cpp in Sources */, 15AE183D19AAD2F700C27E9E /* CCSkeleton3D.cpp in Sources */, + B6DD2FF21B04825B00E47F5F /* DetourTileCacheBuilder.cpp in Sources */, 503DD8E11926736A00CD74DD /* CCApplication-ios.mm in Sources */, 15AE1AAC19AAD40300C27E9E /* b2WorldCallbacks.cpp in Sources */, B6CAB20C1AF9AA1A00B9B856 /* btQuantizedBvh.cpp in Sources */, B6CAB3F21AF9AA1A00B9B856 /* btSimpleDynamicsWorld.cpp in Sources */, 15AE18C719AAD33D00C27E9E /* CCMenuItemImageLoader.cpp in Sources */, + B6DD2FF61B04825B00E47F5F /* fastlz.c in Sources */, 50ABC01A1926664800A911A9 /* CCSAXParser.cpp in Sources */, B29A7E1C19EE1B7700872B35 /* SkeletonJson.c in Sources */, B2CC507C19776DD10041958E /* CCPhysicsJoint.cpp in Sources */, @@ -11391,6 +11738,7 @@ B29A7E0C19EE1B7700872B35 /* Atlas.c in Sources */, 15AE185E19AAD31200C27E9E /* CocosDenshion.m in Sources */, B665E2071AA80A6500DDB1C5 /* CCPUBaseCollider.cpp in Sources */, + B6DD2FB01B04825B00E47F5F /* RecastDebugDraw.cpp in Sources */, 46A170FE1807CECB005B8026 /* CCPhysicsContact.cpp in Sources */, 1A570062180BC5A10088DEC7 /* CCAction.cpp in Sources */, 1A570066180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */, @@ -11489,6 +11837,7 @@ 50ABBE761925AB6F00A911A9 /* CCEventListenerTouch.cpp in Sources */, 15AE1AD219AAD40300C27E9E /* b2RopeJoint.cpp in Sources */, B29A7DCC19EE1B7700872B35 /* Skeleton.c in Sources */, + B6DD2FEE1B04825B00E47F5F /* DetourTileCache.cpp in Sources */, B6CAB2B41AF9AA1A00B9B856 /* btConvexShape.cpp in Sources */, 15AE1A4919AAD3D500C27E9E /* b2CircleShape.cpp in Sources */, 15AE184119AAD2F700C27E9E /* CCSprite3D.cpp in Sources */, @@ -11510,6 +11859,7 @@ 15AE1A3E19AAD3D500C27E9E /* b2CollidePolygon.cpp in Sources */, 15AE1AB219AAD40300C27E9E /* b2CircleContact.cpp in Sources */, B29A7E2619EE1B7700872B35 /* Attachment.c in Sources */, + B6DD2FDA1B04825B00E47F5F /* DetourLocalBoundary.cpp in Sources */, 15AE18C119AAD33D00C27E9E /* CCLayerColorLoader.cpp in Sources */, 50ABBD551925AB0000A911A9 /* TransformUtils.cpp in Sources */, B665E2CF1AA80A6500DDB1C5 /* CCPUInterParticleCollider.cpp in Sources */, @@ -11517,6 +11867,7 @@ 15AE193619AAD35100C27E9E /* CCArmature.cpp in Sources */, 1A57007A180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, 15AE1AC419AAD40300C27E9E /* b2FrictionJoint.cpp in Sources */, + B6DD2FDE1B04825B00E47F5F /* DetourObstacleAvoidance.cpp in Sources */, 15AE1BEC19AAE01E00C27E9E /* CCControlColourPicker.cpp in Sources */, B6CAB2361AF9AA1A00B9B856 /* btCompoundCollisionAlgorithm.cpp in Sources */, 382383FD1A258FA7002C4610 /* idl_gen_text.cpp in Sources */, @@ -11560,6 +11911,7 @@ B6CAB3341AF9AA1A00B9B856 /* btGImpactShape.cpp in Sources */, B6CAB4C61AF9AA1A00B9B856 /* boxBoxDistance.cpp in Sources */, 1A57008E180BC5A10088DEC7 /* CCActionTiledGrid.cpp in Sources */, + B677B0CE1B18492D006762CB /* CCNavMeshAgent.cpp in Sources */, B6CAB2A01AF9AA1A00B9B856 /* btConvex2dShape.cpp in Sources */, 1A570092180BC5A10088DEC7 /* CCActionTween.cpp in Sources */, 1A570099180BC5C10088DEC7 /* CCAtlasNode.cpp in Sources */, @@ -11567,6 +11919,7 @@ B6CAAFF31AF9A9E100B9B856 /* CCPhysics3DObject.cpp in Sources */, B665E2931AA80A6500DDB1C5 /* CCPUEmitter.cpp in Sources */, 50ABBD4D1925AB0000A911A9 /* MathUtil.cpp in Sources */, + B6DD2FCC1B04825B00E47F5F /* DetourNavMeshQuery.cpp in Sources */, 50ABBE3E1925AB6F00A911A9 /* CCDataVisitor.cpp in Sources */, B6CAB4B21AF9AA1A00B9B856 /* SpuContactManifoldCollisionAlgorithm.cpp in Sources */, 1A57009F180BC5D20088DEC7 /* CCNode.cpp in Sources */, @@ -11588,6 +11941,7 @@ B6CAB3F81AF9AA1A00B9B856 /* btMultiBody.cpp in Sources */, 503DD8E21926736A00CD74DD /* CCCommon-ios.mm in Sources */, 292DB14A19B4574100A80320 /* UIEditBoxImpl-ios.mm in Sources */, + B677B0D61B18492D006762CB /* CCNavMeshObstacle.cpp in Sources */, B6CAB2561AF9AA1A00B9B856 /* btGhostObject.cpp in Sources */, 15AE1A9419AAD40300C27E9E /* b2BlockAllocator.cpp in Sources */, B29A7E3C19EE1B7700872B35 /* Animation.c in Sources */, @@ -11609,6 +11963,7 @@ 1A5701A6180BCB590088DEC7 /* CCFontAtlasCache.cpp in Sources */, 15AE192B19AAD35100C27E9E /* TriggerObj.cpp in Sources */, B6CAAFEB1AF9A9E100B9B856 /* CCPhysics3DConstraint.cpp in Sources */, + B677B0D21B18492D006762CB /* CCNavMeshDebugDraw.cpp in Sources */, 4D76BE3B1A4AAF0A00102962 /* CCActionTimelineNode.cpp in Sources */, 15AE198519AAD36400C27E9E /* WidgetReader.cpp in Sources */, B665E36B1AA80A6500DDB1C5 /* CCPUOnVelocityObserver.cpp in Sources */, @@ -11648,6 +12003,7 @@ B665E3771AA80A6500DDB1C5 /* CCPUParticleFollowerTranslator.cpp in Sources */, B6CAB4CA1AF9AA1A00B9B856 /* SpuCollisionShapes.cpp in Sources */, 15AE1B7C19AADA9A00C27E9E /* UISlider.cpp in Sources */, + B6DD2FC41B04825B00E47F5F /* DetourNavMesh.cpp in Sources */, B6CAAFFB1AF9A9E100B9B856 /* CCPhysics3DWorld.cpp in Sources */, B665E3471AA80A6500DDB1C5 /* CCPUOnExpireObserverTranslator.cpp in Sources */, B6CAB2A41AF9AA1A00B9B856 /* btConvexHullShape.cpp in Sources */, @@ -11720,6 +12076,7 @@ 503DD8ED1926736A00CD74DD /* CCGLViewImpl-ios.mm in Sources */, 15AE197719AAD35700C27E9E /* CCActionTimeline.cpp in Sources */, 15AE19B419AAD39700C27E9E /* TextAtlasReader.cpp in Sources */, + B6DD2FA81B04825B00E47F5F /* DebugDraw.cpp in Sources */, B665E2A31AA80A6500DDB1C5 /* CCPUEventHandlerManager.cpp in Sources */, B6CAB3601AF9AA1A00B9B856 /* gim_tri_collision.cpp in Sources */, 15AE194019AAD35100C27E9E /* CCBone.cpp in Sources */, @@ -11746,9 +12103,11 @@ B6CAB1FA1AF9AA1A00B9B856 /* btDbvtBroadphase.cpp in Sources */, 15AE1A4319AAD3D500C27E9E /* b2DynamicTree.cpp in Sources */, 15AE1A3A19AAD3D500C27E9E /* b2BroadPhase.cpp in Sources */, + B6DD2FC81B04825B00E47F5F /* DetourNavMeshBuilder.cpp in Sources */, B665E42B1AA80A6600DDB1C5 /* CCPUVelocityMatchingAffector.cpp in Sources */, B665E3371AA80A6500DDB1C5 /* CCPUOnEmissionObserverTranslator.cpp in Sources */, 15AE19B619AAD39700C27E9E /* TextBMFontReader.cpp in Sources */, + B6DD2FBE1B04825B00E47F5F /* DetourCommon.cpp in Sources */, 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, 38F5263F1A48363B000DB7F7 /* ArmatureNodeReader.cpp in Sources */, @@ -11844,6 +12203,7 @@ 1A5702F7180BCE750088DEC7 /* CCTMXTiledMap.cpp in Sources */, 50ABBEC61925AB6F00A911A9 /* etc1.cpp in Sources */, 50ABBE8C1925AB6F00A911A9 /* CCNS.cpp in Sources */, + B6DD2FAC1B04825B00E47F5F /* DetourDebugDraw.cpp in Sources */, B29A7DE019EE1B7700872B35 /* IkConstraintData.c in Sources */, B6CAB40C1AF9AA1A00B9B856 /* btMultiBodyJointMotor.cpp in Sources */, B6CAB2D21AF9AA1A00B9B856 /* btMultiSphereShape.cpp in Sources */, @@ -11935,9 +12295,11 @@ B6CAB3821AF9AA1A00B9B856 /* btMinkowskiPenetrationDepthSolver.cpp in Sources */, B6CAB3641AF9AA1A00B9B856 /* btContinuousConvexCollision.cpp in Sources */, 52B47A2F1A5349A3004E4C60 /* HttpAsynConnection.m in Sources */, + B6DD2FB41B04825B00E47F5F /* RecastDump.cpp in Sources */, B665E23B1AA80A6500DDB1C5 /* CCPUCircleEmitter.cpp in Sources */, 15AE1B8019AADA9A00C27E9E /* UITextAtlas.cpp in Sources */, 15AE195919AAD35100C27E9E /* CCProcessBase.cpp in Sources */, + B6DD2FB81B04825B00E47F5F /* DetourAlloc.cpp in Sources */, B665E3FF1AA80A6600DDB1C5 /* CCPUSphereCollider.cpp in Sources */, 15AE18D319AAD33D00C27E9E /* CCParticleSystemQuadLoader.cpp in Sources */, B6CAB4CE1AF9AA1A00B9B856 /* SpuContactResult.cpp in Sources */, @@ -11951,6 +12313,7 @@ 15AE195719AAD35100C27E9E /* CCInputDelegate.cpp in Sources */, B6CAB32A1AF9AA1A00B9B856 /* btGImpactCollisionAlgorithm.cpp in Sources */, 15AE1B8A19AADA9A00C27E9E /* UIImageView.cpp in Sources */, + B6DD2FD61B04825B00E47F5F /* DetourCrowd.cpp in Sources */, 50ABBD391925AB0000A911A9 /* CCAffineTransform.cpp in Sources */, B6CAB5421AF9AA1A00B9B856 /* MiniCL.cpp in Sources */, B6CAB4AE1AF9AA1A00B9B856 /* SpuCollisionTaskProcess.cpp in Sources */, @@ -12039,6 +12402,7 @@ 50ABBD5D1925AB0000A911A9 /* Vec3.cpp in Sources */, B6CAB2061AF9AA1A00B9B856 /* btOverlappingPairCache.cpp in Sources */, 38B8E2D619E66581002D7CE7 /* CSLoader.cpp in Sources */, + B677B0CA1B18492D006762CB /* CCNavMesh.cpp in Sources */, B665E3B31AA80A6500DDB1C5 /* CCPURendererTranslator.cpp in Sources */, B6CAAFE71AF9A9E100B9B856 /* CCPhysics3DComponent.cpp in Sources */, B6CAB2141AF9AA1A00B9B856 /* btActivatingCollisionAlgorithm.cpp in Sources */, @@ -12069,6 +12433,7 @@ D0FD034C1A3B51AA00825BB5 /* CCAllocatorDiagnostics.cpp in Sources */, B665E31F1AA80A6500DDB1C5 /* CCPUOnClearObserverTranslator.cpp in Sources */, B665E4331AA80A6600DDB1C5 /* CCPUVertexEmitter.cpp in Sources */, + B677B0DA1B18492D006762CB /* CCNavMeshUtils.cpp in Sources */, B665E3C71AA80A6600DDB1C5 /* CCPUScaleVelocityAffector.cpp in Sources */, B6CAB26E1AF9AA1A00B9B856 /* btSphereSphereCollisionAlgorithm.cpp in Sources */, 50ABBED01925AB6F00A911A9 /* TGAlib.cpp in Sources */, @@ -12086,7 +12451,9 @@ B6CAB3121AF9AA1A00B9B856 /* btUniformScalingShape.cpp in Sources */, 1A1645B3191B726C008C7C7F /* ConvertUTFWrapper.cpp in Sources */, 15B3708519EE414C00ABE682 /* Downloader.cpp in Sources */, + B6DD2FEA1B04825B00E47F5F /* DetourProximityGrid.cpp in Sources */, 1ABA68AF1888D700007D1BB4 /* CCFontCharMap.cpp in Sources */, + B6DD2FD01B04825B00E47F5F /* DetourNode.cpp in Sources */, B6CAB2DE1AF9AA1A00B9B856 /* btScaledBvhTriangleMeshShape.cpp in Sources */, 15AE180D19AAD2F700C27E9E /* CCAnimate3D.cpp in Sources */, B6CAB1EE1AF9AA1A00B9B856 /* btBroadphaseProxy.cpp in Sources */, diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index c51f3af65659..2d6b5cad3dae 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -834,6 +834,8 @@ B603F1B51AC8FBFB00A9579C /* TerrainTest in Resources */ = {isa = PBXBuildFile; fileRef = B603F1B31AC8FBFB00A9579C /* TerrainTest */; }; B609E67319C18DAD003D0074 /* BillBoardTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B609E67119C18DAD003D0074 /* BillBoardTest.cpp */; }; B609E67419C18DAD003D0074 /* BillBoardTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B609E67119C18DAD003D0074 /* BillBoardTest.cpp */; }; + B61E90CB1B12B74B00BE69EA /* NavMesh in Resources */ = {isa = PBXBuildFile; fileRef = B61E90CA1B12B74B00BE69EA /* NavMesh */; }; + B61E90CC1B12B74B00BE69EA /* NavMesh in Resources */ = {isa = PBXBuildFile; fileRef = B61E90CA1B12B74B00BE69EA /* NavMesh */; }; B6337DF71ABA9B44005AEF24 /* PerformanceParticle3DTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6337DF51ABA9B44005AEF24 /* PerformanceParticle3DTest.cpp */; }; B6337DF81ABA9B44005AEF24 /* PerformanceParticle3DTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6337DF51ABA9B44005AEF24 /* PerformanceParticle3DTest.cpp */; }; B639932E1A490EC700B07923 /* Particle3DTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B639932C1A490EC700B07923 /* Particle3DTest.cpp */; }; @@ -844,6 +846,8 @@ B6C039DA19C95D83007207DC /* LightTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6C039D719C95D83007207DC /* LightTest.cpp */; }; B6CAB54E1AF9AA6C00B9B856 /* Physics3DTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB54C1AF9AA6C00B9B856 /* Physics3DTest.cpp */; }; B6CAB54F1AF9AA6C00B9B856 /* Physics3DTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6CAB54C1AF9AA6C00B9B856 /* Physics3DTest.cpp */; }; + B6DD2FFC1B04979C00E47F5F /* NavMeshTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FFA1B04979C00E47F5F /* NavMeshTest.cpp */; }; + B6DD2FFD1B04979C00E47F5F /* NavMeshTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B6DD2FFA1B04979C00E47F5F /* NavMeshTest.cpp */; }; C04F935A1941B05400E9FEAB /* TileMapTest2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C04F93581941B05400E9FEAB /* TileMapTest2.cpp */; }; C04F935B1941B05400E9FEAB /* TileMapTest2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C04F93581941B05400E9FEAB /* TileMapTest2.cpp */; }; C08689C118D370C90093E810 /* background.caf in Resources */ = {isa = PBXBuildFile; fileRef = C08689C018D370C90093E810 /* background.caf */; }; @@ -1784,6 +1788,7 @@ B603F1B31AC8FBFB00A9579C /* TerrainTest */ = {isa = PBXFileReference; lastKnownFileType = folder; name = TerrainTest; path = "../tests/cpp-tests/Resources/TerrainTest"; sourceTree = ""; }; B609E67119C18DAD003D0074 /* BillBoardTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BillBoardTest.cpp; path = BillBoardTest/BillBoardTest.cpp; sourceTree = ""; }; B609E67219C18DAD003D0074 /* BillBoardTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BillBoardTest.h; path = BillBoardTest/BillBoardTest.h; sourceTree = ""; }; + B61E90CA1B12B74B00BE69EA /* NavMesh */ = {isa = PBXFileReference; lastKnownFileType = folder; name = NavMesh; path = "../tests/cpp-tests/Resources/NavMesh"; sourceTree = ""; }; B6337DF51ABA9B44005AEF24 /* PerformanceParticle3DTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceParticle3DTest.cpp; sourceTree = ""; }; B6337DF61ABA9B44005AEF24 /* PerformanceParticle3DTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceParticle3DTest.h; sourceTree = ""; }; B639932C1A490EC700B07923 /* Particle3DTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Particle3DTest.cpp; path = Particle3DTest/Particle3DTest.cpp; sourceTree = ""; }; @@ -1793,6 +1798,8 @@ B6C039D819C95D83007207DC /* LightTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LightTest.h; path = LightTest/LightTest.h; sourceTree = ""; }; B6CAB54C1AF9AA6C00B9B856 /* Physics3DTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Physics3DTest.cpp; path = Physics3DTest/Physics3DTest.cpp; sourceTree = ""; }; B6CAB54D1AF9AA6C00B9B856 /* Physics3DTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Physics3DTest.h; path = Physics3DTest/Physics3DTest.h; sourceTree = ""; }; + B6DD2FFA1B04979C00E47F5F /* NavMeshTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NavMeshTest.cpp; path = NavMeshTest/NavMeshTest.cpp; sourceTree = ""; }; + B6DD2FFB1B04979C00E47F5F /* NavMeshTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NavMeshTest.h; path = NavMeshTest/NavMeshTest.h; sourceTree = ""; }; C04F93581941B05400E9FEAB /* TileMapTest2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TileMapTest2.cpp; sourceTree = ""; }; C04F93591941B05400E9FEAB /* TileMapTest2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TileMapTest2.h; sourceTree = ""; }; C08689C018D370C90093E810 /* background.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = background.caf; path = "../tests/cpp-tests/Resources/background.caf"; sourceTree = ""; }; @@ -2211,6 +2218,7 @@ 1AC3592418CECF0A00F37B72 /* Classes */ = { isa = PBXGroup; children = ( + B6DD2FF91B04972B00E47F5F /* NavMeshTest */, B6CAB54B1AF9AA4B00B9B856 /* Physics3DTest */, 5046AB471AF2A8D80060550B /* MaterialSystemTest */, 6886696E1AE8E8A000C2CFD9 /* SpritePolygonTest */, @@ -3253,6 +3261,7 @@ 1AC35CA818CED83500F37B72 /* Resources */ = { isa = PBXGroup; children = ( + B61E90CA1B12B74B00BE69EA /* NavMesh */, 5046AB5A1AF2C4180060550B /* Materials */, B603F1B31AC8FBFB00A9579C /* TerrainTest */, B63993301A49359F00B07923 /* Particle3D */, @@ -4062,6 +4071,15 @@ name = Physics3DTest; sourceTree = ""; }; + B6DD2FF91B04972B00E47F5F /* NavMeshTest */ = { + isa = PBXGroup; + children = ( + B6DD2FFA1B04979C00E47F5F /* NavMeshTest.cpp */, + B6DD2FFB1B04979C00E47F5F /* NavMeshTest.h */, + ); + name = NavMeshTest; + sourceTree = ""; + }; D0FD03611A3B543700825BB5 /* AllocatorTest */ = { isa = PBXGroup; children = ( @@ -4273,6 +4291,11 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 0600; + TargetAttributes = { + 1D6058900D05DD3D006BFB54 = { + DevelopmentTeam = U7E7529TA5; + }; + }; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "cocos2d_tests" */; compatibilityVersion = "Xcode 3.2"; @@ -4567,6 +4590,7 @@ 1AC35CDE18CED84500F37B72 /* components in Resources */, 1AC35D0818CED84500F37B72 /* TileMaps in Resources */, 1AC35CE218CED84500F37B72 /* effect1.raw in Resources */, + B61E90CB1B12B74B00BE69EA /* NavMesh in Resources */, 1AC35CF218CED84500F37B72 /* Hello.png in Resources */, 1AC35CA518CECF1E00F37B72 /* Icon.icns in Resources */, 5046AB5B1AF2C4180060550B /* Materials in Resources */, @@ -4665,6 +4689,7 @@ 1AC35C8F18CECF1400F37B72 /* Icon-152.png in Resources */, 1AC35CE718CED84500F37B72 /* effect2.ogg in Resources */, 38FA2E77194AECF800FF2BE4 /* ActionTimeline in Resources */, + B61E90CC1B12B74B00BE69EA /* NavMesh in Resources */, 1AC35C9718CECF1400F37B72 /* Icon-80.png in Resources */, 1AC35CEB18CED84500F37B72 /* fileLookup.plist in Resources */, 527B1F3519EF9CF8000A1F82 /* Default-736h@3x.png in Resources */, @@ -4957,6 +4982,7 @@ 1AC35BE718CECF0C00F37B72 /* CCControlScene.cpp in Sources */, B609E67319C18DAD003D0074 /* BillBoardTest.cpp in Sources */, 292CF01419A1965E00E8E6A0 /* UIEditBoxTest.cpp in Sources */, + B6DD2FFC1B04979C00E47F5F /* NavMeshTest.cpp in Sources */, D0FD03641A3B546400825BB5 /* AllocatorTest.cpp in Sources */, 29080DBF191B595E0066F8DF /* UIPageViewTest_Editor.cpp in Sources */, 1AC35B5F18CECF0C00F37B72 /* DataVisitorTest.cpp in Sources */, @@ -5267,6 +5293,7 @@ 1AC35BFC18CECF0C00F37B72 /* NotificationCenterTest.cpp in Sources */, 29FBBBFF196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */, 1AC35C3618CECF0C00F37B72 /* PerformanceSpriteTest.cpp in Sources */, + B6DD2FFD1B04979C00E47F5F /* NavMeshTest.cpp in Sources */, B6C039DA19C95D83007207DC /* LightTest.cpp in Sources */, 1AC35C3C18CECF0C00F37B72 /* PerformanceTouchesTest.cpp in Sources */, 29080DA2191B595E0066F8DF /* GUIEditorTest.cpp in Sources */, diff --git a/cocos/2d/CCScene.cpp b/cocos/2d/CCScene.cpp index 6b7dcd260b11..d2945449bb3c 100644 --- a/cocos/2d/CCScene.cpp +++ b/cocos/2d/CCScene.cpp @@ -43,6 +43,10 @@ THE SOFTWARE. #include "physics3d/CCPhysics3DComponent.h" #endif +#if CC_USE_NAVMESH +#include "navmesh/CCNavMesh.h" +#endif + NS_CC_BEGIN Scene::Scene() @@ -53,6 +57,10 @@ Scene::Scene() #if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION _physics3DWorld = nullptr; _physics3dDebugCamera = nullptr; +#endif +#if CC_USE_NAVMESH + _navMesh = nullptr; + _navMeshDebugCamera = nullptr; #endif _ignoreAnchorPointForPosition = true; setAnchorPoint(Vec2(0.5f, 0.5f)); @@ -75,11 +83,26 @@ Scene::~Scene() #if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION CC_SAFE_RELEASE(_physics3DWorld); CC_SAFE_RELEASE(_physics3dDebugCamera); +#endif +#if CC_USE_NAVMESH + CC_SAFE_RELEASE(_navMesh); #endif Director::getInstance()->getEventDispatcher()->removeEventListener(_event); CC_SAFE_RELEASE(_event); } +#if CC_USE_NAVMESH +void Scene::setNavMesh(NavMesh* navMesh) +{ + if (_navMesh != navMesh) + { + CC_SAFE_RETAIN(navMesh); + CC_SAFE_RELEASE(_navMesh); + _navMesh = navMesh; + } +} +#endif + bool Scene::init() { auto size = Director::getInstance()->getWinSize(); @@ -169,6 +192,12 @@ void Scene::render(Renderer* renderer) camera->clearBackground(1.0); //visit the scene visit(renderer, transform, 0); +#if CC_USE_NAVMESH + if (_navMesh && _navMeshDebugCamera == camera) + { + _navMesh->debugDraw(renderer); + } +#endif renderer->render(); @@ -213,6 +242,16 @@ void Scene::setPhysics3DDebugCamera(Camera* camera) } #endif +#if CC_USE_NAVMESH +void Scene::setNavMeshDebugCamera(Camera *camera) +{ + CC_SAFE_RETAIN(camera); + CC_SAFE_RELEASE(_navMeshDebugCamera); + _navMeshDebugCamera = camera; +} + +#endif + #if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION)) void Scene::addChild(Node* child, int zOrder, int tag) { @@ -298,4 +337,28 @@ void Scene::addChildToPhysicsWorld(Node* child) #endif +#if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION) || CC_USE_NAVMESH) +void Scene::stepPhysicsAndNavigation(float deltaTime) +{ +#if CC_USE_PHYSICS + if (_physicsWorld && _physicsWorld->isAutoStep()) + { + _physicsWorld->update(deltaTime, false); + } +#endif +#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION + if (_physics3DWorld) + { + _physics3DWorld->stepSimulate(deltaTime); + } +#endif +#if CC_USE_NAVMESH + if (_navMesh) + { + _navMesh->update(deltaTime); + } +#endif +} +#endif + NS_CC_END diff --git a/cocos/2d/CCScene.h b/cocos/2d/CCScene.h index 0b3701f0647f..34f2063e8453 100644 --- a/cocos/2d/CCScene.h +++ b/cocos/2d/CCScene.h @@ -44,6 +44,10 @@ class PhysicsWorld; #if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION class Physics3DWorld; #endif +#if CC_USE_NAVMESH +class NavMesh; +#endif + /** * @addtogroup _2d * @{ @@ -90,7 +94,7 @@ class CC_DLL Scene : public Node const std::vector& getCameras() const { return _cameras; } /** Get the default camera. - * @js NA + * @js NA * @return The default camera of scene. */ Camera* getDefaultCamera() const { return _defaultCamera; } @@ -186,6 +190,27 @@ class CC_DLL Scene : public Node Camera* _physics3dDebugCamera; // #endif #endif // (CC_USE_PHYSICS || CC_USE_3D_PHYSICS) + +#if CC_USE_NAVMESH +public: + /** set navigation mesh */ + void setNavMesh(NavMesh* navMesh); + /** get navigation mesh */ + NavMesh* getNavMesh() const { return _navMesh; } + /** + * Set NavMesh debug draw camera. + */ + void setNavMeshDebugCamera(Camera *camera); + +protected: + NavMesh* _navMesh; + Camera * _navMeshDebugCamera; +#endif + +#if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION) || CC_USE_NAVMESH) +public: + void stepPhysicsAndNavigation(float deltaTime); +#endif }; // end of _2d group diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index 2d8e4e6164fc..275310dd895d 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -564,6 +564,11 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + + + + + @@ -1153,6 +1158,11 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* + + + + + @@ -1340,6 +1350,9 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.* {012dff48-a13f-4f52-b07b-f8b9d21ce95b} + + {41e34993-647e-4282-8384-4ab1ae31a452} + {b7c2a162-dec9-4418-972e-240ab3cbfcae} diff --git a/cocos/2d/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d.vcxproj.filters index 93e894b2a849..397222cdef76 100644 --- a/cocos/2d/libcocos2d.vcxproj.filters +++ b/cocos/2d/libcocos2d.vcxproj.filters @@ -271,6 +271,9 @@ {e492faef-2169-4117-8d73-e0c66271fe25} + + {0f3fa25d-9e2b-4a2e-a1df-834b796b3fb3} + @@ -1872,6 +1875,24 @@ renderer + + navmesh + + + navmesh + + + navmesh + + + navmesh + + + navmesh + + + base + renderer @@ -3666,6 +3687,24 @@ renderer + + navmesh + + + navmesh + + + navmesh + + + navmesh + + + navmesh + + + base + renderer diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems index 00b3fc94fbe0..341529c72e90 100644 --- a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems @@ -441,6 +441,11 @@ + + + + + @@ -1034,6 +1039,11 @@ + + + + + diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters index 6d8b2f86380e..fcda1bb61e0d 100644 --- a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Shared/libcocos2d_8_1.Shared.vcxitems.filters @@ -1792,6 +1792,16 @@ renderer + + + + + + + + + + @@ -3418,6 +3428,17 @@ renderer + + + + + + + + + + + diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj index 804753da1f24..8bdcba8f73d7 100644 --- a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj @@ -33,6 +33,9 @@ {ec2b1292-2d8c-4feb-a84b-2550b32c1ae7} + + {19e35654-a3ec-48fa-bb21-082a2356c87c} + {f3550fe0-c795-44f6-8feb-093eb68143ae} diff --git a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj index 205e35193eae..98c4dd686a2d 100644 --- a/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj +++ b/cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj @@ -25,6 +25,9 @@ {e35634bd-b91b-4a6d-b957-96f56dd065f9} + + {d3bcfc1a-94bd-43b7-9c15-3f48ac6a9fac} + {cc1da216-a80d-4be4-b309-acb6af313aff} diff --git a/cocos/3d/CCBundle3D.cpp b/cocos/3d/CCBundle3D.cpp index baccc3db2ea9..b683e93e844e 100644 --- a/cocos/3d/CCBundle3D.cpp +++ b/cocos/3d/CCBundle3D.cpp @@ -2123,14 +2123,36 @@ Reference* Bundle3D::seekToFirstType(unsigned int type, const std::string& id) std::vector Bundle3D::getTrianglesList(const std::string& path) { std::vector trianglesList; + + if (path.length() <= 4) + return trianglesList; + auto bundle = Bundle3D::createBundle(); - if (!bundle->load(path)) + std::string ext = path.substr(path.length() - 4, 4); + std::transform(ext.begin(), ext.end(), ext.begin(), tolower); + MeshDatas meshs; + if (ext == ".obj") { - Bundle3D::destroyBundle(bundle); - return trianglesList; + MaterialDatas materials; + NodeDatas nodes; + if (!Bundle3D::loadObj(meshs, materials, nodes, path)) + { + Bundle3D::destroyBundle(bundle); + return trianglesList; + } } - MeshDatas meshs; - bundle->loadMeshDatas(meshs); + else + { + if (!bundle->load(path)) + { + Bundle3D::destroyBundle(bundle); + return trianglesList; + } + + bundle->loadMeshDatas(meshs); + + } + Bundle3D::destroyBundle(bundle); for (auto iter : meshs.meshDatas){ int preVertexSize = iter->getPerVertexSize() / sizeof(float); @@ -2140,6 +2162,7 @@ std::vector Bundle3D::getTrianglesList(const std::string& path) } } } + return trianglesList; } diff --git a/cocos/3d/CCObjLoader.cpp b/cocos/3d/CCObjLoader.cpp index 0c54442d958c..2facde285d1f 100644 --- a/cocos/3d/CCObjLoader.cpp +++ b/cocos/3d/CCObjLoader.cpp @@ -273,6 +273,15 @@ void InitMaterial(ObjLoader::material_t& material) material.unknown_parameter.clear(); } +static std::string& replacePathSeperator(std::string& path) +{ + for (int i = 0; i < path.size(); i++) { + if (path[i] == '\\') + path[i] = '/'; + } + return path; +} + std::string LoadMtl ( std::map& material_map, const char* filename, const char* mtl_basepath) { material_map.clear(); @@ -451,6 +460,7 @@ std::string LoadMtl ( std::map& material_map { token += 7; material.ambient_texname = trim(token); + replacePathSeperator(material.ambient_texname); continue; } @@ -459,6 +469,7 @@ std::string LoadMtl ( std::map& material_map { token += 7; material.diffuse_texname = trim(token); + replacePathSeperator(material.diffuse_texname); continue; } @@ -467,6 +478,7 @@ std::string LoadMtl ( std::map& material_map { token += 7; material.specular_texname = trim(token); + replacePathSeperator(material.specular_texname); continue; } @@ -475,6 +487,7 @@ std::string LoadMtl ( std::map& material_map { token += 7; material.normal_texname = trim(token); + replacePathSeperator(material.normal_texname); continue; } diff --git a/cocos/Android.mk b/cocos/Android.mk index fac1d806be40..bf6f09dc92e9 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -204,6 +204,11 @@ physics3d/CCPhysics3DObject.cpp \ physics3d/CCPhysics3DShape.cpp \ physics3d/CCPhysicsSprite3D.cpp \ physics3d/CCPhysics3DConstraint.cpp \ +navmesh/CCNavMesh.cpp \ +navmesh/CCNavMeshAgent.cpp \ +navmesh/CCNavMeshDebugDraw.cpp \ +navmesh/CCNavMeshObstacle.cpp \ +navmesh/CCNavMeshUtils.cpp \ ../external/ConvertUTF/ConvertUTFWrapper.cpp \ ../external/ConvertUTF/ConvertUTF.c \ ../external/tinyxml2/tinyxml2.cpp \ @@ -259,6 +264,7 @@ LOCAL_STATIC_LIBRARIES += cocos_tiff_static LOCAL_STATIC_LIBRARIES += cocos_webp_static LOCAL_STATIC_LIBRARIES += cocos_chipmunk_static LOCAL_STATIC_LIBRARIES += cocos_zlib_static +LOCAL_STATIC_LIBRARIES += recast_static LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dxandroid_static @@ -306,6 +312,7 @@ $(call import-module,ui) $(call import-module,extensions) $(call import-module,Box2D) $(call import-module,bullet) +$(call import-module,recast) $(call import-module,curl/prebuilt/android) $(call import-module,websockets/prebuilt/android) $(call import-module,flatbuffers) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index 3a4e88b45354..53ea160c86cd 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -37,6 +37,7 @@ include(platform/CMakeLists.txt) include(physics/CMakeLists.txt) include(physics3d/CMakeLists.txt) include(math/CMakeLists.txt) +include(navmesh/CMakeLists.txt) include(renderer/CMakeLists.txt) include(base/CMakeLists.txt) include(deprecated/CMakeLists.txt) @@ -70,6 +71,7 @@ set(COCOS_SRC cocos2d.cpp ${COCOS_PHYSICS_SRC} ${COCOS_PHYSICS3D_SRC} ${COCOS_MATH_SRC} + ${COCOS_NAVMESH_SRC} ${COCOS_RENDERER_SRC} ${COCOS_BASE_SRC} ${COCOS_AUDIO_SRC} @@ -156,6 +158,10 @@ if(USE_BULLET) cocos_use_pkg(cocos2d BULLET) endif() +if(USE_RECAST) + cocos_use_pkg(cocos2d RECAST) +endif() + set_target_properties(cocos2d PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index 0215b096d185..bffafa1aef65 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -67,14 +67,6 @@ THE SOFTWARE. #include "CCScriptSupport.h" #endif -#if CC_USE_PHYSICS -#include "physics/CCPhysicsWorld.h" -#endif - -#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION -#include "physics3d/CCPhysics3DWorld.h" -#endif - /** Position of the FPS @@ -292,19 +284,8 @@ void Director::drawScene() if (_runningScene) { -#if CC_USE_PHYSICS - auto physicsWorld = _runningScene->getPhysicsWorld(); - if (physicsWorld && physicsWorld->isAutoStep()) - { - physicsWorld->update(_deltaTime, false); - } -#endif -#if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION - auto physics3DWorld = _runningScene->getPhysics3DWorld(); - if (physics3DWorld) - { - physics3DWorld->stepSimulate(_deltaTime); - } +#if (CC_USE_PHYSICS || (CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION) || CC_USE_NAVMESH) + _runningScene->stepPhysicsAndNavigation(_deltaTime); #endif //clear draw stats _renderer->clearDrawStats(); diff --git a/cocos/base/ccConfig.h b/cocos/base/ccConfig.h index 550b9ba7ac0c..0d32b51f542a 100644 --- a/cocos/base/ccConfig.h +++ b/cocos/base/ccConfig.h @@ -260,6 +260,11 @@ THE SOFTWARE. #endif #endif +/** Use 3D navigation API */ +#ifndef CC_USE_NAVMESH +#define CC_USE_NAVMESH 1 +#endif + /** Use culling or not. */ #ifndef CC_USE_CULLING #define CC_USE_CULLING 1 diff --git a/cocos/navmesh/CCNavMesh.cpp b/cocos/navmesh/CCNavMesh.cpp new file mode 100644 index 000000000000..966b5bb8030a --- /dev/null +++ b/cocos/navmesh/CCNavMesh.cpp @@ -0,0 +1,637 @@ +/**************************************************************************** + Copyright (c) 2015 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 "navmesh/CCNavMesh.h" +#if CC_USE_NAVMESH + +#include "platform/CCFileUtils.h" +#include "renderer/CCRenderer.h" +#include "recast/Detour/DetourCommon.h" +#include "recast/DebugUtils/DetourDebugDraw.h" +#include + +NS_CC_BEGIN + +struct TileCacheSetHeader +{ + int magic; + int version; + int numTiles; + dtNavMeshParams meshParams; + dtTileCacheParams cacheParams; +}; + +struct TileCacheTileHeader +{ + dtCompressedTileRef tileRef; + int dataSize; +}; + +static unsigned char* parseRow(unsigned char* buf, unsigned char* bufEnd, char* row, int len) +{ + bool start = true; + bool done = false; + int n = 0; + while (!done && buf < bufEnd) + { + char c = *buf; + buf++; + // multirow + switch (c) + { + case '\n': + if (start) break; + done = true; + break; + case '\r': + break; + case '\t': + case ' ': + if (start) break; + default: + start = false; + row[n++] = c; + if (n >= len - 1) + done = true; + break; + } + } + row[n] = '\0'; + return buf; +} + +static const int TILECACHESET_MAGIC = 'T' << 24 | 'S' << 16 | 'E' << 8 | 'T'; //'TSET'; +static const int TILECACHESET_VERSION = 1; +static const int MAX_AGENTS = 128; + +NavMesh* NavMesh::create(const std::string &navFilePath, const std::string &geomFilePath) +{ + auto ref = new (std::nothrow) NavMesh(); + if (ref && ref->initWithFilePath(navFilePath, geomFilePath)) + { + ref->autorelease(); + return ref; + } + CC_SAFE_DELETE(ref); + return nullptr; +} + +NavMesh::NavMesh() + : _navMesh(nullptr) + , _navMeshQuery(nullptr) + , _crowed(nullptr) + , _tileCache(nullptr) + , _allocator(nullptr) + , _compressor(nullptr) + , _meshProcess(nullptr) + , _geomData(nullptr) + , _isDebugDrawEnabled(false) +{ + +} + +NavMesh::~NavMesh() +{ + dtFreeTileCache(_tileCache); + dtFreeCrowd(_crowed); + dtFreeNavMesh(_navMesh); + dtFreeNavMeshQuery(_navMeshQuery); + CC_SAFE_DELETE(_allocator); + CC_SAFE_DELETE(_compressor); + CC_SAFE_DELETE(_meshProcess); + CC_SAFE_DELETE(_geomData); + + for (auto iter : _agentList){ + CC_SAFE_RELEASE(iter); + } + _agentList.clear(); + + for (auto iter : _obstacleList){ + CC_SAFE_RELEASE(iter); + } + _obstacleList.clear(); +} + +bool NavMesh::initWithFilePath(const std::string &navFilePath, const std::string &geomFilePath) +{ + _navFilePath = navFilePath; + _geomFilePath = geomFilePath; + if (!read()) return false; + return true; +} + +bool NavMesh::read() +{ + if (!loadGeomFile()) return false; + if (!loadNavMeshFile()) return false; + + return true; +} + +bool NavMesh::loadNavMeshFile() +{ + auto data = FileUtils::getInstance()->getDataFromFile(_navFilePath); + if (data.isNull()) return false; + + // Read header. + unsigned int offset = 0; + TileCacheSetHeader header = *((TileCacheSetHeader*)(data.getBytes() + offset)); + offset += sizeof(TileCacheSetHeader); + if (header.magic != TILECACHESET_MAGIC) + { + return false; + } + if (header.version != TILECACHESET_VERSION) + { + return false; + } + + _navMesh = dtAllocNavMesh(); + if (!_navMesh) + { + return false; + } + dtStatus status = _navMesh->init(&header.meshParams); + if (dtStatusFailed(status)) + { + return false; + } + + _tileCache = dtAllocTileCache(); + if (!_tileCache) + { + return false; + } + + _allocator = new LinearAllocator(32000); + _compressor = new FastLZCompressor; + _meshProcess = new MeshProcess(_geomData); + status = _tileCache->init(&header.cacheParams, _allocator, _compressor, _meshProcess); + + if (dtStatusFailed(status)) + { + return false; + } + + // Read tiles. + for (int i = 0; i < header.numTiles; ++i) + { + TileCacheTileHeader tileHeader = *((TileCacheTileHeader*)(data.getBytes() + offset)); + offset += sizeof(TileCacheTileHeader); + if (!tileHeader.tileRef || !tileHeader.dataSize) + break; + + unsigned char* tileData = (unsigned char*)dtAlloc(tileHeader.dataSize, DT_ALLOC_PERM); + if (!tileData) break; + memcpy(tileData, (data.getBytes() + offset), tileHeader.dataSize); + offset += tileHeader.dataSize; + + dtCompressedTileRef tile = 0; + _tileCache->addTile(tileData, tileHeader.dataSize, DT_COMPRESSEDTILE_FREE_DATA, &tile); + + if (tile) + _tileCache->buildNavMeshTile(tile, _navMesh); + } + + //create crowed + _crowed = dtAllocCrowd(); + _crowed->init(MAX_AGENTS, header.cacheParams.walkableRadius, _navMesh); + + //create NavMeshQuery + _navMeshQuery = dtAllocNavMeshQuery(); + _navMeshQuery->init(_navMesh, 2048); + + _agentList.assign(MAX_AGENTS, nullptr); + _obstacleList.assign(header.cacheParams.maxObstacles, nullptr); + //duDebugDrawNavMesh(&_debugDraw, *_navMesh, DU_DRAWNAVMESH_OFFMESHCONS); + return true; +} + +bool NavMesh::loadGeomFile() +{ + unsigned char* buf = 0; + auto data = FileUtils::getInstance()->getDataFromFile(_geomFilePath); + if (data.isNull()) return false; + buf = data.getBytes(); + _geomData = new GeomData; + _geomData->offMeshConCount = 0; + + unsigned char* src = buf; + unsigned char* srcEnd = buf + data.getSize(); + char row[512]; + while (src < srcEnd) + { + // Parse one row + row[0] = '\0'; + src = parseRow(src, srcEnd, row, sizeof(row) / sizeof(char)); + if (row[0] == 'c') + { + // Off-mesh connection + if (_geomData->offMeshConCount < GeomData::MAX_OFFMESH_CONNECTIONS) + { + float* v = &_geomData->offMeshConVerts[_geomData->offMeshConCount * 3 * 2]; + int bidir, area = 0, flags = 0; + float rad; + sscanf(row + 1, "%f %f %f %f %f %f %f %d %d %d", + &v[0], &v[1], &v[2], &v[3], &v[4], &v[5], &rad, &bidir, &area, &flags); + _geomData->offMeshConRads[_geomData->offMeshConCount] = rad; + _geomData->offMeshConDirs[_geomData->offMeshConCount] = (unsigned char)bidir; + _geomData->offMeshConAreas[_geomData->offMeshConCount] = (unsigned char)area; + _geomData->offMeshConFlags[_geomData->offMeshConCount] = (unsigned short)flags; + _geomData->offMeshConCount++; + } + } + } + + return true; +} + +void NavMesh::dtDraw() +{ + drawObstacles(); + _debugDraw.depthMask(false); + duDebugDrawNavMeshWithClosedList(&_debugDraw, *_navMesh, *_navMeshQuery, DU_DRAWNAVMESH_OFFMESHCONS | DU_DRAWNAVMESH_CLOSEDLIST/* | DU_DRAWNAVMESH_COLOR_TILES*/); + drawAgents(); + drawOffMeshConnections(); + _debugDraw.depthMask(true); +} + +void cocos2d::NavMesh::drawOffMeshConnections() +{ + unsigned int conColor = duRGBA(192, 0, 128, 192); + unsigned int baseColor = duRGBA(0, 0, 0, 64); + _debugDraw.begin(DU_DRAW_LINES, 2.0f); + for (int i = 0; i < _geomData->offMeshConCount; ++i) + { + float* v = &_geomData->offMeshConVerts[i * 3 * 2]; + + _debugDraw.vertex(v[0], v[1], v[2], baseColor); + _debugDraw.vertex(v[0], v[1] + 0.2f, v[2], baseColor); + + _debugDraw.vertex(v[3], v[4], v[5], baseColor); + _debugDraw.vertex(v[3], v[4] + 0.2f, v[5], baseColor); + + duAppendCircle(&_debugDraw, v[0], v[1] + 0.1f, v[2], _geomData->offMeshConRads[i], baseColor); + duAppendCircle(&_debugDraw, v[3], v[4] + 0.1f, v[5], _geomData->offMeshConRads[i], baseColor); + + if (/*hilight*/true) + { + duAppendArc(&_debugDraw, v[0], v[1], v[2], v[3], v[4], v[5], 0.25f, + (_geomData->offMeshConDirs[i] & 1) ? 0.6f : 0.0f, 0.6f, conColor); + } + } + _debugDraw.end(); +} + +void cocos2d::NavMesh::drawObstacles() +{ + // Draw obstacles + for (auto iter : _obstacleList) + { + if (iter){ + const dtTileCacheObstacle* ob = _tileCache->getObstacleByRef(iter->_obstacleID); + if (ob->state == DT_OBSTACLE_EMPTY) continue; + float bmin[3], bmax[3]; + _tileCache->getObstacleBounds(ob, bmin, bmax); + + unsigned int col = 0; + if (ob->state == DT_OBSTACLE_PROCESSING) + col = duRGBA(255, 255, 0, 128); + else if (ob->state == DT_OBSTACLE_PROCESSED) + col = duRGBA(255, 192, 0, 192); + else if (ob->state == DT_OBSTACLE_REMOVING) + col = duRGBA(220, 0, 0, 128); + + duDebugDrawCylinder(&_debugDraw, bmin[0], bmin[1], bmin[2], bmax[0], bmax[1], bmax[2], col); + duDebugDrawCylinderWire(&_debugDraw, bmin[0], bmin[1], bmin[2], bmax[0], bmax[1], bmax[2], duDarkenCol(col), 2); + } + } +} + +void cocos2d::NavMesh::drawAgents() +{ + for (auto iter : _agentList) + { + if (iter){ + auto agent = _crowed->getAgent(iter->_agentID); + float r = iter->getRadius(); + float h = iter->getHeight(); + + unsigned int col = duRGBA(0, 0, 0, 32); + duDebugDrawCircle(&_debugDraw, agent->npos[0], agent->npos[1], agent->npos[2], r, col, 2.0f); + + col = duRGBA(220, 220, 220, 128); + if (agent->targetState == DT_CROWDAGENT_TARGET_REQUESTING || agent->targetState == DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE) + col = duLerpCol(col, duRGBA(128, 0, 255, 128), 32); + else if (agent->targetState == DT_CROWDAGENT_TARGET_WAITING_FOR_PATH) + col = duLerpCol(col, duRGBA(128, 0, 255, 128), 128); + else if (agent->targetState == DT_CROWDAGENT_TARGET_FAILED) + col = duRGBA(255, 32, 16, 128); + else if (agent->targetState == DT_CROWDAGENT_TARGET_VELOCITY) + col = duLerpCol(col, duRGBA(64, 255, 0, 128), 128); + + duDebugDrawCylinder(&_debugDraw, agent->npos[0] - r, agent->npos[1] + r*0.1f, agent->npos[2] - r, + agent->npos[0] + r, agent->npos[1] + h, agent->npos[2] + r, col); + + } + } + + // Velocity stuff. + for (auto iter : _agentList) + { + if (iter){ + auto agent = _crowed->getAgent(iter->_agentID); + + const float radius = agent->params.radius; + const float height = agent->params.height; + const float* pos = agent->npos; + const float* vel = agent->vel; +// const float* dvel = agent->dvel; + + unsigned int col = duRGBA(220, 220, 220, 192); + if (agent->targetState == DT_CROWDAGENT_TARGET_REQUESTING || agent->targetState == DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE) + col = duLerpCol(col, duRGBA(128, 0, 255, 192), 32); + else if (agent->targetState == DT_CROWDAGENT_TARGET_WAITING_FOR_PATH) + col = duLerpCol(col, duRGBA(128, 0, 255, 192), 128); + else if (agent->targetState == DT_CROWDAGENT_TARGET_FAILED) + col = duRGBA(255, 32, 16, 192); + else if (agent->targetState == DT_CROWDAGENT_TARGET_VELOCITY) + col = duLerpCol(col, duRGBA(64, 255, 0, 192), 128); + + duDebugDrawCircle(&_debugDraw, pos[0], pos[1] + height, pos[2], radius, col, 2.0f); + + //duDebugDrawArrow(&_debugDraw, pos[0], pos[1] + height, pos[2], + // pos[0] + dvel[0], pos[1] + height + dvel[1], pos[2] + dvel[2], + // 0.0f, 0.4f, duRGBA(0, 192, 255, 192), 2.0f); + + duDebugDrawArrow(&_debugDraw, pos[0], pos[1] + height, pos[2], + pos[0] + vel[0], pos[1] + height + vel[1], pos[2] + vel[2], + 0.0f, 0.4f, duRGBA(0, 0, 0, 160), 2.0f); + } + } +} + +void NavMesh::removeNavMeshObstacle(NavMeshObstacle *obstacle) +{ + auto iter = std::find(_obstacleList.begin(), _obstacleList.end(), obstacle); + if (iter != _obstacleList.end()){ + obstacle->removeFrom(_tileCache); + obstacle->release(); + _obstacleList[iter - _obstacleList.begin()] = nullptr; + } +} + +void NavMesh::addNavMeshObstacle(NavMeshObstacle *obstacle) +{ + auto iter = std::find(_obstacleList.begin(), _obstacleList.end(), nullptr); + if (iter != _obstacleList.end()){ + obstacle->addTo(_tileCache); + obstacle->retain(); + _obstacleList[iter - _obstacleList.begin()] = obstacle; + } +} + +void NavMesh::removeNavMeshAgent(NavMeshAgent *agent) +{ + auto iter = std::find(_agentList.begin(), _agentList.end(), agent); + if (iter != _agentList.end()){ + agent->removeFrom(_crowed); + agent->setNavMeshQuery(nullptr); + agent->release(); + _agentList[iter - _agentList.begin()] = nullptr; + } +} + +void NavMesh::addNavMeshAgent(NavMeshAgent *agent) +{ + auto iter = std::find(_agentList.begin(), _agentList.end(), nullptr); + if (iter != _agentList.end()){ + agent->addTo(_crowed); + agent->setNavMeshQuery(_navMeshQuery); + agent->retain(); + _agentList[iter - _agentList.begin()] = agent; + } +} + +bool NavMesh::isDebugDrawEnabled() const +{ + return _isDebugDrawEnabled; +} + +void NavMesh::setDebugDrawEnable(bool enable) +{ + _isDebugDrawEnabled = enable; +} + +void NavMesh::debugDraw(Renderer* renderer) +{ + if (_isDebugDrawEnabled){ + _debugDraw.clear(); + dtDraw(); + _debugDraw.draw(renderer); + } +} + +void NavMesh::update(float dt) +{ + for (auto iter : _agentList){ + if (iter) + iter->preUpdate(dt); + } + + for (auto iter : _obstacleList){ + if (iter) + iter->preUpdate(dt); + } + + if (_crowed) + _crowed->update(dt, nullptr); + + if (_tileCache) + _tileCache->update(dt, _navMesh); + + for (auto iter : _agentList){ + if (iter) + iter->postUpdate(dt); + } + + for (auto iter : _obstacleList){ + if (iter) + iter->postUpdate(dt); + } +} + +void cocos2d::NavMesh::findPath(const Vec3 &start, const Vec3 &end, std::vector &pathPoints) +{ + static const int MAX_POLYS = 256; + static const int MAX_SMOOTH = 2048; + int pathIterNum = 0; + float ext[3]; + ext[0] = 2; ext[1] = 4; ext[2] = 2; + dtQueryFilter filter; + dtPolyRef startRef, endRef; + dtPolyRef polys[MAX_POLYS]; + int npolys = 0; + _navMeshQuery->findNearestPoly(&start.x, ext, &filter, &startRef, 0); + _navMeshQuery->findNearestPoly(&end.x, ext, &filter, &endRef, 0); + _navMeshQuery->findPath(startRef, endRef, &start.x, &end.x, &filter, polys, &npolys, MAX_POLYS); + + if (npolys) + { + //// Iterate over the path to find smooth path on the detail mesh surface. + //dtPolyRef polys[MAX_POLYS]; + //memcpy(polys, polys, sizeof(dtPolyRef)*npolys); + //int npolys = npolys; + + float iterPos[3], targetPos[3]; + _navMeshQuery->closestPointOnPoly(startRef, &start.x, iterPos, 0); + _navMeshQuery->closestPointOnPoly(polys[npolys - 1], &end.x, targetPos, 0); + + static const float STEP_SIZE = 0.5f; + static const float SLOP = 0.01f; + + int nsmoothPath = 0; + //dtVcopy(&m_smoothPath[m_nsmoothPath * 3], iterPos); + //m_nsmoothPath++; + + pathPoints.push_back(Vec3(iterPos[0], iterPos[1], iterPos[2])); + nsmoothPath++; + + // Move towards target a small advancement at a time until target reached or + // when ran out of memory to store the path. + while (npolys && nsmoothPath < MAX_SMOOTH) + { + // Find location to steer towards. + float steerPos[3]; + unsigned char steerPosFlag; + dtPolyRef steerPosRef; + + if (!getSteerTarget(_navMeshQuery, iterPos, targetPos, SLOP, + polys, npolys, steerPos, steerPosFlag, steerPosRef)) + break; + + bool endOfPath = (steerPosFlag & DT_STRAIGHTPATH_END) ? true : false; + bool offMeshConnection = (steerPosFlag & DT_STRAIGHTPATH_OFFMESH_CONNECTION) ? true : false; + + // Find movement delta. + float delta[3], len; + dtVsub(delta, steerPos, iterPos); + len = dtMathSqrtf(dtVdot(delta, delta)); + // If the steer target is end of path or off-mesh link, do not move past the location. + if ((endOfPath || offMeshConnection) && len < STEP_SIZE) + len = 1; + else + len = STEP_SIZE / len; + float moveTgt[3]; + dtVmad(moveTgt, iterPos, delta, len); + + // Move + float result[3]; + dtPolyRef visited[16]; + int nvisited = 0; + _navMeshQuery->moveAlongSurface(polys[0], iterPos, moveTgt, &filter, + result, visited, &nvisited, 16); + + npolys = fixupCorridor(polys, npolys, MAX_POLYS, visited, nvisited); + npolys = fixupShortcuts(polys, npolys, _navMeshQuery); + + float h = 0; + _navMeshQuery->getPolyHeight(polys[0], result, &h); + result[1] = h; + dtVcopy(iterPos, result); + + // Handle end of path and off-mesh links when close enough. + if (endOfPath && inRange(iterPos, steerPos, SLOP, 1.0f)) + { + // Reached end of path. + dtVcopy(iterPos, targetPos); + if (nsmoothPath < MAX_SMOOTH) + { + //dtVcopy(&m_smoothPath[m_nsmoothPath * 3], iterPos); + //m_nsmoothPath++; + pathPoints.push_back(Vec3(iterPos[0], iterPos[1], iterPos[2])); + nsmoothPath++; + } + break; + } + else if (offMeshConnection && inRange(iterPos, steerPos, SLOP, 1.0f)) + { + // Reached off-mesh connection. + float startPos[3], endPos[3]; + + // Advance the path up to and over the off-mesh connection. + dtPolyRef prevRef = 0, polyRef = polys[0]; + int npos = 0; + while (npos < npolys && polyRef != steerPosRef) + { + prevRef = polyRef; + polyRef = polys[npos]; + npos++; + } + for (int i = npos; i < npolys; ++i) + polys[i - npos] = polys[i]; + npolys -= npos; + + // Handle the connection. + dtStatus status = _navMesh->getOffMeshConnectionPolyEndPoints(prevRef, polyRef, startPos, endPos); + if (dtStatusSucceed(status)) + { + if (nsmoothPath < MAX_SMOOTH) + { + //dtVcopy(&m_smoothPath[m_nsmoothPath * 3], startPos); + //m_nsmoothPath++; + pathPoints.push_back(Vec3(startPos[0], startPos[1], startPos[2])); + nsmoothPath++; + // Hack to make the dotted path not visible during off-mesh connection. + if (nsmoothPath & 1) + { + //dtVcopy(&m_smoothPath[m_nsmoothPath * 3], startPos); + //m_nsmoothPath++; + pathPoints.push_back(Vec3(startPos[0], startPos[1], startPos[2])); + nsmoothPath++; + } + } + // Move position at the other side of the off-mesh link. + dtVcopy(iterPos, endPos); + float eh = 0.0f; + _navMeshQuery->getPolyHeight(polys[0], iterPos, &eh); + iterPos[1] = eh; + } + } + + // Store results. + if (nsmoothPath < MAX_SMOOTH) + { + //dtVcopy(&m_smoothPath[m_nsmoothPath * 3], iterPos); + //m_nsmoothPath++; + + pathPoints.push_back(Vec3(iterPos[0], iterPos[1], iterPos[2])); + nsmoothPath++; + } + } + } +} + +NS_CC_END + +#endif //CC_USE_NAVMESH diff --git a/cocos/navmesh/CCNavMesh.h b/cocos/navmesh/CCNavMesh.h new file mode 100644 index 000000000000..1c9f81de0fc1 --- /dev/null +++ b/cocos/navmesh/CCNavMesh.h @@ -0,0 +1,139 @@ +/**************************************************************************** + Copyright (c) 2015 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 __CCNAV_MESH_H__ +#define __CCNAV_MESH_H__ + +#include "base/ccConfig.h" +#if CC_USE_NAVMESH + +#include "base/CCRef.h" +#include "math/Vec3.h" +#include "recast/Detour/DetourNavMesh.h" +#include "recast/Detour/DetourNavMeshQuery.h" +#include "recast/DetourCrowd/DetourCrowd.h" +#include "recast/DetourTileCache/DetourTileCache.h" +#include +#include + +#include "navmesh/CCNavMeshAgent.h" +#include "navmesh/CCNavMeshDebugDraw.h" +#include "navmesh/CCNavMeshObstacle.h" +#include "navmesh/CCNavMeshUtils.h" + + +NS_CC_BEGIN + +/** + * @addtogroup 3d + * @{ + */ +class Renderer; +/** @brief NavMesh: The NavMesh information container, include mesh, tileCache, and so on. */ +class CC_DLL NavMesh : public Ref +{ +public: + + /** + Create navmesh + + @param navFilePath The NavMesh File path. + @param geomFilePath The geometry File Path,include offmesh information,etc. + */ + static NavMesh* create(const std::string &navFilePath, const std::string &geomFilePath); + + /** update navmesh. */ + void update(float dt); + + /** Internal method, the updater of debug drawing, need called each frame. */ + void debugDraw(Renderer* renderer); + + /** Enable debug draw or disable. */ + void setDebugDrawEnable(bool enable); + + /** Check enabled debug draw. */ + bool isDebugDrawEnabled() const; + + /** add a agent to navmesh. */ + void addNavMeshAgent(NavMeshAgent *agent); + + /** remove a agent from navmesh. */ + void removeNavMeshAgent(NavMeshAgent *agent); + + /** add a obstacle to navmesh. */ + void addNavMeshObstacle(NavMeshObstacle *obstacle); + + /** remove a obstacle from navmesh. */ + void removeNavMeshObstacle(NavMeshObstacle *obstacle); + + /** + find a path on navmesh + + @param start The start search position in world coordinate system. + @param end The end search position in world coordinate system. + @param pathPoints the key points of path. + */ + void findPath(const Vec3 &start, const Vec3 &end, std::vector &pathPoints); + +CC_CONSTRUCTOR_ACCESS: + NavMesh(); + virtual ~NavMesh(); + +protected: + + bool initWithFilePath(const std::string &navFilePath, const std::string &geomFilePath); + bool read(); + bool loadNavMeshFile(); + bool loadGeomFile(); + void dtDraw(); + void drawAgents(); + void drawObstacles(); + void drawOffMeshConnections(); + +protected: + + dtNavMesh *_navMesh; + dtNavMeshQuery *_navMeshQuery; + dtCrowd *_crowed; + dtTileCache *_tileCache; + LinearAllocator *_allocator; + FastLZCompressor *_compressor; + MeshProcess *_meshProcess; + GeomData *_geomData; + + std::vector _agentList; + std::vector _obstacleList; + NavMeshDebugDraw _debugDraw; + std::string _navFilePath; + std::string _geomFilePath; + bool _isDebugDrawEnabled; +}; + +/** @} */ + +NS_CC_END + +#endif //CC_USE_NAVMESH + +#endif // __CCNAV_MESH_H__ diff --git a/cocos/navmesh/CCNavMeshAgent.cpp b/cocos/navmesh/CCNavMeshAgent.cpp new file mode 100644 index 000000000000..91d2fec40094 --- /dev/null +++ b/cocos/navmesh/CCNavMeshAgent.cpp @@ -0,0 +1,408 @@ +/**************************************************************************** + Copyright (c) 2015 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 "navmesh/CCNavMeshAgent.h" +#if CC_USE_NAVMESH + +#include "navmesh/CCNavMesh.h" +#include "recast/DetourCrowd/DetourCrowd.h" +#include "2d/CCNode.h" +#include "2d/CCScene.h" +#include + +NS_CC_BEGIN + +NavMeshAgentParam::NavMeshAgentParam() +: radius(0.6f) +, height(2.0f) +, maxAcceleration(8.0f) +, maxSpeed(3.5f) +, collisionQueryRange(radius * 12.0f) +, pathOptimizationRange(radius * 30.0f) +, updateFlags(DT_CROWD_ANTICIPATE_TURNS | DT_CROWD_OPTIMIZE_VIS | DT_CROWD_OPTIMIZE_TOPO | DT_CROWD_OBSTACLE_AVOIDANCE) +, obstacleAvoidanceType(3) +, separationWeight(2.0f) +, queryFilterType(0) +{ + +} + +NavMeshAgent* NavMeshAgent::create(const NavMeshAgentParam ¶m) +{ + auto ref = new (std::nothrow) NavMeshAgent(); + if (ref && ref->initWith(param)) + { + ref->autorelease(); + return ref; + } + CC_SAFE_DELETE(ref); + return nullptr; +} + +const std::string& NavMeshAgent::getNavMeshAgentComponentName() +{ + static std::string comName = "___NavMeshAgentComponent___"; + return comName; +} + +cocos2d::NavMeshAgent::NavMeshAgent() + : _agentID(-1) + , _needAutoOrientation(true) + , _crowd(nullptr) + , _needUpdateAgent(true) + , _needMove(false) + , _navMeshQuery(nullptr) + , _rotRefAxes(Vec3::UNIT_Z) + , _totalTimeAfterMove(0.0f) + , _userData(nullptr) + , _state(DT_CROWDAGENT_STATE_WALKING) + , _syncFlag(NODE_AND_NODE) +{ + +} + +cocos2d::NavMeshAgent::~NavMeshAgent() +{ +} + +bool NavMeshAgent::initWith(const NavMeshAgentParam ¶m) +{ + _param = param; + setName(getNavMeshAgentComponentName()); + return true; +} + +void cocos2d::NavMeshAgent::setNavMeshQuery(dtNavMeshQuery *query) +{ + _navMeshQuery = query; +} + +void cocos2d::NavMeshAgent::removeFrom(dtCrowd *crowed) +{ + crowed->removeAgent(_agentID); + _crowd = nullptr; + _agentID = -1; +} + +void cocos2d::NavMeshAgent::addTo(dtCrowd *crowed) +{ + _crowd = crowed; + dtCrowdAgentParams ap; + convertTodtAgentParam(_param, ap); + Mat4 mat = _owner->getNodeToWorldTransform(); + _agentID = _crowd->addAgent(&mat.m[12], &ap); +} + +void cocos2d::NavMeshAgent::convertTodtAgentParam(const NavMeshAgentParam &inParam, dtCrowdAgentParams &outParam) +{ + memset(&outParam, 0, sizeof(outParam)); + outParam.collisionQueryRange = inParam.collisionQueryRange; + outParam.height = inParam.height; + outParam.maxAcceleration = inParam.maxAcceleration; + outParam.maxSpeed = inParam.maxSpeed; + outParam.obstacleAvoidanceType = inParam.obstacleAvoidanceType; + outParam.pathOptimizationRange = inParam.pathOptimizationRange; + outParam.queryFilterType = inParam.queryFilterType; + outParam.radius = inParam.radius; + outParam.separationWeight = inParam.separationWeight; + outParam.updateFlags = inParam.updateFlags; +} + +void cocos2d::NavMeshAgent::onExit() +{ + if (_agentID == -1) return; + Component::onExit(); + + auto scene = _owner->getScene(); + if (scene && scene->getNavMesh()){ + scene->getNavMesh()->removeNavMeshAgent(this); + } +} + +void cocos2d::NavMeshAgent::onEnter() +{ + if (_agentID != -1) return; + Component::onEnter(); + auto scene = _owner->getScene(); + if (scene && scene->getNavMesh()){ + scene->getNavMesh()->addNavMeshAgent(this); + } +} + +float NavMeshAgent::getMaxSpeed() const +{ + return _param.maxSpeed; +} + +void NavMeshAgent::setSeparationWeight(float weight) +{ + _param.separationWeight = weight; + _needUpdateAgent = true; +} + +float NavMeshAgent::getSeparationWeight() const +{ + return _param.separationWeight; +} + +void cocos2d::NavMeshAgent::setObstacleAvoidanceType(unsigned char type) +{ + _param.obstacleAvoidanceType = type; + _needUpdateAgent = true; +} + +unsigned char NavMeshAgent::getObstacleAvoidanceType() const +{ + return _param.obstacleAvoidanceType; +} + +Vec3 NavMeshAgent::getCurrentVelocity() const +{ + if (_crowd){ + auto agent = _crowd->getAgent(_agentID); + if (agent){ + return Vec3(agent->vel[0], agent->vel[1], agent->vel[2]); + } + } + return Vec3::ZERO; +} + +void NavMeshAgent::setMaxSpeed(float maxSpeed) +{ + _param.maxSpeed = maxSpeed; + _needUpdateAgent = true; +} + +float NavMeshAgent::getMaxAcceleration() const +{ + return _param.maxAcceleration; +} + +void NavMeshAgent::setMaxAcceleration(float maxAcceleration) +{ + _param.maxAcceleration = maxAcceleration; + _needUpdateAgent = true; +} + +float NavMeshAgent::getHeight() const +{ + return _param.height; +} + +void NavMeshAgent::setHeight(float height) +{ + _param.height = height; + _needUpdateAgent = true; +} + +float NavMeshAgent::getRadius() const +{ + return _param.radius; +} + +void NavMeshAgent::setRadius(float radius) +{ + _param.radius = radius; + _needUpdateAgent = true; +} + +void NavMeshAgent::move(const Vec3 &destination, const MoveCallback &callback) +{ + _destination = destination; + _moveCallback = callback; + _needMove = true; + _needUpdateAgent = true; +} + +OffMeshLinkData NavMeshAgent::getCurrentOffMeshLinkData() +{ + OffMeshLinkData data; + if (_crowd && isOnOffMeshLink()){ + auto agentAnim = _crowd->getEditableAgentAnim(_agentID); + if (agentAnim){ + Mat4 mat; + if (_owner && _owner->getParent()) + mat = _owner->getParent()->getWorldToNodeTransform(); + mat.transformPoint(agentAnim->startPos, &data.startPosition); + mat.transformPoint(agentAnim->endPos, &data.endPosition); + } + } + return data; +} + +bool NavMeshAgent::isOnOffMeshLink() +{ + return _state == DT_CROWDAGENT_STATE_OFFMESH; +} + +void cocos2d::NavMeshAgent::completeOffMeshLink() +{ + if (_crowd && isOnOffMeshLink()){ + _state = DT_CROWDAGENT_STATE_WALKING; + _needUpdateAgent = true; + } +} + +void NavMeshAgent::setAutoTraverseOffMeshLink(bool isAuto) +{ + if (_crowd && isOnOffMeshLink()){ + auto agentAnim = _crowd->getEditableAgentAnim(_agentID); + if (agentAnim){ + agentAnim->active = isAuto; + } + } +} + +void NavMeshAgent::stop() +{ + if (_state != DT_CROWDAGENT_STATE_INVALID) return; + _state = DT_CROWDAGENT_STATE_INVALID; + _needUpdateAgent = true; +} + +void NavMeshAgent::setOrientationRefAxes(const Vec3 &rotRefAxes) +{ + _rotRefAxes = rotRefAxes; +} + +void cocos2d::NavMeshAgent::setAutoOrientation(bool isAuto) +{ + _needAutoOrientation = isAuto; +} + +void NavMeshAgent::resume() +{ + if (_state != DT_CROWDAGENT_STATE_INVALID) return; + _state = DT_CROWDAGENT_STATE_WALKING; + _needUpdateAgent = true; +} + +void NavMeshAgent::pause() +{ + if (_state == DT_CROWDAGENT_STATE_INVALID) return; + _state = DT_CROWDAGENT_STATE_INVALID; + _needUpdateAgent = true; +} + +void NavMeshAgent::preUpdate(float delta) +{ + if (_state != DT_CROWDAGENT_STATE_INVALID) + _totalTimeAfterMove += delta; + if (_moveCallback && _state != DT_CROWDAGENT_STATE_INVALID) + _moveCallback(this, _totalTimeAfterMove); + + if ((_syncFlag & NODE_TO_AGENT) != 0) + syncToAgent(); + + if (_needMove && _crowd && _navMeshQuery){ + if (_state == DT_CROWDAGENT_STATE_OFFMESH) return; + _state = DT_CROWDAGENT_STATE_WALKING; + _totalTimeAfterMove = 0.0f; + dtPolyRef pRef = 0; + float nearestPos[3]; + _navMeshQuery->findNearestPoly(&_destination.x, _crowd->getQueryExtents(), _crowd->getFilter(0), &pRef, nearestPos); + _crowd->requestMoveTarget(_agentID, pRef, nearestPos); + _needMove = false; + } +} + +void NavMeshAgent::postUpdate(float delta) +{ + if ((_syncFlag & AGENT_TO_NODE) != 0) + syncToNode(); +} + +void NavMeshAgent::syncToNode() +{ + const dtCrowdAgent *agent = nullptr; + if (_crowd){ + agent = _crowd->getAgent(_agentID); + } + + if (agent){ + Mat4 wtop; + Vec3 pos; + if (_owner->getParent()) + wtop = _owner->getParent()->getWorldToNodeTransform(); + wtop.transformPoint(Vec3(agent->npos[0], agent->npos[1], agent->npos[2]), &pos); + _owner->setPosition3D(pos); + _state = agent->state; + if (_needAutoOrientation){ + if ( fabs(agent->vel[0]) > 0.3f || fabs(agent->vel[1]) > 0.3f || fabs(agent->vel[2]) > 0.3f) + { + Vec3 axes(_rotRefAxes); + axes.normalize(); + Vec3 dir; + wtop.transformVector(Vec3(agent->vel[0], agent->vel[1], agent->vel[2]), &dir); + dir.normalize(); + float cosTheta = Vec3::dot(axes, dir); + Vec3 rotAxes; + Vec3::cross(axes, dir, &rotAxes); + Quaternion rot = Quaternion(rotAxes, acosf(cosTheta)); + _owner->setRotationQuat(rot); + } + } + } +} + +void NavMeshAgent::syncToAgent() +{ + if (_crowd){ + auto agent = _crowd->getEditableAgent(_agentID); + Mat4 mat = _owner->getNodeToWorldTransform(); + agent->npos[0] = mat.m[12]; + agent->npos[1] = mat.m[13]; + agent->npos[2] = mat.m[14]; + //if (_needAutoOrientation){ + // Vec3 vel = mat * _rotRefAxes; + // agent->vel[0] = vel.x; + // agent->vel[1] = vel.y; + // agent->vel[2] = vel.z; + //} + if (_needUpdateAgent){ + dtCrowdAgentParams ap; + convertTodtAgentParam(_param, ap); + agent->params = ap; + agent->state = _state; + _needUpdateAgent = false; + } + } +} + +Vec3 NavMeshAgent::getVelocity() const +{ + const dtCrowdAgent *agent = nullptr; + if (_crowd){ + agent = _crowd->getAgent(_agentID); + } + if (agent) + { + return Vec3(agent->vel[0], agent->vel[1], agent->vel[2]); + } + return Vec3::ZERO; +} + +NS_CC_END + +#endif //CC_USE_NAVMESH diff --git a/cocos/navmesh/CCNavMeshAgent.h b/cocos/navmesh/CCNavMeshAgent.h new file mode 100644 index 000000000000..f7d434d08a11 --- /dev/null +++ b/cocos/navmesh/CCNavMeshAgent.h @@ -0,0 +1,239 @@ +/**************************************************************************** + Copyright (c) 2015 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 __CCNAV_MESH_AGENT_H__ +#define __CCNAV_MESH_AGENT_H__ + +#include "base/ccConfig.h" +#if CC_USE_NAVMESH +#include "2d/CCComponent.h" + +#include "base/CCRef.h" +#include "math/Vec3.h" +#include "recast/DetourCrowd/DetourCrowd.h" + +class dtNavMeshQuery; +NS_CC_BEGIN + +/** + * @addtogroup 3d + * @{ + */ +struct CC_DLL NavMeshAgentParam +{ + NavMeshAgentParam(); + + float radius; ///< Agent radius. [Limit: >= 0] + float height; ///< Agent height. [Limit: > 0] + float maxAcceleration; ///< Maximum allowed acceleration. [Limit: >= 0] + float maxSpeed; ///< Maximum allowed speed. [Limit: >= 0] + + /// Defines how close a collision element must be before it is considered for steering behaviors. [Limits: > 0] + float collisionQueryRange; + + float pathOptimizationRange; ///< The path visibility optimization range. [Limit: > 0] + + /// How aggresive the agent manager should be at avoiding collisions with this agent. [Limit: >= 0] + float separationWeight; + + /// Flags that impact steering behavior. (See: #UpdateFlags) + unsigned char updateFlags; + + /// The index of the avoidance configuration to use for the agent. + /// [Limits: 0 <= value <= #DT_CROWD_MAX_OBSTAVOIDANCE_PARAMS] + unsigned char obstacleAvoidanceType; + + /// The index of the query filter used by this agent. + unsigned char queryFilterType; +}; + +struct CC_DLL OffMeshLinkData +{ + Vec3 startPosition;//position in local coordinate system. + Vec3 endPosition;//position in local coordinate system. +}; + +/** @brief NavMeshAgent: The code wrapping of dtCrowdAgent, use component mode. */ +class CC_DLL NavMeshAgent : public Component +{ + friend class NavMesh; +public: + + enum NavMeshAgentSyncFlag + { + NONE = 0, + NODE_TO_AGENT = 1, + AGENT_TO_NODE = 2, + NODE_AND_NODE = NODE_TO_AGENT | AGENT_TO_NODE, + }; + + typedef std::function MoveCallback; + + /** + Create agent + + @param param The parameters of agent. + */ + static NavMeshAgent* create(const NavMeshAgentParam ¶m); + static const std::string& getNavMeshAgentComponentName(); + + virtual void onEnter() override; + virtual void onExit() override; + + /** set agent radius */ + void setRadius(float radius); + + /** get agent radius */ + float getRadius() const; + + /** set agent height */ + void setHeight(float height); + + /** get agent height */ + float getHeight() const; + + /** set maximal acceleration of agent*/ + void setMaxAcceleration(float maxAcceleration); + + /** get maximal acceleration of agent*/ + float getMaxAcceleration() const; + + /** set maximal speed of agent */ + void setMaxSpeed(float maxSpeed); + + /** get maximal speed of agent */ + float getMaxSpeed() const; + + /** set separation weight */ + void setSeparationWeight(float weight); + + /** get separation weight */ + float getSeparationWeight() const; + + /** set obstacle avoidance type */ + void setObstacleAvoidanceType(unsigned char type); + + /** get obstacle avoidance type */ + unsigned char getObstacleAvoidanceType() const; + + /** get current velocity */ + Vec3 getCurrentVelocity() const; + + /** + Move agent to a destination + + @param destination The position in world coordinate system. + @param callback Use this function can catch movement state. + */ + void move(const Vec3 &destination, const MoveCallback &callback = nullptr); + + /** puase movement */ + void pause(); + + /** resume movement */ + void resume(); + + /** stop movement */ + void stop(); + + /** + Set the reference axes of agent's orientation + + @param rotRefAxes The value of reference axes in local coordinate system. + */ + void setOrientationRefAxes(const Vec3 &rotRefAxes); + + /**Set automatic Orientation */ + void setAutoOrientation(bool isAuto); + + /**Set automatic Traverse OffMeshLink */ + void setAutoTraverseOffMeshLink(bool isAuto); + + /**Check agent arrived OffMeshLink */ + bool isOnOffMeshLink(); + + /**Traverse OffMeshLink manually*/ + void completeOffMeshLink(); + + /**Get current OffMeshLink information*/ + OffMeshLinkData getCurrentOffMeshLinkData(); + + void setUserData(void *data) { _userData = data; }; + void* getUserData() const { return _userData; }; + + /** + * synchronization between node and agent is time consuming, you can skip some synchronization using this function + */ + void setSyncFlag(const NavMeshAgentSyncFlag &flag) { _syncFlag = flag; } + NavMeshAgentSyncFlag getSyncFlag() const { return _syncFlag; } + + /** synchronize parameter to agent. */ + void syncToAgent(); + + /** synchronize parameter to node. */ + void syncToNode(); + + /** get current velocity */ + Vec3 getVelocity() const; + +CC_CONSTRUCTOR_ACCESS: + NavMeshAgent(); + virtual ~NavMeshAgent(); + +private: + + bool initWith(const NavMeshAgentParam ¶m); + void addTo(dtCrowd *crowed); + void removeFrom(dtCrowd *crowed); + void setNavMeshQuery(dtNavMeshQuery *query); + void preUpdate(float delta); + void postUpdate(float delta); + static void convertTodtAgentParam(const NavMeshAgentParam &inParam, dtCrowdAgentParams &outParam); + +private: + + MoveCallback _moveCallback; + NavMeshAgentParam _param; + NavMeshAgentSyncFlag _syncFlag; + Vec3 _origination; + Vec3 _destination; + Vec3 _rotRefAxes; + unsigned char _state; + bool _needAutoOrientation; + int _agentID; + bool _needUpdateAgent; + bool _needMove; + float _totalTimeAfterMove; + void *_userData; + dtCrowd *_crowd; + dtNavMeshQuery *_navMeshQuery; +}; + +/** @} */ + +NS_CC_END + +#endif //CC_USE_NAVMESH + +#endif // __CCNAV_MESH_AGENT_H__ diff --git a/cocos/navmesh/CCNavMeshDebugDraw.cpp b/cocos/navmesh/CCNavMeshDebugDraw.cpp new file mode 100644 index 000000000000..459c655e6491 --- /dev/null +++ b/cocos/navmesh/CCNavMeshDebugDraw.cpp @@ -0,0 +1,183 @@ +/**************************************************************************** + Copyright (c) 2015 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 "navmesh/CCNavMeshDebugDraw.h" +#if CC_USE_NAVMESH + +#include "renderer/CCGLProgramCache.h" +#include "renderer/ccGLStateCache.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCRenderState.h" +#include "base/CCDirector.h" +#include "base/ccMacros.h" + +NS_CC_BEGIN + +NavMeshDebugDraw::NavMeshDebugDraw() +: _primitiveType(GL_POINTS) +, _dirtyBuffer(true) +, _currentPrimitive(nullptr) +, _currentDepthMask(true) +{ + _stateBlock = RenderState::StateBlock::create(); + _stateBlock->setCullFace(true); + _stateBlock->setCullFaceSide(RenderState::CullFaceSide::CULL_FACE_SIDE_BACK); + _stateBlock->setDepthTest(true); + _stateBlock->setBlend(true); + _stateBlock->setBlendFunc(BlendFunc::ALPHA_NON_PREMULTIPLIED); + CC_SAFE_RETAIN(_stateBlock); + + _customCmd.set3D(true); + _customCmd.setTransparent(true); + _program = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_COLOR); + glGenBuffers(1, &_vbo); +} + +void NavMeshDebugDraw::vertex(const float x, const float y, const float z, unsigned int color, const float u, const float v) +{ + +} + +void NavMeshDebugDraw::vertex(const float* pos, unsigned int color, const float* uv) +{ + vertex(pos[0], pos[1], pos[2], color, uv[0], uv[1]); +} + +void NavMeshDebugDraw::vertex(const float x, const float y, const float z, unsigned int color) +{ + if (!_currentPrimitive) return; + V3F_C4F vertex = { Vec3(x, y, z), getColor(color) }; + _vertices.push_back(vertex); + _dirtyBuffer = true; +} + +void NavMeshDebugDraw::vertex(const float* pos, unsigned int color) +{ + vertex(pos[0], pos[1], pos[2], color); +} + +NavMeshDebugDraw::~NavMeshDebugDraw() +{ + CC_SAFE_RELEASE(_stateBlock); + for (auto iter : _primitiveList){ + delete iter; + } + glDeleteBuffers(1, &_vbo); +} + +void NavMeshDebugDraw::depthMask(bool state) +{ + _currentDepthMask = state; +} + +void NavMeshDebugDraw::begin(duDebugDrawPrimitives prim, float size /*= 1.0f*/) +{ + if (_currentPrimitive) return; + _currentPrimitive = new Primitive; + _currentPrimitive->type = getPrimitiveType(prim); + _currentPrimitive->depthMask = _currentDepthMask; + _currentPrimitive->start = _vertices.size(); + _currentPrimitive->size = size; +} + +void NavMeshDebugDraw::end() +{ + if (!_currentPrimitive) return; + _currentPrimitive->end = _vertices.size(); + _primitiveList.push_back(_currentPrimitive); + _currentPrimitive = nullptr; +} + +Vec4 NavMeshDebugDraw::getColor(unsigned int col) +{ + const unsigned int r = col & 0xff; + const unsigned int g = (col >> 8) & 0xff; + const unsigned int b = (col >> 16) & 0xff; + const unsigned int a = (col >> 24) & 0xff; + + float factor = 1.0f / 255.0f; + return Vec4(r, g, b, a) * factor; +} + +GLenum NavMeshDebugDraw::getPrimitiveType(duDebugDrawPrimitives prim) +{ + switch (prim) + { + case DU_DRAW_POINTS: + return GL_POINTS; + case DU_DRAW_LINES: + return GL_LINES; + case DU_DRAW_TRIS: + return GL_TRIANGLES; + default: + return GL_POINTS; + } +} + +void NavMeshDebugDraw::drawImplement(const cocos2d::Mat4& transform, uint32_t flags) +{ + _program->use(); + _program->setUniformsForBuiltins(transform); + + glBindBuffer(GL_ARRAY_BUFFER, _vbo); + GL::enableVertexAttribs(GL::VERTEX_ATTRIB_FLAG_POSITION | GL::VERTEX_ATTRIB_FLAG_COLOR); + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, sizeof(V3F_C4F), (GLvoid *)offsetof(V3F_C4F, position)); + glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_FLOAT, GL_FALSE, sizeof(V3F_C4F), (GLvoid *)offsetof(V3F_C4F, color)); + if (_dirtyBuffer){ + glBufferData(GL_ARRAY_BUFFER, sizeof(V3F_C4F)* _vertices.size(), &_vertices[0], GL_STATIC_DRAW); + _dirtyBuffer = false; + } + for (auto &iter : _primitiveList){ + _stateBlock->setDepthWrite(iter->depthMask); + if (iter->type == GL_POINTS){ + //glPointSize(iter->size); + } + else if (iter->type == GL_LINES){ + glLineWidth(iter->size); + } + _stateBlock->bind(); + glDrawArrays(iter->type, iter->start, iter->end - iter->start); + CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, iter->end - iter->start); + } + glBindBuffer(GL_ARRAY_BUFFER, 0); +} + +void NavMeshDebugDraw::draw(Renderer* renderer) +{ + _customCmd.init(0, Mat4::IDENTITY, Node::FLAGS_RENDER_AS_3D); + _customCmd.func = CC_CALLBACK_0(NavMeshDebugDraw::drawImplement, this, Mat4::IDENTITY, 0); + renderer->addCommand(&_customCmd); +} + +void NavMeshDebugDraw::clear() +{ + _vertices.clear(); + for (auto iter : _primitiveList){ + delete iter; + } + _primitiveList.clear(); +} + +NS_CC_END + +#endif //CC_USE_NAVMESH diff --git a/cocos/navmesh/CCNavMeshDebugDraw.h b/cocos/navmesh/CCNavMeshDebugDraw.h new file mode 100644 index 000000000000..528737806dd0 --- /dev/null +++ b/cocos/navmesh/CCNavMeshDebugDraw.h @@ -0,0 +1,109 @@ +/**************************************************************************** + Copyright (c) 2015 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 __CCNAV_MESH_DEBUG_DRAW_H__ +#define __CCNAV_MESH_DEBUG_DRAW_H__ + +#include "base/ccConfig.h" +#if CC_USE_NAVMESH + +#include "renderer/CCGLProgram.h" +#include "renderer/CCCustomCommand.h" +#include "renderer/CCRenderState.h" +#include "math/Vec3.h" +#include "recast/DebugUtils/DebugDraw.h" +#include +#include + +NS_CC_BEGIN + +/** + * @addtogroup 3d + * @{ + */ +class Renderer; +class NavMeshDebugDraw : public duDebugDraw +{ +public: + NavMeshDebugDraw(); + virtual ~NavMeshDebugDraw(); + + virtual void depthMask(bool state); + virtual void texture(bool state){}; + virtual void begin(duDebugDrawPrimitives prim, float size = 1.0f) override; + + virtual void vertex(const float* pos, unsigned int color) override; + virtual void vertex(const float x, const float y, const float z, unsigned int color) override; + + virtual void vertex(const float* pos, unsigned int color, const float* uv) override; + virtual void vertex(const float x, const float y, const float z, unsigned int color, const float u, const float v) override; + + virtual void end() override; + + void draw(Renderer* renderer); + + void clear(); + +private: + + GLenum getPrimitiveType(duDebugDrawPrimitives prim); + void drawImplement(const cocos2d::Mat4& transform, uint32_t flags); + static Vec4 getColor(unsigned int col); + +private: + + struct V3F_C4F + { + Vec3 position; + Vec4 color; + }; + + struct Primitive + { + GLenum type; + bool depthMask; + unsigned short start; + unsigned short end; + float size; + }; + + std::vector _vertices; + std::vector _primitiveList; + Primitive *_currentPrimitive; + GLProgram *_program; + CustomCommand _customCmd; + RenderState::StateBlock* _stateBlock; + GLenum _primitiveType; + bool _currentDepthMask; + GLuint _vbo; + bool _dirtyBuffer; +}; + +/** @} */ + +NS_CC_END + +#endif //CC_USE_NAVMESH + +#endif // __CCNAV_MESH_DEBUG_DRAW_H__ diff --git a/cocos/navmesh/CCNavMeshObstacle.cpp b/cocos/navmesh/CCNavMeshObstacle.cpp new file mode 100644 index 000000000000..faae166922d9 --- /dev/null +++ b/cocos/navmesh/CCNavMeshObstacle.cpp @@ -0,0 +1,166 @@ +/**************************************************************************** + Copyright (c) 2015 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 "navmesh/CCNavMeshObstacle.h" +#if CC_USE_NAVMESH + +#include "navmesh/CCNavMesh.h" +#include "2d/CCNode.h" +#include "2d/CCScene.h" +#include "recast/DetourTileCache/DetourTileCache.h" + +NS_CC_BEGIN + +NavMeshObstacle* NavMeshObstacle::create(float radius, float height) +{ + auto ref = new (std::nothrow) NavMeshObstacle(); + if (ref && ref->initWith(radius, height)) + { + ref->autorelease(); + return ref; + } + CC_SAFE_DELETE(ref); + return nullptr; +} + +const std::string& NavMeshObstacle::getNavMeshObstacleComponentName() +{ + static std::string comName = "___NavMeshObstacleComponent___"; + return comName; +} + +NavMeshObstacle::NavMeshObstacle() +: _radius(0.0f) +, _height(0.0f) +, _tileCache(nullptr) +, _obstacleID(-1) +, _syncFlag(NODE_AND_NODE) +{ + +} + +cocos2d::NavMeshObstacle::~NavMeshObstacle() +{ + +} + +bool NavMeshObstacle::initWith(float radius, float height) +{ + _radius = radius; + _height = height; + setName(getNavMeshObstacleComponentName()); + return true; +} + +void cocos2d::NavMeshObstacle::removeFrom(dtTileCache *tileCache) +{ + _tileCache->removeObstacle(_obstacleID); + _tileCache = nullptr; + _obstacleID = -1; +} + +void cocos2d::NavMeshObstacle::addTo(dtTileCache *tileCache) +{ + _tileCache = tileCache; + Mat4 mat = _owner->getNodeToWorldTransform(); + _tileCache->addObstacle(&mat.m[12], _radius, _height, &_obstacleID); +} + +void cocos2d::NavMeshObstacle::onExit() +{ + if (_obstacleID == -1) return; + Component::onExit(); + auto scene = _owner->getScene(); + if (scene && scene->getNavMesh()){ + scene->getNavMesh()->removeNavMeshObstacle(this); + } +} + +void cocos2d::NavMeshObstacle::onEnter() +{ + if (_obstacleID != -1) return; + Component::onEnter(); + auto scene = _owner->getScene(); + if (scene && scene->getNavMesh()){ + scene->getNavMesh()->addNavMeshObstacle(this); + } +} + +void cocos2d::NavMeshObstacle::postUpdate(float delta) +{ + if ((_syncFlag & OBSTACLE_TO_NODE) != 0) + syncToNode(); +} + +void cocos2d::NavMeshObstacle::preUpdate(float delta) +{ + if ((_syncFlag & NODE_TO_OBSTACLE) != 0) + syncToObstacle(); +} + +void NavMeshObstacle::syncToNode() +{ + if (_tileCache){ + auto obstacle = _tileCache->getObstacleByRef(_obstacleID); + if (obstacle){ + Vec3 localPos = Vec3(obstacle->pos[0], obstacle->pos[1], obstacle->pos[2]); + if (_owner->getParent()) + _owner->getParent()->getWorldToNodeTransform().transformPoint(localPos, &localPos); + _owner->setPosition3D(localPos); + _radius = obstacle->radius; + _height = obstacle->height; + } + } +} + +void cocos2d::NavMeshObstacle::setRadius(float radius) +{ + _radius = radius; +} + +void cocos2d::NavMeshObstacle::setHeight(float height) +{ + _height = height; +} + +void NavMeshObstacle::syncToObstacle() +{ + if (_tileCache){ + auto obstacle = _tileCache->getObstacleByRef(_obstacleID); + if (obstacle){ + Vec3 worldPos = Vec3(obstacle->pos[0], obstacle->pos[1], obstacle->pos[2]); + Mat4 mat = _owner->getNodeToWorldTransform(); + if ((mat.m[12] != obstacle->pos[0] && mat.m[13] != obstacle->pos[1] && mat.m[14] != obstacle->pos[2]) + || obstacle->radius != _radius + || obstacle->height != _height){ + _tileCache->removeObstacle(_obstacleID); + _tileCache->addObstacle(&mat.m[12], _radius, _height, &_obstacleID); + } + } + } +} + +NS_CC_END + +#endif //CC_USE_NAVMESH diff --git a/cocos/navmesh/CCNavMeshObstacle.h b/cocos/navmesh/CCNavMeshObstacle.h new file mode 100644 index 000000000000..0edc7dcb5519 --- /dev/null +++ b/cocos/navmesh/CCNavMeshObstacle.h @@ -0,0 +1,123 @@ +/**************************************************************************** + Copyright (c) 2015 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 __CCNAV_MESH_OBSTACLE_H__ +#define __CCNAV_MESH_OBSTACLE_H__ + +#include "base/ccConfig.h" +#if CC_USE_NAVMESH + +#include "2d/CCComponent.h" + +#include "base/CCRef.h" +#include "math/Vec3.h" +#include "recast/Detour/DetourNavMesh.h" +#include "recast/DetourTileCache/DetourTileCache.h" + +NS_CC_BEGIN + +/** + * @addtogroup 3d + * @{ + */ + +/** @brief NavMeshObstacle: The code wrapping of dtTileCacheObstacle, use component mode. */ +class CC_DLL NavMeshObstacle : public Component +{ + friend class NavMesh; +public: + + enum NavMeshObstacleSyncFlag + { + NONE = 0, + NODE_TO_OBSTACLE = 1, + OBSTACLE_TO_NODE = 2, + NODE_AND_NODE = NODE_TO_OBSTACLE | OBSTACLE_TO_NODE, + }; + + /** + Create obstacle, shape is cylinder + + @param radius The radius of obstacle. + @param height The height of obstacle. + */ + static NavMeshObstacle* create(float radius, float height); + static const std::string& getNavMeshObstacleComponentName(); + + virtual void onEnter() override; + virtual void onExit() override; + + /** Set radius of obstacle */ + void setRadius(float radius); + + /** Get radius of obstacle */ + float getRadius() const { return _radius; } + + /** Set height of obstacle */ + void setHeight(float height); + + /** Get height of obstacle */ + float getHeight() const { return _height; } + + /** + * synchronization between node and obstacle is time consuming, you can skip some synchronization using this function + */ + void setSyncFlag(const NavMeshObstacleSyncFlag &flag) { _syncFlag = flag; } + NavMeshObstacleSyncFlag getSyncFlag() const { return _syncFlag; } + + /** synchronize parameter to obstacle. */ + void syncToObstacle(); + + /** synchronize parameter to node. */ + void syncToNode(); + +CC_CONSTRUCTOR_ACCESS: + NavMeshObstacle(); + virtual ~NavMeshObstacle(); + + bool initWith(float radius, float height); + +private: + + void addTo(dtTileCache *tileCache); + void removeFrom(dtTileCache *tileCache); + void preUpdate(float delta); + void postUpdate(float delta); + +private: + + float _radius; + float _height; + NavMeshObstacleSyncFlag _syncFlag; + dtObstacleRef _obstacleID; + dtTileCache *_tileCache; +}; + +/** @} */ + +NS_CC_END + +#endif //CC_USE_NAVMESH + +#endif // __CCNAV_MESH_OBSTACLE_H__ diff --git a/cocos/navmesh/CCNavMeshUtils.cpp b/cocos/navmesh/CCNavMeshUtils.cpp new file mode 100644 index 000000000000..1831e5d062b4 --- /dev/null +++ b/cocos/navmesh/CCNavMeshUtils.cpp @@ -0,0 +1,289 @@ +/**************************************************************************** + Copyright (c) 2015 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 "navmesh/CCNavMeshUtils.h" +#if CC_USE_NAVMESH + +#include "recast/Detour/DetourCommon.h" +#include "recast/Detour/DetourNavMeshBuilder.h" +#include "recast/fastlz/fastlz.h" + +NS_CC_BEGIN + +LinearAllocator::LinearAllocator(const int cap) +: buffer(0) +, capacity(0) +, top(0) +, high(0) +{ + resize(cap); +} + +LinearAllocator::~LinearAllocator() +{ + dtFree(buffer); +} + +void LinearAllocator::free(void* /*ptr*/) +{ + +} + +void* LinearAllocator::alloc(const int size) +{ + if (!buffer) + return 0; + if (top + size > capacity) + return 0; + unsigned char* mem = &buffer[top]; + top += size; + return mem; +} + +void LinearAllocator::reset() +{ + high = dtMax(high, top); + top = 0; +} + +void LinearAllocator::resize(const int cap) +{ + if (buffer) dtFree(buffer); + buffer = (unsigned char*)dtAlloc(cap, DT_ALLOC_PERM); + capacity = cap; +} + +int FastLZCompressor::maxCompressedSize(const int bufferSize) +{ + return (int)(bufferSize* 1.05f); +} + +dtStatus cocos2d::FastLZCompressor::decompress(const unsigned char* compressed, const int compressedSize + , unsigned char* buffer, const int maxBufferSize, int* bufferSize) +{ + *bufferSize = fastlz_decompress(compressed, compressedSize, buffer, maxBufferSize); + return *bufferSize < 0 ? DT_FAILURE : DT_SUCCESS; +} + +dtStatus cocos2d::FastLZCompressor::compress(const unsigned char* buffer, const int bufferSize + , unsigned char* compressed, const int /*maxCompressedSize*/, int* compressedSize) +{ + *compressedSize = fastlz_compress((const void *const)buffer, bufferSize, compressed); + return DT_SUCCESS; +} + +MeshProcess::MeshProcess(const GeomData *geom) + : data(geom) +{ +} + +MeshProcess::~MeshProcess() +{ + +} + +void MeshProcess::process(struct dtNavMeshCreateParams* params + , unsigned char* polyAreas, unsigned short* polyFlags) +{ + // Update poly flags from areas. + for (int i = 0; i < params->polyCount; ++i) + { + if (polyAreas[i] == DT_TILECACHE_WALKABLE_AREA) + polyAreas[i] = 0; + + if (polyAreas[i] == 0) + polyFlags[i] = 1; + + //if (polyAreas[i] == SAMPLE_POLYAREA_GROUND || + // polyAreas[i] == SAMPLE_POLYAREA_GRASS || + // polyAreas[i] == SAMPLE_POLYAREA_ROAD) + //{ + // polyFlags[i] = SAMPLE_POLYFLAGS_WALK; + //} + //else if (polyAreas[i] == SAMPLE_POLYAREA_WATER) + //{ + // polyFlags[i] = SAMPLE_POLYFLAGS_SWIM; + //} + //else if (polyAreas[i] == SAMPLE_POLYAREA_DOOR) + //{ + // polyFlags[i] = SAMPLE_POLYFLAGS_WALK | SAMPLE_POLYFLAGS_DOOR; + //} + } + + // Pass in off-mesh connections. + params->offMeshConVerts = data->offMeshConVerts; + params->offMeshConRad = data->offMeshConRads; + params->offMeshConDir = data->offMeshConDirs; + params->offMeshConAreas = data->offMeshConAreas; + params->offMeshConFlags = data->offMeshConFlags; + params->offMeshConUserID = data->offMeshConId; + params->offMeshConCount = data->offMeshConCount; +} + +bool getSteerTarget(dtNavMeshQuery* navQuery, const float* startPos, const float* endPos, const float minTargetDist, const dtPolyRef* path, const int pathSize, float* steerPos, unsigned char& steerPosFlag, dtPolyRef& steerPosRef, float* outPoints /*= 0*/, int* outPointCount /*= 0*/) +{ + // Find steer target. + static const int MAX_STEER_POINTS = 3; + float steerPath[MAX_STEER_POINTS * 3]; + unsigned char steerPathFlags[MAX_STEER_POINTS]; + dtPolyRef steerPathPolys[MAX_STEER_POINTS]; + int nsteerPath = 0; + navQuery->findStraightPath(startPos, endPos, path, pathSize, + steerPath, steerPathFlags, steerPathPolys, &nsteerPath, MAX_STEER_POINTS); + if (!nsteerPath) + return false; + + if (outPoints && outPointCount) + { + *outPointCount = nsteerPath; + for (int i = 0; i < nsteerPath; ++i) + dtVcopy(&outPoints[i * 3], &steerPath[i * 3]); + } + + + // Find vertex far enough to steer to. + int ns = 0; + while (ns < nsteerPath) + { + // Stop at Off-Mesh link or when point is further than slop away. + if ((steerPathFlags[ns] & DT_STRAIGHTPATH_OFFMESH_CONNECTION) || + !inRange(&steerPath[ns * 3], startPos, minTargetDist, 1000.0f)) + break; + ns++; + } + // Failed to find good point to steer to. + if (ns >= nsteerPath) + return false; + + dtVcopy(steerPos, &steerPath[ns * 3]); + steerPos[1] = startPos[1]; + steerPosFlag = steerPathFlags[ns]; + steerPosRef = steerPathPolys[ns]; + + return true; +} + +int fixupShortcuts(dtPolyRef* path, int npath, dtNavMeshQuery* navQuery) +{ + if (npath < 3) + return npath; + + // Get connected polygons + static const int maxNeis = 16; + dtPolyRef neis[maxNeis]; + int nneis = 0; + + const dtMeshTile* tile = 0; + const dtPoly* poly = 0; + if (dtStatusFailed(navQuery->getAttachedNavMesh()->getTileAndPolyByRef(path[0], &tile, &poly))) + return npath; + + for (unsigned int k = poly->firstLink; k != DT_NULL_LINK; k = tile->links[k].next) + { + const dtLink* link = &tile->links[k]; + if (link->ref != 0) + { + if (nneis < maxNeis) + neis[nneis++] = link->ref; + } + } + + // If any of the neighbour polygons is within the next few polygons + // in the path, short cut to that polygon directly. + static const int maxLookAhead = 6; + int cut = 0; + for (int i = dtMin(maxLookAhead, npath) - 1; i > 1 && cut == 0; i--) { + for (int j = 0; j < nneis; j++) + { + if (path[i] == neis[j]) { + cut = i; + break; + } + } + } + if (cut > 1) + { + int offset = cut - 1; + npath -= offset; + for (int i = 1; i < npath; i++) + path[i] = path[i + offset]; + } + + return npath; +} + +int fixupCorridor(dtPolyRef* path, const int npath, const int maxPath, const dtPolyRef* visited, const int nvisited) +{ + int furthestPath = -1; + int furthestVisited = -1; + + // Find furthest common polygon. + for (int i = npath - 1; i >= 0; --i) + { + bool found = false; + for (int j = nvisited - 1; j >= 0; --j) + { + if (path[i] == visited[j]) + { + furthestPath = i; + furthestVisited = j; + found = true; + } + } + if (found) + break; + } + + // If no intersection found just return current path. + if (furthestPath == -1 || furthestVisited == -1) + return npath; + + // Concatenate paths. + + // Adjust beginning of the buffer to include the visited. + const int req = nvisited - furthestVisited; + const int orig = dtMin(furthestPath + 1, npath); + int size = dtMax(0, npath - orig); + if (req + size > maxPath) + size = maxPath - req; + if (size) + memmove(path + req, path + orig, size*sizeof(dtPolyRef)); + + // Store visited + for (int i = 0; i < req; ++i) + path[i] = visited[(nvisited - 1) - i]; + + return req + size; +} + +bool inRange(const float* v1, const float* v2, const float r, const float h) +{ + const float dx = v2[0] - v1[0]; + const float dy = v2[1] - v1[1]; + const float dz = v2[2] - v1[2]; + return (dx*dx + dz*dz) < r*r && fabsf(dy) < h; +} + +NS_CC_END + +#endif //CC_USE_NAVMESH diff --git a/cocos/navmesh/CCNavMeshUtils.h b/cocos/navmesh/CCNavMeshUtils.h new file mode 100644 index 000000000000..47299a56a5bc --- /dev/null +++ b/cocos/navmesh/CCNavMeshUtils.h @@ -0,0 +1,135 @@ +/**************************************************************************** + Copyright (c) 2015 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 __CCNAV_MESH_TOOL_H__ +#define __CCNAV_MESH_TOOL_H__ + +#include "base/ccConfig.h" +#if CC_USE_NAVMESH + +#include "platform/CCPlatformMacros.h" +#include "math/CCMath.h" + +#include "recast/Detour/DetourCommon.h" +#include "recast/Detour/DetourNavMesh.h" +#include "recast/Detour/DetourNavMeshQuery.h" +#include "recast/DetourTileCache/DetourTileCache.h" +#include "recast/DetourTileCache/DetourTileCacheBuilder.h" + +NS_CC_BEGIN + +/** + * @addtogroup 3d + * @{ + */ + +struct LinearAllocator : public dtTileCacheAlloc +{ + unsigned char* buffer; + int capacity; + int top; + int high; + + LinearAllocator(const int cap); + + ~LinearAllocator(); + + void resize(const int cap); + + virtual void reset(); + + virtual void* alloc(const int size); + + virtual void free(void* /*ptr*/); +}; + +struct FastLZCompressor : public dtTileCacheCompressor +{ + virtual int maxCompressedSize(const int bufferSize); + + virtual dtStatus compress(const unsigned char* buffer, const int bufferSize, + unsigned char* compressed, const int /*maxCompressedSize*/, int* compressedSize); + + virtual dtStatus decompress(const unsigned char* compressed, const int compressedSize, + unsigned char* buffer, const int maxBufferSize, int* bufferSize); +}; + +struct GeomData +{ + static const int MAX_OFFMESH_CONNECTIONS = 256; + float offMeshConVerts[MAX_OFFMESH_CONNECTIONS * 3 * 2]; + float offMeshConRads[MAX_OFFMESH_CONNECTIONS]; + unsigned char offMeshConDirs[MAX_OFFMESH_CONNECTIONS]; + unsigned char offMeshConAreas[MAX_OFFMESH_CONNECTIONS]; + unsigned short offMeshConFlags[MAX_OFFMESH_CONNECTIONS]; + unsigned int offMeshConId[MAX_OFFMESH_CONNECTIONS]; + int offMeshConCount; +}; + +struct MeshProcess : public dtTileCacheMeshProcess +{ + const GeomData *data; + + MeshProcess(const GeomData *geom); + virtual ~MeshProcess(); + + //void init(InputGeom* geom) + //{ + // m_geom = geom; + //} + + virtual void process(struct dtNavMeshCreateParams* params, + unsigned char* polyAreas, unsigned short* polyFlags) override; +}; + +bool inRange(const float* v1, const float* v2, const float r, const float h); + +int fixupCorridor(dtPolyRef* path, const int npath, const int maxPath, + const dtPolyRef* visited, const int nvisited); + +// This function checks if the path has a small U-turn, that is, +// a polygon further in the path is adjacent to the first polygon +// in the path. If that happens, a shortcut is taken. +// This can happen if the target (T) location is at tile boundary, +// and we're (S) approaching it parallel to the tile edge. +// The choice at the vertex can be arbitrary, +// +---+---+ +// |:::|:::| +// +-S-+-T-+ +// |:::| | <-- the step can end up in here, resulting U-turn path. +// +---+---+ +int fixupShortcuts(dtPolyRef* path, int npath, dtNavMeshQuery* navQuery); + +bool getSteerTarget(dtNavMeshQuery* navQuery, const float* startPos, const float* endPos, + const float minTargetDist, + const dtPolyRef* path, const int pathSize, + float* steerPos, unsigned char& steerPosFlag, dtPolyRef& steerPosRef, + float* outPoints = 0, int* outPointCount = 0); +/** @} */ + +NS_CC_END + +#endif //CC_USE_NAVMESH + +#endif // __CCNAV_MESH_H__ diff --git a/cocos/navmesh/CMakeLists.txt b/cocos/navmesh/CMakeLists.txt new file mode 100644 index 000000000000..142008e13772 --- /dev/null +++ b/cocos/navmesh/CMakeLists.txt @@ -0,0 +1,9 @@ + +set(COCOS_NAVMESH_SRC + + navmesh/CCNavMesh.cpp + navmesh/CCNavMeshAgent.cpp + navmesh/CCNavMeshDebugDraw.cpp + navmesh/CCNavMeshObstacle.cpp + navmesh/CCNavMeshUtils.cpp +) diff --git a/tests/cpp-tests/CMakeLists.txt b/tests/cpp-tests/CMakeLists.txt index 9325b1eebb3d..36dfb8a705aa 100644 --- a/tests/cpp-tests/CMakeLists.txt +++ b/tests/cpp-tests/CMakeLists.txt @@ -103,6 +103,7 @@ set(TESTS_SRC Classes/NewAudioEngineTest/NewAudioEngineTest.cpp Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp Classes/NewRendererTest/NewRendererTest.cpp + Classes/NavMeshTest/NavMeshTest.cpp Classes/NodeTest/NodeTest.cpp Classes/OpenURLTest/OpenURLTest.cpp Classes/ParallaxTest/ParallaxTest.cpp diff --git a/tests/cpp-tests/Classes/NavMeshTest/NavMeshTest.cpp b/tests/cpp-tests/Classes/NavMeshTest/NavMeshTest.cpp new file mode 100644 index 000000000000..fefd6131ac10 --- /dev/null +++ b/tests/cpp-tests/Classes/NavMeshTest/NavMeshTest.cpp @@ -0,0 +1,436 @@ +/**************************************************************************** + Copyright (c) 2012 cocos2d-x.org + Copyright (c) 2015 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 "NavMeshTest.h" +#include "physics3d/CCPhysics3DWorld.h" +#include "physics3d/CCPhysics3D.h" +#include "3d/CCBundle3D.h" +#include "2d/CCLight.h" + +USING_NS_CC_EXT; +USING_NS_CC; + +struct AgentUserData +{ + float time; +}; + +NavMeshTests::NavMeshTests() +{ +#if CC_USE_NAVMESH == 0 + ADD_TEST_CASE(NavMeshDisabled); +#else + ADD_TEST_CASE(NavMeshBasicTestDemo); + ADD_TEST_CASE(NavMeshAdvanceTestDemo); +#endif +}; + +#if CC_USE_NAVMESH == 0 +void NavMeshDisabled::onEnter() +{ + TTFConfig ttfConfig("fonts/arial.ttf", 16); + auto label = Label::createWithTTF(ttfConfig, "Should define CC_USE_NAVMESH\n to run this test case"); + + auto size = Director::getInstance()->getWinSize(); + label->setPosition(Vec2(size.width / 2, size.height / 2)); + + addChild(label); + + TestCase::onEnter(); +} +#else + +NavMeshBaseTestDemo::NavMeshBaseTestDemo(void) + : _camera(nullptr) + , _needMoveAgents(false) +{ + +} + +NavMeshBaseTestDemo::~NavMeshBaseTestDemo(void) +{ + for (auto iter : _agents){ + AgentUserData *data = static_cast(iter.first->getUserData()); + delete data; + } +} + +bool NavMeshBaseTestDemo::init() +{ + if (!TestCase::init()) return false; + + if (initWithPhysics()){ + + _angle = 0.0f; + + Size size = Director::getInstance()->getWinSize(); + _camera = Camera::createPerspective(30.0f, size.width / size.height, 1.0f, 1000.0f); + _camera->setPosition3D(Vec3(0.0f, 50.0f, 100.0f)); + _camera->lookAt(Vec3(0.0f, 0.0f, 0.0f), Vec3(0.0f, 1.0f, 0.0f)); + _camera->setCameraFlag(CameraFlag::USER1); + this->addChild(_camera); + + auto listener = EventListenerTouchAllAtOnce::create(); + listener->onTouchesBegan = CC_CALLBACK_2(NavMeshBaseTestDemo::onTouchesBegan, this); + listener->onTouchesMoved = CC_CALLBACK_2(NavMeshBaseTestDemo::onTouchesMoved, this); + listener->onTouchesEnded = CC_CALLBACK_2(NavMeshBaseTestDemo::onTouchesEnded, this); + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + + initScene(); + scheduleUpdate(); + } + + + return true; +} + +void NavMeshBaseTestDemo::onTouchesBegan(const std::vector& touches, cocos2d::Event *event) +{ + _needMoveAgents = true; + touchesBegan(touches, event); +} + +void NavMeshBaseTestDemo::onTouchesMoved(const std::vector& touches, cocos2d::Event *event) +{ + if (touches.size() && _camera) + { + auto touch = touches[0]; + auto delta = touch->getDelta(); + + _angle -= CC_DEGREES_TO_RADIANS(delta.x); + _camera->setPosition3D(Vec3(100.0f * sinf(_angle), 50.0f, 100.0f * cosf(_angle))); + _camera->lookAt(Vec3(0.0f, 0.0f, 0.0f), Vec3(0.0f, 1.0f, 0.0f)); + + if (delta.lengthSquared() > 16) + { + _needMoveAgents = false; + } + } + touchesMoved(touches, event); +} + +void NavMeshBaseTestDemo::onTouchesEnded(const std::vector& touches, cocos2d::Event *event) +{ + touchesEnded(touches, event); +} + +void NavMeshBaseTestDemo::initScene() +{ + getPhysics3DWorld()->setDebugDrawEnable(false); + //create mesh + std::vector trianglesList = Bundle3D::getTrianglesList("NavMesh/scene.obj"); + + Physics3DRigidBodyDes rbDes; + rbDes.mass = 0.0f; + rbDes.shape = Physics3DShape::createMesh(&trianglesList[0], (int)trianglesList.size() / 3); + auto rigidBody = Physics3DRigidBody::create(&rbDes); + auto component = Physics3DComponent::create(rigidBody); + auto sprite = Sprite3D::create("NavMesh/scene.obj"); + sprite->addComponent(component); + sprite->setCameraMask((unsigned short)CameraFlag::USER1); + this->addChild(sprite); + setPhysics3DDebugCamera(_camera); + + auto navMesh = NavMesh::create("NavMesh/all_tiles_tilecache.bin", "NavMesh/geomset.txt"); + navMesh->setDebugDrawEnable(true); + setNavMesh(navMesh); + setNavMeshDebugCamera(_camera); + + + auto ambientLight = AmbientLight::create(Color3B(64, 64, 64)); + ambientLight->setCameraMask((unsigned short)CameraFlag::USER1); + this->addChild(ambientLight); + + auto dirLight = DirectionLight::create(Vec3(1.2f, -1.1f, 0.5f), Color3B(255, 255, 255)); + dirLight->setCameraMask((unsigned short)CameraFlag::USER1); + this->addChild(dirLight); +} + +void NavMeshBaseTestDemo::createAgent(const Vec3 &pos) +{ + std::string filePath = "Sprite3DTest/girl.c3b"; + NavMeshAgentParam param; + param.radius = 2.0f; + param.height = 8.0f; + param.maxSpeed = 8.0f; + auto agent = NavMeshAgent::create(param); + auto agentNode = Sprite3D::create(filePath); + agent->setOrientationRefAxes(Vec3(-1.0f, 0.0f, 1.0f)); + AgentUserData *data = new AgentUserData{ 0.0f }; + agent->setUserData(data); + agentNode->setScale(0.05f); + agentNode->addComponent(agent); + + auto node = Node::create(); + node->addChild(agentNode); + node->setPosition3D(pos); + node->setCameraMask((unsigned short)CameraFlag::USER1); + this->addChild(node); + + + auto animation = Animation3D::create(filePath); + auto animate = Animate3D::create(animation); + if (animate){ + agentNode->runAction(RepeatForever::create(animate)); + animate->setSpeed(0); + } + + _agents.push_back(std::make_pair(agent, animate)); +} + +void NavMeshBaseTestDemo::createObstacle(const Vec3 &pos) +{ + auto obstacle = NavMeshObstacle::create(2.0f, 8.0f); + auto obstacleNode = Sprite3D::create("Sprite3DTest/cylinder.c3b"); + obstacleNode->setPosition3D(pos + Vec3(0.0f, -0.5f, 0.0f)); + obstacleNode->setRotation3D(Vec3(-90.0f, 0.0f, 0.0f)); + obstacleNode->setScale(0.3f); + obstacleNode->addComponent(obstacle); + obstacleNode->setCameraMask((unsigned short)CameraFlag::USER1); + this->addChild(obstacleNode); +} + +Vec3 jump(const Vec3* pV1, const Vec3* pV2, float height, float t) +{ + Vec3 pOut; + pOut.x = pV1->x + t * (pV2->x - pV1->x); + pOut.y = pV1->y + t * (pV2->y - pV1->y); + pOut.z = pV1->z + t * (pV2->z - pV1->z); + pOut.y += height * sinf(M_PI * t); + return pOut; +} + +void NavMeshBaseTestDemo::moveAgents(const cocos2d::Vec3 &des) +{ + for (auto iter : _agents){ + NavMeshAgent::MoveCallback callback = [](NavMeshAgent *agent, float totalTimeAfterMove){ + AgentUserData *data = static_cast(agent->getUserData()); + if (agent->isOnOffMeshLink()){ + agent->setAutoTraverseOffMeshLink(false); + agent->setAutoOrientation(false); + OffMeshLinkData linkdata = agent->getCurrentOffMeshLinkData(); + + agent->getOwner()->setPosition3D(jump(&linkdata.startPosition, &linkdata.endPosition, 10.0f, data->time)); + Vec3 dir = linkdata.endPosition - linkdata.startPosition; + dir.y = 0.0f; + dir.normalize(); + Vec3 axes; + Vec3 refAxes = Vec3(-1.0f, 0.0f, 1.0f); + refAxes.normalize(); + Vec3::cross(refAxes, dir, &axes); + float angle = Vec3::dot(refAxes, dir); + agent->getOwner()->setRotationQuat(Quaternion(axes, acosf(angle))); + data->time += 0.01f; + if (1.0f < data->time){ + agent->completeOffMeshLink(); + agent->setAutoOrientation(true); + data->time = 0.0f; + } + } + }; + iter.first->move(des, callback); + } +} + +void NavMeshBaseTestDemo::update(float delta) +{ + for (auto iter : _agents){ + float speed = iter.first->getCurrentVelocity().length() * 0.2; + iter.second->setSpeed(0.0f < speed ? speed : 0.0f); + } +} + +NavMeshBasicTestDemo::NavMeshBasicTestDemo(void) +{ + +} + +NavMeshBasicTestDemo::~NavMeshBasicTestDemo(void) +{ +} + +std::string NavMeshBasicTestDemo::title() const +{ + return "Navigation Mesh Test"; +} + +std::string NavMeshBasicTestDemo::subtitle() const +{ + return "Basic Test"; +} + +void NavMeshBasicTestDemo::touchesEnded(const std::vector& touches, cocos2d::Event *event) +{ + if (!_needMoveAgents) return; + if (!touches.empty()){ + auto touch = touches[0]; + auto location = touch->getLocationInView(); + Vec3 nearP(location.x, location.y, 0.0f), farP(location.x, location.y, 1.0f); + + auto size = Director::getInstance()->getWinSize(); + _camera->unproject(size, &nearP, &nearP); + _camera->unproject(size, &farP, &farP); + + Physics3DWorld::HitResult result; + getPhysics3DWorld()->rayCast(nearP, farP, &result); + moveAgents(result.hitPosition); + } +} + +bool NavMeshBasicTestDemo::init() +{ + if (!NavMeshBaseTestDemo::init()) return false; + + TTFConfig ttfConfig("fonts/arial.ttf", 15); + _debugLabel = Label::createWithTTF(ttfConfig, "Debug Draw ON"); + _debugLabel->retain(); + auto menuItem1 = MenuItemLabel::create(_debugLabel, [=](Ref*){ + bool enabledDebug = !getNavMesh()->isDebugDrawEnabled(); + getNavMesh()->setDebugDrawEnable(enabledDebug); + if (enabledDebug){ + _debugLabel->setString("Debug Draw ON"); + } + else{ + _debugLabel->setString("Debug Draw OFF"); + } + }); + menuItem1->setAnchorPoint(Vec2::ANCHOR_TOP_LEFT); + menuItem1->setPosition(Vec2(VisibleRect::left().x, VisibleRect::top().y - 100)); + auto menu = Menu::create(menuItem1, nullptr); + menu->setPosition(Vec2::ZERO); + addChild(menu); + + return true; +} + +void NavMeshBasicTestDemo::onEnter() +{ + NavMeshBaseTestDemo::onEnter(); + + Physics3DWorld::HitResult result; + getPhysics3DWorld()->rayCast(Vec3(0.0f, 50.0f, 0.0f), Vec3(0.0f, -50.0f, 0.0f), &result); + createAgent(result.hitPosition); +} + +NavMeshAdvanceTestDemo::NavMeshAdvanceTestDemo(void) +{ + +} + +NavMeshAdvanceTestDemo::~NavMeshAdvanceTestDemo(void) +{ + +} + +bool NavMeshAdvanceTestDemo::init() +{ + if (!NavMeshBaseTestDemo::init()) return false; + + TTFConfig ttfConfig("fonts/arial.ttf", 15); + _obstacleLabel = Label::createWithTTF(ttfConfig, "Create Obstacle"); + _obstacleLabel->retain(); + _agentLabel = Label::createWithTTF(ttfConfig, "Create Agent"); + _agentLabel->retain(); + _debugLabel = Label::createWithTTF(ttfConfig, "Debug Draw ON"); + _debugLabel->retain(); + + auto menuItem0 = MenuItemLabel::create(_obstacleLabel, [=](Ref*){ + float x = cocos2d::random(-50.0f, 50.0f); + float z = cocos2d::random(-50.0f, 50.0f); + Physics3DWorld::HitResult result; + getPhysics3DWorld()->rayCast(Vec3(x, 50.0f, z), Vec3(x, -50.0f, z), &result); + createObstacle(result.hitPosition); + }); + menuItem0->setAnchorPoint(Vec2::ANCHOR_TOP_LEFT); + menuItem0->setPosition(Vec2(VisibleRect::left().x, VisibleRect::top().y - 50)); + + auto menuItem1 = MenuItemLabel::create(_agentLabel, [=](Ref*){ + float x = cocos2d::random(-50.0f, 50.0f); + float z = cocos2d::random(-50.0f, 50.0f); + Physics3DWorld::HitResult result; + getPhysics3DWorld()->rayCast(Vec3(x, 50.0f, z), Vec3(x, -50.0f, z), &result); + createAgent(result.hitPosition); + }); + menuItem1->setAnchorPoint(Vec2::ANCHOR_TOP_LEFT); + menuItem1->setPosition(Vec2(VisibleRect::left().x, VisibleRect::top().y - 100)); + + auto menuItem2 = MenuItemLabel::create(_debugLabel, [=](Ref*){ + bool enabledDebug = !getNavMesh()->isDebugDrawEnabled(); + getNavMesh()->setDebugDrawEnable(enabledDebug); + if (enabledDebug){ + _debugLabel->setString("Debug Draw ON"); + } + else{ + _debugLabel->setString("Debug Draw OFF"); + } + }); + menuItem2->setAnchorPoint(Vec2::ANCHOR_TOP_LEFT); + menuItem2->setPosition(Vec2(VisibleRect::left().x, VisibleRect::top().y - 150)); + + auto menu = Menu::create(menuItem0, menuItem1, menuItem2, nullptr); + menu->setPosition(Vec2::ZERO); + addChild(menu); + + return true; +} + +void NavMeshAdvanceTestDemo::onEnter() +{ + NavMeshBaseTestDemo::onEnter(); + + Physics3DWorld::HitResult result; + getPhysics3DWorld()->rayCast(Vec3(0.0f, 50.0f, 0.0f), Vec3(0.0f, -50.0f, 0.0f), &result); + createAgent(result.hitPosition); +} + +std::string NavMeshAdvanceTestDemo::title() const +{ + return "Navigation Mesh Test"; +} + +std::string NavMeshAdvanceTestDemo::subtitle() const +{ + return "Advance Test"; +} + +void NavMeshAdvanceTestDemo::touchesEnded(const std::vector& touches, cocos2d::Event *event) +{ + if (!_needMoveAgents) return; + if (!touches.empty()){ + auto touch = touches[0]; + auto location = touch->getLocationInView(); + Vec3 nearP(location.x, location.y, 0.0f), farP(location.x, location.y, 1.0f); + + auto size = Director::getInstance()->getWinSize(); + _camera->unproject(size, &nearP, &nearP); + _camera->unproject(size, &farP, &farP); + + Physics3DWorld::HitResult result; + getPhysics3DWorld()->rayCast(nearP, farP, &result); + moveAgents(result.hitPosition); + } +} + +#endif diff --git a/tests/cpp-tests/Classes/NavMeshTest/NavMeshTest.h b/tests/cpp-tests/Classes/NavMeshTest/NavMeshTest.h new file mode 100644 index 000000000000..ceb0981aa048 --- /dev/null +++ b/tests/cpp-tests/Classes/NavMeshTest/NavMeshTest.h @@ -0,0 +1,128 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + + 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 _NAVMESH_TEST_H_ +#define _NAVMESH_TEST_H_ + +#include "../testBasic.h" +#include "../BaseTest.h" +#include "navmesh/CCNavMesh.h" +#include + +DEFINE_TEST_SUITE(NavMeshTests); + +#if CC_USE_NAVMESH == 0 +class NavMeshDisabled : public TestCase +{ +public: + CREATE_FUNC(NavMeshDisabled); + + virtual void onEnter() override; +}; +#else + +class NavMeshBaseTestDemo : public TestCase +{ +public: + CREATE_FUNC(NavMeshBaseTestDemo); + NavMeshBaseTestDemo(void); + virtual ~NavMeshBaseTestDemo(void); + + // overrides + virtual bool init() override; + virtual void update(float delta) override; + virtual void onTouchesBegan(const std::vector& touches, cocos2d::Event *event); + virtual void onTouchesMoved(const std::vector& touches, cocos2d::Event *event); + virtual void onTouchesEnded(const std::vector& touches, cocos2d::Event *event); + +protected: + + void initScene(); + void createAgent(const cocos2d::Vec3 &pos); + void createObstacle(const cocos2d::Vec3 &pos); + void moveAgents(const cocos2d::Vec3 &des); + virtual void touchesBegan(const std::vector& touches, cocos2d::Event *event){}; + virtual void touchesMoved(const std::vector& touches, cocos2d::Event *event){}; + virtual void touchesEnded(const std::vector& touches, cocos2d::Event *event){}; + +protected: + cocos2d::Camera *_camera; + float _angle; + std::vector > _agents; + bool _needMoveAgents; +}; + +class NavMeshBasicTestDemo : public NavMeshBaseTestDemo +{ +public: + CREATE_FUNC(NavMeshBasicTestDemo); + NavMeshBasicTestDemo(void); + virtual ~NavMeshBasicTestDemo(void); + + // overrides + virtual bool init() override; + virtual std::string title() const override; + virtual std::string subtitle() const override; + + virtual void onEnter() override; + +protected: + + virtual void touchesBegan(const std::vector& touches, cocos2d::Event *event){}; + virtual void touchesMoved(const std::vector& touches, cocos2d::Event *event){}; + virtual void touchesEnded(const std::vector& touches, cocos2d::Event *event); + +protected: + cocos2d::Label *_debugLabel; +}; + +class NavMeshAdvanceTestDemo : public NavMeshBaseTestDemo +{ +public: + CREATE_FUNC(NavMeshAdvanceTestDemo); + NavMeshAdvanceTestDemo(void); + virtual ~NavMeshAdvanceTestDemo(void); + + // overrides + virtual bool init() override; + virtual std::string title() const override; + virtual std::string subtitle() const override; + + virtual void onEnter() override; + +protected: + + virtual void touchesBegan(const std::vector& touches, cocos2d::Event *event){}; + virtual void touchesMoved(const std::vector& touches, cocos2d::Event *event){}; + virtual void touchesEnded(const std::vector& touches, cocos2d::Event *event); + +protected: + cocos2d::Label *_obstacleLabel; + cocos2d::Label *_agentLabel; + cocos2d::Label *_debugLabel; +}; + +#endif + +#endif diff --git a/tests/cpp-tests/Classes/controller.cpp b/tests/cpp-tests/Classes/controller.cpp index 7502565af419..43475c3d1232 100644 --- a/tests/cpp-tests/Classes/controller.cpp +++ b/tests/cpp-tests/Classes/controller.cpp @@ -49,6 +49,7 @@ class RootTests : public TestList addTest("Fonts", []() { return new FontTests(); }); addTest("Interval", [](){return new IntervalTests(); }); addTest("Material System", [](){return new MaterialSystemTest(); }); + addTest("Navigation Mesh", [](){return new NavMeshTests(); }); addTest("Node: BillBoard Test", [](){ return new BillBoardTests(); }); addTest("Node: Camera 3D Test", [](){ return new Camera3DTests(); }); addTest("Node: Clipping", []() { return new ClippingNodeTests(); }); diff --git a/tests/cpp-tests/Classes/tests.h b/tests/cpp-tests/Classes/tests.h index 5a23eee399a8..0e07c5da60f7 100644 --- a/tests/cpp-tests/Classes/tests.h +++ b/tests/cpp-tests/Classes/tests.h @@ -82,6 +82,7 @@ #include "LightTest/LightTest.h" #include "Particle3DTest/Particle3DTest.h" #include "Physics3DTest/Physics3DTest.h" +#include "NavMeshTest/NavMeshTest.h" #include "OpenURLTest/OpenURLTest.h" #include "AllocatorTest/AllocatorTest.h" diff --git a/tests/cpp-tests/Resources/NavMesh/all_tiles_tilecache.bin b/tests/cpp-tests/Resources/NavMesh/all_tiles_tilecache.bin new file mode 100644 index 000000000000..5383ff4d0a7f Binary files /dev/null and b/tests/cpp-tests/Resources/NavMesh/all_tiles_tilecache.bin differ diff --git a/tests/cpp-tests/Resources/NavMesh/geomset.txt b/tests/cpp-tests/Resources/NavMesh/geomset.txt new file mode 100644 index 000000000000..472cb4524c0e --- /dev/null +++ b/tests/cpp-tests/Resources/NavMesh/geomset.txt @@ -0,0 +1,6 @@ +f Meshes/scene.obj +c -1.415108 11.074799 40.988361 19.871681 8.906498 40.807953 0.600000 1 5 8 +c 24.950050 8.906502 39.621304 33.185913 7.342701 22.568581 0.600000 1 5 8 +c 32.954346 7.342701 18.303593 33.168766 8.489700 -2.227217 0.600000 1 5 8 +c 30.448170 8.489697 -10.263871 14.368065 9.219200 -24.601736 0.600000 1 5 8 +c 12.478474 9.219200 -23.165859 -0.123363 0.999996 -23.276600 0.600000 0 5 8 diff --git a/tests/cpp-tests/Resources/NavMesh/maps/scenetex.png b/tests/cpp-tests/Resources/NavMesh/maps/scenetex.png new file mode 100644 index 000000000000..ce473f8dac5b Binary files /dev/null and b/tests/cpp-tests/Resources/NavMesh/maps/scenetex.png differ diff --git a/tests/cpp-tests/Resources/NavMesh/scene.mtl b/tests/cpp-tests/Resources/NavMesh/scene.mtl new file mode 100644 index 000000000000..39e74fa9d17a --- /dev/null +++ b/tests/cpp-tests/Resources/NavMesh/scene.mtl @@ -0,0 +1,15 @@ +# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware + +newmtl 01___Default + Ns 10.0000 + Ni 1.5000 + d 1.0000 + Tr 0.0000 + Tf 1.0000 1.0000 1.0000 + illum 2 + Ka 0.8353 0.8353 0.8353 + Kd 0.8353 0.8353 0.8353 + Ks 0.0000 0.0000 0.0000 + Ke 0.0000 0.0000 0.0000 + map_Ka maps\scenetex.png + map_Kd maps\scenetex.png diff --git a/tests/cpp-tests/Resources/NavMesh/scene.obj b/tests/cpp-tests/Resources/NavMesh/scene.obj new file mode 100644 index 000000000000..47b14b7b3364 --- /dev/null +++ b/tests/cpp-tests/Resources/NavMesh/scene.obj @@ -0,0 +1,1063 @@ +# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware +# ´´½¨µÄÎļþ:19.05.2015 14:43:15 + +mtllib scene.mtl + +# +# object Capsule001 +# + +v -19.8356 10.0881 -15.2728 +v -19.1025 9.9916 -15.2728 +v -19.2007 9.9916 -15.6394 +v -19.4691 9.9916 -15.9077 +v -19.8356 9.9916 -16.0060 +v -20.2022 9.9916 -15.9077 +v -20.4706 9.9916 -15.6394 +v -20.5688 9.9916 -15.2728 +v -20.4706 9.9916 -14.9062 +v -20.2022 9.9916 -14.6378 +v -19.8356 9.9916 -14.5396 +v -19.4691 9.9916 -14.6378 +v -19.2007 9.9916 -14.9062 +v -18.6090 9.7086 -15.9810 +v -18.4193 9.7086 -15.2728 +v -19.1275 9.7086 -16.4994 +v -19.8356 9.7086 -16.6892 +v -20.5438 9.7086 -16.4994 +v -21.0623 9.7086 -15.9810 +v -21.2520 9.7086 -15.2728 +v -21.0623 9.7086 -14.5646 +v -20.5438 9.7086 -14.0462 +v -19.8356 9.7086 -13.8564 +v -19.1275 9.7086 -14.0462 +v -18.6090 9.7086 -14.5646 +v -18.1009 9.2584 -16.2743 +v -17.8326 9.2584 -15.2728 +v -18.8341 9.2584 -17.0075 +v -19.8356 9.2584 -17.2758 +v -20.8372 9.2584 -17.0075 +v -21.5704 9.2584 -16.2743 +v -21.8387 9.2584 -15.2728 +v -21.5704 9.2584 -14.2712 +v -20.8372 9.2584 -13.5381 +v -19.8356 9.2584 -13.2697 +v -18.8341 9.2584 -13.5381 +v -18.1009 9.2584 -14.2712 +v -17.7111 8.6717 -16.4994 +v -17.3824 8.6717 -15.2728 +v -18.6090 8.6717 -17.3974 +v -19.8356 8.6717 -17.7260 +v -21.0623 8.6717 -17.3974 +v -21.9602 8.6717 -16.4994 +v -22.2889 8.6717 -15.2728 +v -21.9602 8.6717 -14.0462 +v -21.0623 8.6717 -13.1482 +v -19.8356 8.6717 -12.8195 +v -18.6090 8.6717 -13.1482 +v -17.7111 8.6717 -14.0462 +v -17.4660 7.9885 -16.6409 +v -17.0994 7.9885 -15.2728 +v -18.4675 7.9885 -17.6424 +v -19.8356 7.9885 -18.0090 +v -21.2038 7.9885 -17.6424 +v -22.2053 7.9885 -16.6409 +v -22.5719 7.9885 -15.2728 +v -22.2053 7.9885 -13.9047 +v -21.2038 7.9885 -12.9031 +v -19.8356 7.9885 -12.5365 +v -18.4675 7.9885 -12.9031 +v -17.4660 7.9885 -13.9047 +v -17.3824 7.2553 -16.6892 +v -17.0029 7.2553 -15.2728 +v -18.4193 7.2553 -17.7260 +v -19.8356 7.2553 -18.1055 +v -21.2520 7.2553 -17.7260 +v -22.2889 7.2553 -16.6892 +v -22.6684 7.2553 -15.2728 +v -22.2889 7.2553 -13.8564 +v -21.2520 7.2553 -12.8195 +v -19.8356 7.2553 -12.4400 +v -18.4193 7.2553 -12.8195 +v -17.3824 7.2553 -13.8564 +v -17.3824 2.8328 -16.6892 +v -17.0029 2.8328 -15.2728 +v -18.4193 2.8328 -17.7260 +v -19.8356 2.8328 -18.1055 +v -21.2520 2.8328 -17.7260 +v -22.2889 2.8328 -16.6892 +v -22.6684 2.8328 -15.2728 +v -22.2889 2.8328 -13.8564 +v -21.2520 2.8328 -12.8195 +v -19.8356 2.8328 -12.4400 +v -18.4193 2.8328 -12.8195 +v -17.3824 2.8328 -13.8564 +v -17.4660 2.0996 -16.6409 +v -17.0994 2.0996 -15.2728 +v -18.4675 2.0996 -17.6424 +v -19.8356 2.0996 -18.0090 +v -21.2038 2.0996 -17.6424 +v -22.2053 2.0996 -16.6409 +v -22.5719 2.0996 -15.2728 +v -22.2053 2.0996 -13.9047 +v -21.2038 2.0996 -12.9031 +v -19.8356 2.0996 -12.5365 +v -18.4675 2.0996 -12.9031 +v -17.4660 2.0996 -13.9047 +v -17.7111 1.4164 -16.4994 +v -17.3824 1.4164 -15.2728 +v -18.6090 1.4164 -17.3974 +v -19.8356 1.4164 -17.7260 +v -21.0623 1.4164 -17.3974 +v -21.9602 1.4164 -16.4994 +v -22.2889 1.4164 -15.2728 +v -21.9602 1.4164 -14.0462 +v -21.0623 1.4164 -13.1482 +v -19.8356 1.4164 -12.8195 +v -18.6090 1.4164 -13.1482 +v -17.7111 1.4164 -14.0462 +v -18.1009 0.8297 -16.2743 +v -17.8326 0.8297 -15.2728 +v -18.8341 0.8297 -17.0075 +v -19.8356 0.8297 -17.2758 +v -20.8372 0.8297 -17.0075 +v -21.5704 0.8297 -16.2743 +v -21.8387 0.8297 -15.2728 +v -21.5704 0.8297 -14.2712 +v -20.8372 0.8297 -13.5381 +v -19.8356 0.8297 -13.2697 +v -18.8341 0.8297 -13.5381 +v -18.1009 0.8297 -14.2712 +v -18.6090 0.3795 -15.9810 +v -18.4193 0.3795 -15.2728 +v -19.1275 0.3795 -16.4994 +v -19.8356 0.3795 -16.6892 +v -20.5438 0.3795 -16.4994 +v -21.0623 0.3795 -15.9810 +v -21.2520 0.3795 -15.2728 +v -21.0623 0.3795 -14.5646 +v -20.5438 0.3795 -14.0462 +v -19.8356 0.3795 -13.8564 +v -19.1275 0.3795 -14.0462 +v -18.6090 0.3795 -14.5646 +v -19.2007 0.0965 -15.6394 +v -19.1025 0.0965 -15.2728 +v -19.4691 0.0965 -15.9077 +v -19.8356 0.0965 -16.0060 +v -20.2022 0.0965 -15.9077 +v -20.4706 0.0965 -15.6394 +v -20.5688 0.0965 -15.2728 +v -20.4706 0.0965 -14.9062 +v -20.2022 0.0965 -14.6378 +v -19.8356 0.0965 -14.5396 +v -19.4691 0.0965 -14.6378 +v -19.2007 0.0965 -14.9062 +v -19.8356 0.0000 -15.2728 +# 146 vertices + +vn 0.0000 1.0000 0.0000 +vn 0.2789 0.9603 0.0000 +vn 0.2415 0.9603 -0.1394 +vn 0.1394 0.9603 -0.2415 +vn 0.0000 0.9603 -0.2789 +vn -0.1394 0.9603 -0.2415 +vn -0.2415 0.9603 -0.1394 +vn -0.2789 0.9603 -0.0000 +vn -0.2415 0.9603 0.1394 +vn -0.1394 0.9603 0.2415 +vn -0.0000 0.9603 0.2789 +vn 0.1394 0.9603 0.2415 +vn 0.2415 0.9603 0.1394 +vn 0.4468 0.8566 -0.2580 +vn 0.5159 0.8566 0.0000 +vn 0.2580 0.8566 -0.4468 +vn -0.0000 0.8566 -0.5159 +vn -0.2580 0.8566 -0.4468 +vn -0.4468 0.8566 -0.2580 +vn -0.5159 0.8566 -0.0000 +vn -0.4468 0.8566 0.2580 +vn -0.2580 0.8566 0.4468 +vn -0.0000 0.8566 0.5159 +vn 0.2580 0.8566 0.4468 +vn 0.4468 0.8566 0.2580 +vn 0.6215 0.6965 -0.3588 +vn 0.7176 0.6965 0.0000 +vn 0.3588 0.6965 -0.6215 +vn -0.0000 0.6965 -0.7176 +vn -0.3588 0.6965 -0.6215 +vn -0.6215 0.6965 -0.3588 +vn -0.7176 0.6965 -0.0000 +vn -0.6215 0.6965 0.3588 +vn -0.3588 0.6965 0.6215 +vn -0.0000 0.6965 0.7176 +vn 0.3588 0.6965 0.6215 +vn 0.6215 0.6965 0.3588 +vn 0.7545 0.4909 -0.4356 +vn 0.8712 0.4909 0.0000 +vn 0.4356 0.4909 -0.7545 +vn -0.0000 0.4909 -0.8712 +vn -0.4356 0.4909 -0.7545 +vn -0.7545 0.4909 -0.4356 +vn -0.8712 0.4909 -0.0000 +vn -0.7545 0.4909 0.4356 +vn -0.4356 0.4909 0.7545 +vn -0.0000 0.4909 0.8712 +vn 0.4356 0.4909 0.7545 +vn 0.7545 0.4909 0.4356 +vn 0.8377 0.2536 -0.4837 +vn 0.9673 0.2536 0.0000 +vn 0.4837 0.2536 -0.8377 +vn -0.0000 0.2536 -0.9673 +vn -0.4837 0.2536 -0.8377 +vn -0.8377 0.2536 -0.4837 +vn -0.9673 0.2536 -0.0000 +vn -0.8377 0.2536 0.4837 +vn -0.4837 0.2536 0.8377 +vn -0.0000 0.2536 0.9673 +vn 0.4837 0.2536 0.8377 +vn 0.8377 0.2536 0.4837 +vn 0.8642 0.0647 -0.4990 +vn 0.9979 0.0647 0.0000 +vn 0.4990 0.0647 -0.8642 +vn -0.0000 0.0647 -0.9979 +vn -0.4990 0.0647 -0.8642 +vn -0.8642 0.0647 -0.4990 +vn -0.9979 0.0647 -0.0000 +vn -0.8642 0.0647 0.4990 +vn -0.4990 0.0647 0.8642 +vn -0.0000 0.0647 0.9979 +vn 0.4990 0.0647 0.8642 +vn 0.8642 0.0647 0.4990 +vn 0.8642 -0.0647 -0.4990 +vn 0.9979 -0.0647 0.0000 +vn 0.4990 -0.0647 -0.8642 +vn -0.0000 -0.0647 -0.9979 +vn -0.4990 -0.0647 -0.8642 +vn -0.8642 -0.0647 -0.4990 +vn -0.9979 -0.0647 -0.0000 +vn -0.8642 -0.0647 0.4990 +vn -0.4990 -0.0647 0.8642 +vn -0.0000 -0.0647 0.9979 +vn 0.4990 -0.0647 0.8642 +vn 0.8642 -0.0647 0.4990 +vn 0.8377 -0.2536 -0.4837 +vn 0.9673 -0.2536 0.0000 +vn 0.4837 -0.2536 -0.8377 +vn -0.0000 -0.2536 -0.9673 +vn -0.4837 -0.2536 -0.8377 +vn -0.8377 -0.2536 -0.4837 +vn -0.9673 -0.2536 -0.0000 +vn -0.8377 -0.2536 0.4837 +vn -0.4837 -0.2536 0.8377 +vn -0.0000 -0.2536 0.9673 +vn 0.4837 -0.2536 0.8377 +vn 0.8377 -0.2536 0.4837 +vn 0.7545 -0.4909 -0.4356 +vn 0.8712 -0.4909 0.0000 +vn 0.4356 -0.4909 -0.7545 +vn 0.0000 -0.4909 -0.8712 +vn -0.4356 -0.4909 -0.7545 +vn -0.7545 -0.4909 -0.4356 +vn -0.8712 -0.4909 -0.0000 +vn -0.7545 -0.4909 0.4356 +vn -0.4356 -0.4909 0.7545 +vn -0.0000 -0.4909 0.8712 +vn 0.4356 -0.4909 0.7545 +vn 0.7545 -0.4909 0.4356 +vn 0.6215 -0.6965 -0.3588 +vn 0.7176 -0.6965 0.0000 +vn 0.3588 -0.6965 -0.6215 +vn -0.0000 -0.6965 -0.7176 +vn -0.3588 -0.6965 -0.6215 +vn -0.6215 -0.6965 -0.3588 +vn -0.7176 -0.6965 -0.0000 +vn -0.6215 -0.6965 0.3588 +vn -0.3588 -0.6965 0.6215 +vn -0.0000 -0.6965 0.7176 +vn 0.3588 -0.6965 0.6215 +vn 0.6215 -0.6965 0.3588 +vn 0.4468 -0.8566 -0.2580 +vn 0.5159 -0.8566 0.0000 +vn 0.2580 -0.8566 -0.4468 +vn -0.0000 -0.8566 -0.5159 +vn -0.2580 -0.8566 -0.4468 +vn -0.4468 -0.8566 -0.2580 +vn -0.5159 -0.8566 -0.0000 +vn -0.4468 -0.8566 0.2580 +vn -0.2580 -0.8566 0.4468 +vn -0.0000 -0.8566 0.5159 +vn 0.2580 -0.8566 0.4468 +vn 0.4468 -0.8566 0.2580 +vn 0.2415 -0.9603 -0.1394 +vn 0.2789 -0.9603 0.0000 +vn 0.1394 -0.9603 -0.2415 +vn -0.0000 -0.9603 -0.2789 +vn -0.1394 -0.9603 -0.2415 +vn -0.2415 -0.9603 -0.1394 +vn -0.2789 -0.9603 -0.0000 +vn -0.2415 -0.9603 0.1394 +vn -0.1394 -0.9603 0.2415 +vn -0.0000 -0.9603 0.2789 +vn 0.1394 -0.9603 0.2415 +vn 0.2415 -0.9603 0.1394 +vn -0.0000 -1.0000 0.0000 +# 146 vertex normals + +vt 0.5000 0.5000 0.0000 +vt 0.6294 0.5000 0.0000 +vt 0.6121 0.5647 0.0000 +vt 0.5647 0.6121 0.0000 +vt 0.5000 0.6294 0.0000 +vt 0.4353 0.6121 0.0000 +vt 0.3879 0.5647 0.0000 +vt 0.3706 0.5000 0.0000 +vt 0.3879 0.4353 0.0000 +vt 0.4353 0.3879 0.0000 +vt 0.5000 0.3706 0.0000 +vt 0.5647 0.3879 0.0000 +vt 0.6121 0.4353 0.0000 +vt 0.7165 0.6250 0.0000 +vt 0.7500 0.5000 0.0000 +vt 0.6250 0.7165 0.0000 +vt 0.5000 0.7500 0.0000 +vt 0.3750 0.7165 0.0000 +vt 0.2835 0.6250 0.0000 +vt 0.2500 0.5000 0.0000 +vt 0.2835 0.3750 0.0000 +vt 0.3750 0.2835 0.0000 +vt 0.5000 0.2500 0.0000 +vt 0.6250 0.2835 0.0000 +vt 0.7165 0.3750 0.0000 +vt 0.8062 0.6768 0.0000 +vt 0.8536 0.5000 0.0000 +vt 0.6768 0.8062 0.0000 +vt 0.5000 0.8536 0.0000 +vt 0.3232 0.8062 0.0000 +vt 0.1938 0.6768 0.0000 +vt 0.1464 0.5000 0.0000 +vt 0.1938 0.3232 0.0000 +vt 0.3232 0.1938 0.0000 +vt 0.5000 0.1464 0.0000 +vt 0.6768 0.1938 0.0000 +vt 0.8062 0.3232 0.0000 +vt 0.8750 0.7165 0.0000 +vt 0.9330 0.5000 0.0000 +vt 0.7165 0.8750 0.0000 +vt 0.5000 0.9330 0.0000 +vt 0.2835 0.8750 0.0000 +vt 0.1250 0.7165 0.0000 +vt 0.0670 0.5000 0.0000 +vt 0.1250 0.2835 0.0000 +vt 0.2835 0.1250 0.0000 +vt 0.5000 0.0670 0.0000 +vt 0.7165 0.1250 0.0000 +vt 0.8750 0.2835 0.0000 +vt 0.9183 0.7415 0.0000 +vt 0.9830 0.5000 0.0000 +vt 0.7415 0.9183 0.0000 +vt 0.5000 0.9830 0.0000 +vt 0.2585 0.9183 0.0000 +vt 0.0817 0.7415 0.0000 +vt 0.0170 0.5000 0.0000 +vt 0.0817 0.2585 0.0000 +vt 0.2585 0.0817 0.0000 +vt 0.5000 0.0170 0.0000 +vt 0.7415 0.0817 0.0000 +vt 0.9183 0.2585 0.0000 +vt 0.9330 0.7500 0.0000 +vt 1.0000 0.5000 0.0000 +vt 0.7500 0.9330 0.0000 +vt 0.5000 1.0000 0.0000 +vt 0.2500 0.9330 0.0000 +vt 0.0670 0.7500 0.0000 +vt 0.0000 0.5000 0.0000 +vt 0.0670 0.2500 0.0000 +vt 0.2500 0.0670 0.0000 +vt 0.5000 0.0000 0.0000 +vt 0.7500 0.0670 0.0000 +vt 0.9330 0.2500 0.0000 +vt 0.0833 0.0000 0.0000 +vt 0.0833 1.0000 0.0000 +vt 0.0000 1.0000 0.0000 +vt 0.0000 0.0000 0.0000 +vt 0.1667 0.0000 0.0000 +vt 0.1667 1.0000 0.0000 +vt 0.2500 0.0000 0.0000 +vt 0.2500 1.0000 0.0000 +vt 0.3333 0.0000 0.0000 +vt 0.3333 1.0000 0.0000 +vt 0.4167 0.0000 0.0000 +vt 0.4167 1.0000 0.0000 +vt 0.5833 0.0000 0.0000 +vt 0.5833 1.0000 0.0000 +vt 0.6667 0.0000 0.0000 +vt 0.6667 1.0000 0.0000 +vt 0.7500 0.0000 0.0000 +vt 0.7500 1.0000 0.0000 +vt 0.8333 0.0000 0.0000 +vt 0.8333 1.0000 0.0000 +vt 0.9167 0.0000 0.0000 +vt 0.9167 1.0000 0.0000 +vt 1.0000 0.0000 0.0000 +vt 1.0000 1.0000 0.0000 +# 97 texture coords + +g Capsule001 +usemtl 01___Default +s 4 +f 1/1/1 2/2/2 3/3/3 +f 1/1/1 3/3/3 4/4/4 +f 1/1/1 4/4/4 5/5/5 +f 1/1/1 5/5/5 6/6/6 +f 1/1/1 6/6/6 7/7/7 +f 1/1/1 7/7/7 8/8/8 +f 1/1/1 8/8/8 9/9/9 +f 1/1/1 9/9/9 10/10/10 +f 1/1/1 10/10/10 11/11/11 +f 1/1/1 11/11/11 12/12/12 +f 1/1/1 12/12/12 13/13/13 +f 1/1/1 13/13/13 2/2/2 +f 14/14/14 3/3/3 2/2/2 +f 2/2/2 15/15/15 14/14/14 +f 16/16/16 4/4/4 3/3/3 +f 3/3/3 14/14/14 16/16/16 +f 17/17/17 5/5/5 4/4/4 +f 4/4/4 16/16/16 17/17/17 +f 18/18/18 6/6/6 5/5/5 +f 5/5/5 17/17/17 18/18/18 +f 19/19/19 7/7/7 6/6/6 +f 6/6/6 18/18/18 19/19/19 +f 20/20/20 8/8/8 7/7/7 +f 7/7/7 19/19/19 20/20/20 +f 21/21/21 9/9/9 8/8/8 +f 8/8/8 20/20/20 21/21/21 +f 22/22/22 10/10/10 9/9/9 +f 9/9/9 21/21/21 22/22/22 +f 23/23/23 11/11/11 10/10/10 +f 10/10/10 22/22/22 23/23/23 +f 24/24/24 12/12/12 11/11/11 +f 11/11/11 23/23/23 24/24/24 +f 25/25/25 13/13/13 12/12/12 +f 12/12/12 24/24/24 25/25/25 +f 15/15/15 2/2/2 13/13/13 +f 13/13/13 25/25/25 15/15/15 +f 26/26/26 14/14/14 15/15/15 +f 15/15/15 27/27/27 26/26/26 +f 28/28/28 16/16/16 14/14/14 +f 14/14/14 26/26/26 28/28/28 +f 29/29/29 17/17/17 16/16/16 +f 16/16/16 28/28/28 29/29/29 +f 30/30/30 18/18/18 17/17/17 +f 17/17/17 29/29/29 30/30/30 +f 31/31/31 19/19/19 18/18/18 +f 18/18/18 30/30/30 31/31/31 +f 32/32/32 20/20/20 19/19/19 +f 19/19/19 31/31/31 32/32/32 +f 33/33/33 21/21/21 20/20/20 +f 20/20/20 32/32/32 33/33/33 +f 34/34/34 22/22/22 21/21/21 +f 21/21/21 33/33/33 34/34/34 +f 35/35/35 23/23/23 22/22/22 +f 22/22/22 34/34/34 35/35/35 +f 36/36/36 24/24/24 23/23/23 +f 23/23/23 35/35/35 36/36/36 +f 37/37/37 25/25/25 24/24/24 +f 24/24/24 36/36/36 37/37/37 +f 27/27/27 15/15/15 25/25/25 +f 25/25/25 37/37/37 27/27/27 +f 38/38/38 26/26/26 27/27/27 +f 27/27/27 39/39/39 38/38/38 +f 40/40/40 28/28/28 26/26/26 +f 26/26/26 38/38/38 40/40/40 +f 41/41/41 29/29/29 28/28/28 +f 28/28/28 40/40/40 41/41/41 +f 42/42/42 30/30/30 29/29/29 +f 29/29/29 41/41/41 42/42/42 +f 43/43/43 31/31/31 30/30/30 +f 30/30/30 42/42/42 43/43/43 +f 44/44/44 32/32/32 31/31/31 +f 31/31/31 43/43/43 44/44/44 +f 45/45/45 33/33/33 32/32/32 +f 32/32/32 44/44/44 45/45/45 +f 46/46/46 34/34/34 33/33/33 +f 33/33/33 45/45/45 46/46/46 +f 47/47/47 35/35/35 34/34/34 +f 34/34/34 46/46/46 47/47/47 +f 48/48/48 36/36/36 35/35/35 +f 35/35/35 47/47/47 48/48/48 +f 49/49/49 37/37/37 36/36/36 +f 36/36/36 48/48/48 49/49/49 +f 39/39/39 27/27/27 37/37/37 +f 37/37/37 49/49/49 39/39/39 +f 50/50/50 38/38/38 39/39/39 +f 39/39/39 51/51/51 50/50/50 +f 52/52/52 40/40/40 38/38/38 +f 38/38/38 50/50/50 52/52/52 +f 53/53/53 41/41/41 40/40/40 +f 40/40/40 52/52/52 53/53/53 +f 54/54/54 42/42/42 41/41/41 +f 41/41/41 53/53/53 54/54/54 +f 55/55/55 43/43/43 42/42/42 +f 42/42/42 54/54/54 55/55/55 +f 56/56/56 44/44/44 43/43/43 +f 43/43/43 55/55/55 56/56/56 +f 57/57/57 45/45/45 44/44/44 +f 44/44/44 56/56/56 57/57/57 +f 58/58/58 46/46/46 45/45/45 +f 45/45/45 57/57/57 58/58/58 +f 59/59/59 47/47/47 46/46/46 +f 46/46/46 58/58/58 59/59/59 +f 60/60/60 48/48/48 47/47/47 +f 47/47/47 59/59/59 60/60/60 +f 61/61/61 49/49/49 48/48/48 +f 48/48/48 60/60/60 61/61/61 +f 51/51/51 39/39/39 49/49/49 +f 49/49/49 61/61/61 51/51/51 +f 62/62/62 50/50/50 51/51/51 +f 51/51/51 63/63/63 62/62/62 +f 64/64/64 52/52/52 50/50/50 +f 50/50/50 62/62/62 64/64/64 +f 65/65/65 53/53/53 52/52/52 +f 52/52/52 64/64/64 65/65/65 +f 66/66/66 54/54/54 53/53/53 +f 53/53/53 65/65/65 66/66/66 +f 67/67/67 55/55/55 54/54/54 +f 54/54/54 66/66/66 67/67/67 +f 68/68/68 56/56/56 55/55/55 +f 55/55/55 67/67/67 68/68/68 +f 69/69/69 57/57/57 56/56/56 +f 56/56/56 68/68/68 69/69/69 +f 70/70/70 58/58/58 57/57/57 +f 57/57/57 69/69/69 70/70/70 +f 71/71/71 59/59/59 58/58/58 +f 58/58/58 70/70/70 71/71/71 +f 72/72/72 60/60/60 59/59/59 +f 59/59/59 71/71/71 72/72/72 +f 73/73/73 61/61/61 60/60/60 +f 60/60/60 72/72/72 73/73/73 +f 63/63/63 51/51/51 61/61/61 +f 61/61/61 73/73/73 63/63/63 +f 74/74/74 62/75/62 63/76/63 +f 63/76/63 75/77/75 74/74/74 +f 76/78/76 64/79/64 62/75/62 +f 62/75/62 74/74/74 76/78/76 +f 77/80/77 65/81/65 64/79/64 +f 64/79/64 76/78/76 77/80/77 +f 78/82/78 66/83/66 65/81/65 +f 65/81/65 77/80/77 78/82/78 +f 79/84/79 67/85/67 66/83/66 +f 66/83/66 78/82/78 79/84/79 +f 80/71/80 68/65/68 67/85/67 +f 67/85/67 79/84/79 80/71/80 +f 81/86/81 69/87/69 68/65/68 +f 68/65/68 80/71/80 81/86/81 +f 82/88/82 70/89/70 69/87/69 +f 69/87/69 81/86/81 82/88/82 +f 83/90/83 71/91/71 70/89/70 +f 70/89/70 82/88/82 83/90/83 +f 84/92/84 72/93/72 71/91/71 +f 71/91/71 83/90/83 84/92/84 +f 85/94/85 73/95/73 72/93/72 +f 72/93/72 84/92/84 85/94/85 +f 75/96/75 63/97/63 73/95/73 +f 73/95/73 85/94/85 75/96/75 +f 86/50/86 74/62/74 75/63/75 +f 75/63/75 87/51/87 86/50/86 +f 88/52/88 76/64/76 74/62/74 +f 74/62/74 86/50/86 88/52/88 +f 89/53/89 77/65/77 76/64/76 +f 76/64/76 88/52/88 89/53/89 +f 90/54/90 78/66/78 77/65/77 +f 77/65/77 89/53/89 90/54/90 +f 91/55/91 79/67/79 78/66/78 +f 78/66/78 90/54/90 91/55/91 +f 92/56/92 80/68/80 79/67/79 +f 79/67/79 91/55/91 92/56/92 +f 93/57/93 81/69/81 80/68/80 +f 80/68/80 92/56/92 93/57/93 +f 94/58/94 82/70/82 81/69/81 +f 81/69/81 93/57/93 94/58/94 +f 95/59/95 83/71/83 82/70/82 +f 82/70/82 94/58/94 95/59/95 +f 96/60/96 84/72/84 83/71/83 +f 83/71/83 95/59/95 96/60/96 +f 97/61/97 85/73/85 84/72/84 +f 84/72/84 96/60/96 97/61/97 +f 87/51/87 75/63/75 85/73/85 +f 85/73/85 97/61/97 87/51/87 +f 98/38/98 86/50/86 87/51/87 +f 87/51/87 99/39/99 98/38/98 +f 100/40/100 88/52/88 86/50/86 +f 86/50/86 98/38/98 100/40/100 +f 101/41/101 89/53/89 88/52/88 +f 88/52/88 100/40/100 101/41/101 +f 102/42/102 90/54/90 89/53/89 +f 89/53/89 101/41/101 102/42/102 +f 103/43/103 91/55/91 90/54/90 +f 90/54/90 102/42/102 103/43/103 +f 104/44/104 92/56/92 91/55/91 +f 91/55/91 103/43/103 104/44/104 +f 105/45/105 93/57/93 92/56/92 +f 92/56/92 104/44/104 105/45/105 +f 106/46/106 94/58/94 93/57/93 +f 93/57/93 105/45/105 106/46/106 +f 107/47/107 95/59/95 94/58/94 +f 94/58/94 106/46/106 107/47/107 +f 108/48/108 96/60/96 95/59/95 +f 95/59/95 107/47/107 108/48/108 +f 109/49/109 97/61/97 96/60/96 +f 96/60/96 108/48/108 109/49/109 +f 99/39/99 87/51/87 97/61/97 +f 97/61/97 109/49/109 99/39/99 +f 110/26/110 98/38/98 99/39/99 +f 99/39/99 111/27/111 110/26/110 +f 112/28/112 100/40/100 98/38/98 +f 98/38/98 110/26/110 112/28/112 +f 113/29/113 101/41/101 100/40/100 +f 100/40/100 112/28/112 113/29/113 +f 114/30/114 102/42/102 101/41/101 +f 101/41/101 113/29/113 114/30/114 +f 115/31/115 103/43/103 102/42/102 +f 102/42/102 114/30/114 115/31/115 +f 116/32/116 104/44/104 103/43/103 +f 103/43/103 115/31/115 116/32/116 +f 117/33/117 105/45/105 104/44/104 +f 104/44/104 116/32/116 117/33/117 +f 118/34/118 106/46/106 105/45/105 +f 105/45/105 117/33/117 118/34/118 +f 119/35/119 107/47/107 106/46/106 +f 106/46/106 118/34/118 119/35/119 +f 120/36/120 108/48/108 107/47/107 +f 107/47/107 119/35/119 120/36/120 +f 121/37/121 109/49/109 108/48/108 +f 108/48/108 120/36/120 121/37/121 +f 111/27/111 99/39/99 109/49/109 +f 109/49/109 121/37/121 111/27/111 +f 122/14/122 110/26/110 111/27/111 +f 111/27/111 123/15/123 122/14/122 +f 124/16/124 112/28/112 110/26/110 +f 110/26/110 122/14/122 124/16/124 +f 125/17/125 113/29/113 112/28/112 +f 112/28/112 124/16/124 125/17/125 +f 126/18/126 114/30/114 113/29/113 +f 113/29/113 125/17/125 126/18/126 +f 127/19/127 115/31/115 114/30/114 +f 114/30/114 126/18/126 127/19/127 +f 128/20/128 116/32/116 115/31/115 +f 115/31/115 127/19/127 128/20/128 +f 129/21/129 117/33/117 116/32/116 +f 116/32/116 128/20/128 129/21/129 +f 130/22/130 118/34/118 117/33/117 +f 117/33/117 129/21/129 130/22/130 +f 131/23/131 119/35/119 118/34/118 +f 118/34/118 130/22/130 131/23/131 +f 132/24/132 120/36/120 119/35/119 +f 119/35/119 131/23/131 132/24/132 +f 133/25/133 121/37/121 120/36/120 +f 120/36/120 132/24/132 133/25/133 +f 123/15/123 111/27/111 121/37/121 +f 121/37/121 133/25/133 123/15/123 +f 134/3/134 122/14/122 123/15/123 +f 123/15/123 135/2/135 134/3/134 +f 136/4/136 124/16/124 122/14/122 +f 122/14/122 134/3/134 136/4/136 +f 137/5/137 125/17/125 124/16/124 +f 124/16/124 136/4/136 137/5/137 +f 138/6/138 126/18/126 125/17/125 +f 125/17/125 137/5/137 138/6/138 +f 139/7/139 127/19/127 126/18/126 +f 126/18/126 138/6/138 139/7/139 +f 140/8/140 128/20/128 127/19/127 +f 127/19/127 139/7/139 140/8/140 +f 141/9/141 129/21/129 128/20/128 +f 128/20/128 140/8/140 141/9/141 +f 142/10/142 130/22/130 129/21/129 +f 129/21/129 141/9/141 142/10/142 +f 143/11/143 131/23/131 130/22/130 +f 130/22/130 142/10/142 143/11/143 +f 144/12/144 132/24/132 131/23/131 +f 131/23/131 143/11/143 144/12/144 +f 145/13/145 133/25/133 132/24/132 +f 132/24/132 144/12/144 145/13/145 +f 135/2/135 123/15/123 133/25/133 +f 133/25/133 145/13/145 135/2/135 +f 135/2/135 146/1/146 134/3/134 +f 134/3/134 146/1/146 136/4/136 +f 136/4/136 146/1/146 137/5/137 +f 137/5/137 146/1/146 138/6/138 +f 138/6/138 146/1/146 139/7/139 +f 139/7/139 146/1/146 140/8/140 +f 140/8/140 146/1/146 141/9/141 +f 141/9/141 146/1/146 142/10/142 +f 142/10/142 146/1/146 143/11/143 +f 143/11/143 146/1/146 144/12/144 +f 144/12/144 146/1/146 145/13/145 +f 145/13/145 146/1/146 135/2/135 +# 288 faces + +# +# object ____001 +# + +# +# object Box003 +# + +v 28.3398 0.0000 23.8471 +v 28.3398 0.0000 15.4440 +v 37.2512 0.0000 15.4440 +v 37.2512 0.0000 23.8471 +v 28.3398 7.3427 23.8471 +v 37.2512 7.3427 23.8471 +v 37.2512 7.3427 15.4440 +v 28.3398 7.3427 15.4440 +# 8 vertices + +vn 0.0000 -1.0000 -0.0000 +vn 0.0000 1.0000 -0.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 -0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 -0.0000 +# 6 vertex normals + +vt 1.0000 0.0000 0.0000 +vt 1.0000 1.0000 0.0000 +vt 0.0000 1.0000 0.0000 +vt 0.0000 0.0000 0.0000 +# 4 texture coords + +g Box003 +usemtl 01___Default +s 2 +f 147/98/147 148/99/147 149/100/147 +f 149/100/147 150/101/147 147/98/147 +s 4 +f 151/101/148 152/98/148 153/99/148 +f 153/99/148 154/100/148 151/101/148 +s 8 +f 147/101/149 150/98/149 152/99/149 +f 152/99/149 151/100/149 147/101/149 +s 16 +f 150/101/150 149/98/150 153/99/150 +f 153/99/150 152/100/150 150/101/150 +s 32 +f 149/101/151 148/98/151 154/99/151 +f 154/99/151 153/100/151 149/101/151 +s 64 +f 148/101/152 147/98/152 151/99/152 +f 151/99/152 154/100/152 148/101/152 +# 12 faces + +# +# object Box004 +# + +v 9.6273 0.0000 -20.5036 +v 9.6273 0.0000 -30.0944 +v 19.2345 0.0000 -30.0944 +v 19.2345 0.0000 -20.5036 +v 9.6273 9.2192 -20.5036 +v 19.2345 9.2192 -20.5036 +v 19.2345 9.2192 -30.0944 +v 9.6273 9.2192 -30.0944 +# 8 vertices + +vn 0.0000 -1.0000 -0.0000 +vn 0.0000 1.0000 -0.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 -0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 -0.0000 +# 6 vertex normals + +vt 1.0000 0.0000 0.0000 +vt 1.0000 1.0000 0.0000 +vt 0.0000 1.0000 0.0000 +vt 0.0000 0.0000 0.0000 +# 4 texture coords + +g Box004 +usemtl 01___Default +s 2 +f 155/102/153 156/103/153 157/104/153 +f 157/104/153 158/105/153 155/102/153 +s 4 +f 159/105/154 160/102/154 161/103/154 +f 161/103/154 162/104/154 159/105/154 +s 8 +f 155/105/155 158/102/155 160/103/155 +f 160/103/155 159/104/155 155/105/155 +s 16 +f 158/105/156 157/102/156 161/103/156 +f 161/103/156 160/104/156 158/105/156 +s 32 +f 157/105/157 156/102/157 162/103/157 +f 162/103/157 161/104/157 157/105/157 +s 64 +f 156/105/158 155/102/158 159/103/158 +f 159/103/158 162/104/158 156/105/158 +# 12 faces + +# +# object Box008 +# + +v -13.1344 0.0000 45.4839 +v -13.1344 0.0000 32.9018 +v 4.1393 0.0000 32.9018 +v 4.1393 0.0000 45.4839 +v -13.1344 0.9776 -5.1609 +v 4.1393 0.9776 -5.1609 +v -13.1344 11.0748 45.4839 +v 4.1393 11.0748 45.4839 +v 4.1393 11.0748 32.9018 +v -13.1344 11.0748 32.9018 +# 10 vertices + +vn 0.0000 -1.0000 -0.0000 +vn 0.0000 -0.9999 -0.0128 +vn 0.0000 -0.9997 -0.0257 +vn 0.0000 1.0000 -0.0000 +vn 0.0000 0.9916 -0.1293 +vn 0.0000 0.9666 -0.2564 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 -0.0000 +vn -1.0000 0.0000 -0.0000 +# 9 vertex normals + +vt 1.0000 0.0000 0.0000 +vt 1.0000 0.5000 0.0000 +vt 0.0000 0.5000 0.0000 +vt 0.0000 0.0000 0.0000 +vt 1.0000 1.0000 0.0000 +vt 0.0000 1.0000 0.0000 +vt 0.5000 0.0000 0.0000 +vt 0.5000 1.0000 0.0000 +# 8 texture coords + +g Box008 +usemtl 01___Default +s 2 +f 163/106/159 164/107/160 165/108/160 +f 165/108/160 166/109/159 163/106/159 +f 164/107/160 167/110/161 168/111/161 +f 168/111/161 165/108/160 164/107/160 +s 4 +f 169/109/162 170/106/162 171/107/163 +f 171/107/163 172/108/163 169/109/162 +f 172/108/163 171/107/163 168/110/164 +f 168/110/164 167/111/164 172/108/163 +s 8 +f 163/109/165 166/106/165 170/110/165 +f 170/110/165 169/111/165 163/109/165 +s 16 +f 166/109/166 165/112/166 171/113/166 +f 171/113/166 170/111/166 166/109/166 +f 165/112/166 168/106/166 171/113/166 +s 64 +f 167/109/167 164/112/167 172/113/167 +f 164/112/167 163/106/167 169/110/167 +f 169/110/167 172/113/167 164/112/167 +# 16 faces + +# +# object Box005 +# + +v -40.0584 0.0000 -35.1705 +v -40.0584 0.0000 -39.3744 +v 4.5723 0.0000 -39.3744 +v 4.5723 0.0000 -35.1705 +v -40.0584 19.0217 -35.1705 +v 4.5723 19.0217 -35.1705 +v 4.5723 19.0217 -39.3744 +v -40.0584 19.0217 -39.3744 +# 8 vertices + +vn 0.0000 -1.0000 -0.0000 +vn 0.0000 1.0000 -0.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 -0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 -0.0000 +# 6 vertex normals + +vt 1.0000 0.0000 0.0000 +vt 1.0000 1.0000 0.0000 +vt 0.0000 1.0000 0.0000 +vt 0.0000 0.0000 0.0000 +# 4 texture coords + +g Box005 +usemtl 01___Default +s 2 +f 173/114/168 174/115/168 175/116/168 +f 175/116/168 176/117/168 173/114/168 +s 4 +f 177/117/169 178/114/169 179/115/169 +f 179/115/169 180/116/169 177/117/169 +s 8 +f 173/117/170 176/114/170 178/115/170 +f 178/115/170 177/116/170 173/117/170 +s 16 +f 176/117/171 175/114/171 179/115/171 +f 179/115/171 178/116/171 176/117/171 +s 32 +f 175/117/172 174/114/172 180/115/172 +f 180/115/172 179/116/172 175/117/172 +s 64 +f 174/117/173 173/114/173 177/115/173 +f 177/115/173 180/116/173 174/117/173 +# 12 faces + +# +# object Box006 +# + +v 26.3586 0.0000 2.1948 +v 26.3586 0.0000 -13.2566 +v 39.8509 0.0000 -13.2566 +v 39.8509 0.0000 2.1948 +v 26.3586 8.4897 2.1948 +v 39.8509 8.4897 2.1948 +v 39.8509 8.4897 -13.2566 +v 26.3586 8.4897 -13.2566 +# 8 vertices + +vn 0.0000 -1.0000 -0.0000 +vn 0.0000 1.0000 -0.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 -0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 -0.0000 +# 6 vertex normals + +vt 1.0000 0.0000 0.0000 +vt 1.0000 1.0000 0.0000 +vt 0.0000 1.0000 0.0000 +vt 0.0000 0.0000 0.0000 +# 4 texture coords + +g Box006 +usemtl 01___Default +s 2 +f 181/118/174 182/119/174 183/120/174 +f 183/120/174 184/121/174 181/118/174 +s 4 +f 185/121/175 186/118/175 187/119/175 +f 187/119/175 188/120/175 185/121/175 +s 8 +f 181/121/176 184/118/176 186/119/176 +f 186/119/176 185/120/176 181/121/176 +s 16 +f 184/121/177 183/118/177 187/119/177 +f 187/119/177 186/120/177 184/121/177 +s 32 +f 183/121/178 182/118/178 188/119/178 +f 188/119/178 187/120/178 183/121/178 +s 64 +f 182/121/179 181/118/179 185/119/179 +f 185/119/179 188/120/179 182/121/179 +# 12 faces + +# +# object Box007 +# + +v 16.7020 0.0000 46.6052 +v 16.7020 0.0000 35.2692 +v 28.8644 0.0000 35.2692 +v 28.8644 0.0000 46.6052 +v 16.7020 8.9065 46.6052 +v 28.8644 8.9065 46.6052 +v 28.8644 8.9065 35.2692 +v 16.7020 8.9065 35.2692 +# 8 vertices + +vn 0.0000 -1.0000 -0.0000 +vn 0.0000 1.0000 -0.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 -0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 -0.0000 +# 6 vertex normals + +vt 1.0000 0.0000 0.0000 +vt 1.0000 1.0000 0.0000 +vt 0.0000 1.0000 0.0000 +vt 0.0000 0.0000 0.0000 +# 4 texture coords + +g Box007 +usemtl 01___Default +s 2 +f 189/122/180 190/123/180 191/124/180 +f 191/124/180 192/125/180 189/122/180 +s 4 +f 193/125/181 194/122/181 195/123/181 +f 195/123/181 196/124/181 193/125/181 +s 8 +f 189/125/182 192/122/182 194/123/182 +f 194/123/182 193/124/182 189/125/182 +s 16 +f 192/125/183 191/122/183 195/123/183 +f 195/123/183 194/124/183 192/125/183 +s 32 +f 191/125/184 190/122/184 196/123/184 +f 196/123/184 195/124/184 191/125/184 +s 64 +f 190/125/185 189/122/185 193/123/185 +f 193/123/185 196/124/185 190/125/185 +# 12 faces + +# +# object Box001 +# + +v -50.0000 0.0000 50.0000 +v -50.0000 0.0000 -50.0000 +v 50.0000 0.0000 -50.0000 +v 50.0000 0.0000 50.0000 +v -50.0000 1.0000 50.0000 +v 50.0000 1.0000 50.0000 +v 50.0000 1.0000 -50.0000 +v -50.0000 1.0000 -50.0000 +# 8 vertices + +vn 0.0000 -1.0000 -0.0000 +vn 0.0000 1.0000 -0.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 -0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 -0.0000 +# 6 vertex normals + +vt 1.0000 0.0000 0.0000 +vt 1.0000 1.0000 0.0000 +vt 0.0000 1.0000 0.0000 +vt 0.0000 0.0000 0.0000 +# 4 texture coords + +g Box001 +usemtl 01___Default +s 2 +f 197/126/186 198/127/186 199/128/186 +f 199/128/186 200/129/186 197/126/186 +s 4 +f 201/129/187 202/126/187 203/127/187 +f 203/127/187 204/128/187 201/129/187 +s 8 +f 197/129/188 200/126/188 202/127/188 +f 202/127/188 201/128/188 197/129/188 +s 16 +f 200/129/189 199/126/189 203/127/189 +f 203/127/189 202/128/189 200/129/189 +s 32 +f 199/129/190 198/126/190 204/127/190 +f 204/127/190 203/128/190 199/129/190 +s 64 +f 198/129/191 197/126/191 201/127/191 +f 201/127/191 204/128/191 198/129/191 +# 12 faces + diff --git a/tests/cpp-tests/proj.android/jni/Android.mk b/tests/cpp-tests/proj.android/jni/Android.mk index 5b2ef0b21f3a..fdf9a83c53f2 100644 --- a/tests/cpp-tests/proj.android/jni/Android.mk +++ b/tests/cpp-tests/proj.android/jni/Android.mk @@ -95,6 +95,7 @@ LOCAL_SRC_FILES := main.cpp \ ../../Classes/NewAudioEngineTest/NewAudioEngineTest.cpp \ ../../Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp \ ../../Classes/NewRendererTest/NewRendererTest.cpp \ +../../Classes/NavMeshTest/NavMeshTest.cpp \ ../../Classes/NodeTest/NodeTest.cpp \ ../../Classes/OpenURLTest/OpenURLTest.cpp \ ../../Classes/ParallaxTest/ParallaxTest.cpp \ diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj index c16e7d47c676..d1432c9dfd10 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj @@ -184,6 +184,7 @@ xcopy "$(OutDir)..\*.dll" "$(OutDir)" /D /Y + @@ -389,6 +390,7 @@ xcopy "$(OutDir)..\*.dll" "$(OutDir)" /D /Y + diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters index 55a4a2425445..69be11928724 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters @@ -364,6 +364,9 @@ {4fd79779-ff32-4400-aa05-af4fd7f0f4a0} + + {8c06b227-cf6c-4e4b-8312-94f834bdeeea} + {f7e74952-eece-467a-b27a-2e92db013997} @@ -951,6 +954,9 @@ Classes\MaterialSystemTest + + Classes\NavMeshTest + Classes\Scene3DTest @@ -1736,6 +1742,9 @@ Classes\MaterialSystemTest + + Classes\NavMeshTest + Classes\Scene3DTest diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems index f0e6ca19a69a..d13db0bb6693 100644 --- a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems @@ -110,6 +110,7 @@ + @@ -377,6 +378,7 @@ + diff --git a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters index 62e5be59d8f0..6d13ce25c5e2 100644 --- a/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters +++ b/tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters @@ -793,6 +793,9 @@ Classes\Scene3DTest + + Classes\NavMeshTest + @@ -1710,6 +1713,9 @@ {77f319c0-fd62-4505-b872-a2fd52375636} + + {63894b40-d29e-4744-8cac-bd3d12916fe3} + @@ -1758,5 +1764,8 @@ Classes\Scene3DTest + + Classes\NavMeshTest + \ No newline at end of file diff --git a/tools/tojs/cocos2dx.ini b/tools/tojs/cocos2dx.ini index 569e0c24ac67..91bc8f9be946 100644 --- a/tools/tojs/cocos2dx.ini +++ b/tools/tojs/cocos2dx.ini @@ -121,7 +121,7 @@ skip = Node::[^setPosition$ setGLServerState description getUserObject .*UserDat Component::[serialize onAdd onRemove update], EventListenerCustom::[init], EventListener::[init], - Scene::[getCameras getLights initWithPhysics createWithPhysics getPhysicsWorld getPhysics3DWorld setPhysics3DDebugCamera], + Scene::[getCameras getLights initWithPhysics createWithPhysics getPhysicsWorld getPhysics3DWorld setPhysics3DDebugCamera setNavMesh getNavMesh setNavMeshDebugCamera], Animate3D::[*], Sprite3D::[*], AttachNode::[*], diff --git a/tools/tolua/cocos2dx.ini b/tools/tolua/cocos2dx.ini index 3a5c0900eb11..105dde77e92e 100644 --- a/tools/tolua/cocos2dx.ini +++ b/tools/tolua/cocos2dx.ini @@ -123,7 +123,7 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS TurnOffTiles::[shuffle], LabelTTF::[*], LabelBMFont::[*], - Scene::[getCameras getLights .*(Physics).*], + Scene::[getCameras getLights .*(Physics).* .*(NavMesh).*], Animate3D::[*], Sprite3D::[*], AttachNode::[*],