Off-Mesh link progress (not fully working).

This commit is contained in:
Mikko Mononen 2010-01-10 17:21:01 +00:00
parent 5c4f1ed0bd
commit 4ad8dafa40
15 changed files with 5769 additions and 695 deletions

File diff suppressed because it is too large Load Diff

View File

@ -200,8 +200,8 @@
<array/>
<key>PerspectiveWidths</key>
<array>
<integer>1280</integer>
<integer>1280</integer>
<integer>1256</integer>
<integer>1256</integer>
</array>
<key>Perspectives</key>
<array>
@ -271,6 +271,7 @@
<string>6BDD9E030F91110C00904EEF</string>
<string>6B137C7D0F7FCBE800459200</string>
<string>6B555DF5100B25FC00247EA3</string>
<string>6BB7FE8E10F4A175006DA0A6</string>
<string>29B97315FDCFA39411CA2CEA</string>
<string>29B97317FDCFA39411CA2CEA</string>
<string>1C37FBAC04509CD000000102</string>
@ -280,14 +281,14 @@
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
<integer>46</integer>
<integer>34</integer>
<integer>14</integer>
<integer>12</integer>
<integer>1</integer>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
<string>{{0, 464}, {282, 660}}</string>
<string>{{0, 23}, {282, 643}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
@ -297,14 +298,14 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {299, 678}}</string>
<string>{{0, 0}, {299, 661}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>MainColumn</string>
<real>282</real>
</array>
<key>RubberWindowFrame</key>
<string>0 59 1280 719 0 0 1280 778 </string>
<string>11 76 1256 702 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@ -322,7 +323,7 @@
<key>PBXProjectModuleGUID</key>
<string>6B8632A30F78115100E2684A</string>
<key>PBXProjectModuleLabel</key>
<string>Sample_TileMesh.cpp</string>
<string>DetourNavMesh.cpp</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
@ -330,11 +331,11 @@
<key>PBXProjectModuleGUID</key>
<string>6B8632A40F78115100E2684A</string>
<key>PBXProjectModuleLabel</key>
<string>Sample_TileMesh.cpp</string>
<string>DetourNavMesh.cpp</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
<string>6BB7FE8D10F49F82006DA0A6</string>
<string>6BB7011810FA4288006DA0A6</string>
<key>history</key>
<array>
<string>6B57D358108C66B200DDD053</string>
@ -343,55 +344,52 @@
<string>6B8DE76D10B0243500DF20FB</string>
<string>6B8DE84910B0584400DF20FB</string>
<string>6B8DEAA110BC7BCD00DF20FB</string>
<string>6BF2589310BE6F220061DCC9</string>
<string>6BA1E63A10C1DB5B008007F6</string>
<string>6BA1E7F210C7B3FF008007F6</string>
<string>6BA1E89310C7C227008007F6</string>
<string>6BA1E8DB10C7CB62008007F6</string>
<string>6BA1E8E410C7D2FA008007F6</string>
<string>6BB4965F10C8F2AE00BC0805</string>
<string>6BB4966110C8F2AE00BC0805</string>
<string>6BB4967C10C8F8F500BC0805</string>
<string>6BB93CE710CFEB5D00F74F2B</string>
<string>6BB93CEB10CFEB5D00F74F2B</string>
<string>6BB93D0510CFFC1300F74F2B</string>
<string>6BB93D0710CFFC1300F74F2B</string>
<string>6BB93D0A10CFFC1300F74F2B</string>
<string>6BB93D1510CFFC6D00F74F2B</string>
<string>6BB93D1B10CFFD7600F74F2B</string>
<string>6B9869F710DFFA98007D8D84</string>
<string>6B9869F810DFFA98007D8D84</string>
<string>6BBB87D710EA97CC008FEA1F</string>
<string>6BBB883C10EA9B6F008FEA1F</string>
<string>6BBB884E10EA9ECC008FEA1F</string>
<string>6BBB889B10EAA094008FEA1F</string>
<string>6BBB899F10EABD34008FEA1F</string>
<string>6BB7FD7F10F36BD5006DA0A6</string>
<string>6BB7FDB210F37703006DA0A6</string>
<string>6BB7FDB310F37703006DA0A6</string>
<string>6BB7FDB410F37703006DA0A6</string>
<string>6BB7FDC010F37703006DA0A6</string>
<string>6BB7FDC110F37703006DA0A6</string>
<string>6BB7FDEE10F377DD006DA0A6</string>
<string>6BB7FE0F10F37CF7006DA0A6</string>
<string>6BB7FE1010F37CF7006DA0A6</string>
<string>6BB7FE3A10F3817A006DA0A6</string>
<string>6BB7FE3B10F3817A006DA0A6</string>
<string>6BB7FE3C10F3817A006DA0A6</string>
<string>6BB7FE3E10F3817A006DA0A6</string>
<string>6BB7FE6010F381DC006DA0A6</string>
<string>6BB7FE7510F38224006DA0A6</string>
<string>6BB7FE7610F38224006DA0A6</string>
<string>6BB7FE8210F3830D006DA0A6</string>
<string>6BB7FE8310F3830D006DA0A6</string>
<string>6BB7FE8A10F49F82006DA0A6</string>
<string>6BB7FE8B10F49F82006DA0A6</string>
<string>6BB7FEA910F4B5E1006DA0A6</string>
<string>6BB7FEAD10F4B5E1006DA0A6</string>
<string>6BB7FEDE10F4B779006DA0A6</string>
<string>6BB7FF0210F4D699006DA0A6</string>
<string>6BB7FF0310F4D699006DA0A6</string>
<string>6BB7FF6C10F4E8E2006DA0A6</string>
<string>6BB7FF6D10F4E8E2006DA0A6</string>
<string>6BB7FF6E10F4E8E2006DA0A6</string>
<string>6BB7FF7310F4E8E2006DA0A6</string>
<string>6BB7FFBE10F4E9A8006DA0A6</string>
<string>6BB7FFD610F4EC73006DA0A6</string>
<string>6BB7000610F4F03D006DA0A6</string>
<string>6BB7001110F4F17C006DA0A6</string>
<string>6BB7001210F4F17C006DA0A6</string>
<string>6BB7001410F4F17C006DA0A6</string>
<string>6BB7002C10F4F257006DA0A6</string>
<string>6BB7003710F4F39B006DA0A6</string>
<string>6BB7003810F4F39B006DA0A6</string>
<string>6BB7003A10F4F39B006DA0A6</string>
<string>6BB7004C10F4F532006DA0A6</string>
<string>6BB7004F10F4F532006DA0A6</string>
<string>6BB7007210FA2B13006DA0A6</string>
<string>6BB700BF10FA3AB1006DA0A6</string>
<string>6BB700C010FA3AB1006DA0A6</string>
<string>6BB700F510FA3E31006DA0A6</string>
<string>6BB7010F10FA4171006DA0A6</string>
<string>6BB7011710FA4288006DA0A6</string>
</array>
<key>prevStack</key>
<array>
<string>6B98693710DF8929007D8D84</string>
<string>6B98693810DF8929007D8D84</string>
<string>6B98693910DF8929007D8D84</string>
<string>6B9869FC10DFFA98007D8D84</string>
<string>6BBB87E510EA97CC008FEA1F</string>
<string>6BBB87E910EA97CC008FEA1F</string>
@ -399,30 +397,17 @@
<string>6BBB885510EA9ECC008FEA1F</string>
<string>6BBB886210EA9ECC008FEA1F</string>
<string>6BBB889D10EAA094008FEA1F</string>
<string>6BB7FD6110F3564B006DA0A6</string>
<string>6BB7FD6310F3564B006DA0A6</string>
<string>6BB7FD6410F3564B006DA0A6</string>
<string>6BB7FD6510F3564B006DA0A6</string>
<string>6BB7FD6610F3564B006DA0A6</string>
<string>6BB7FD6910F3564B006DA0A6</string>
<string>6BB7FD8310F36BD5006DA0A6</string>
<string>6BB7FD8410F36BD5006DA0A6</string>
<string>6BB7FD8510F36BD5006DA0A6</string>
<string>6BB7FD8610F36BD5006DA0A6</string>
<string>6BB7FD8710F36BD5006DA0A6</string>
<string>6BB7FD8810F36BD5006DA0A6</string>
<string>6BB7FD8910F36BD5006DA0A6</string>
<string>6BB7FD8B10F36BD5006DA0A6</string>
<string>6BB7FD9F10F36D7A006DA0A6</string>
<string>6BB7FDC510F37703006DA0A6</string>
<string>6BB7FDC610F37703006DA0A6</string>
<string>6BB7FDC710F37703006DA0A6</string>
<string>6BB7FDC810F37703006DA0A6</string>
<string>6BB7FDCB10F37703006DA0A6</string>
<string>6BB7FDCC10F37703006DA0A6</string>
<string>6BB7FDCD10F37703006DA0A6</string>
<string>6BB7FDCE10F37703006DA0A6</string>
<string>6BB7FDCF10F37703006DA0A6</string>
<string>6BB7FDD010F37703006DA0A6</string>
<string>6BB7FDD810F37703006DA0A6</string>
<string>6BB7FDD910F37703006DA0A6</string>
@ -475,17 +460,178 @@
<string>6BB7FE5410F3817A006DA0A6</string>
<string>6BB7FE5510F3817A006DA0A6</string>
<string>6BB7FE5610F3817A006DA0A6</string>
<string>6BB7FE5710F3817A006DA0A6</string>
<string>6BB7FE5810F3817A006DA0A6</string>
<string>6BB7FE5910F3817A006DA0A6</string>
<string>6BB7FE6310F381DC006DA0A6</string>
<string>6BB7FE6410F381DC006DA0A6</string>
<string>6BB7FE7810F38224006DA0A6</string>
<string>6BB7FE7910F38224006DA0A6</string>
<string>6BB7FE7A10F38224006DA0A6</string>
<string>6BB7FE8510F3830D006DA0A6</string>
<string>6BB7FE8610F3830D006DA0A6</string>
<string>6BB7FE8C10F49F82006DA0A6</string>
<string>6BB7FE9A10F4A1DB006DA0A6</string>
<string>6BB7FE9B10F4A1DB006DA0A6</string>
<string>6BB7FE9C10F4A1DB006DA0A6</string>
<string>6BB7FE9D10F4A1DB006DA0A6</string>
<string>6BB7FE9E10F4A1DB006DA0A6</string>
<string>6BB7FE9F10F4A1DB006DA0A6</string>
<string>6BB7FEA010F4A1DB006DA0A6</string>
<string>6BB7FEA110F4A1DB006DA0A6</string>
<string>6BB7FEB610F4B5E1006DA0A6</string>
<string>6BB7FEB710F4B5E1006DA0A6</string>
<string>6BB7FEB810F4B5E1006DA0A6</string>
<string>6BB7FEB910F4B5E1006DA0A6</string>
<string>6BB7FEBA10F4B5E1006DA0A6</string>
<string>6BB7FEBB10F4B5E1006DA0A6</string>
<string>6BB7FEBC10F4B5E1006DA0A6</string>
<string>6BB7FEBE10F4B5E1006DA0A6</string>
<string>6BB7FEC010F4B5E1006DA0A6</string>
<string>6BB7FEC110F4B5E1006DA0A6</string>
<string>6BB7FEC210F4B5E1006DA0A6</string>
<string>6BB7FEC310F4B5E1006DA0A6</string>
<string>6BB7FEC410F4B5E1006DA0A6</string>
<string>6BB7FEC510F4B5E1006DA0A6</string>
<string>6BB7FEC610F4B5E1006DA0A6</string>
<string>6BB7FEC810F4B5E1006DA0A6</string>
<string>6BB7FEC910F4B5E1006DA0A6</string>
<string>6BB7FECA10F4B5E1006DA0A6</string>
<string>6BB7FECB10F4B5E1006DA0A6</string>
<string>6BB7FECC10F4B5E1006DA0A6</string>
<string>6BB7FECF10F4B5E1006DA0A6</string>
<string>6BB7FED010F4B5E1006DA0A6</string>
<string>6BB7FED110F4B5E1006DA0A6</string>
<string>6BB7FED210F4B5E1006DA0A6</string>
<string>6BB7FED510F4B5E1006DA0A6</string>
<string>6BB7FEE110F4B779006DA0A6</string>
<string>6BB7FEE210F4B779006DA0A6</string>
<string>6BB7FEE310F4B779006DA0A6</string>
<string>6BB7FEE410F4B779006DA0A6</string>
<string>6BB7FEE510F4B779006DA0A6</string>
<string>6BB7FEEE10F4B7E6006DA0A6</string>
<string>6BB7FEF010F4B7E6006DA0A6</string>
<string>6BB7FF0E10F4D699006DA0A6</string>
<string>6BB7FF1110F4D699006DA0A6</string>
<string>6BB7FF1210F4D699006DA0A6</string>
<string>6BB7FF1310F4D699006DA0A6</string>
<string>6BB7FF1410F4D699006DA0A6</string>
<string>6BB7FF1510F4D699006DA0A6</string>
<string>6BB7FF1F10F4D699006DA0A6</string>
<string>6BB7FF2010F4D699006DA0A6</string>
<string>6BB7FF2110F4D699006DA0A6</string>
<string>6BB7FF2210F4D699006DA0A6</string>
<string>6BB7FF2310F4D699006DA0A6</string>
<string>6BB7FF2410F4D699006DA0A6</string>
<string>6BB7FF2510F4D699006DA0A6</string>
<string>6BB7FF2610F4D699006DA0A6</string>
<string>6BB7FF2710F4D699006DA0A6</string>
<string>6BB7FF2810F4D699006DA0A6</string>
<string>6BB7FF2910F4D699006DA0A6</string>
<string>6BB7FF2A10F4D699006DA0A6</string>
<string>6BB7FF2B10F4D699006DA0A6</string>
<string>6BB7FF3010F4D699006DA0A6</string>
<string>6BB7FF3410F4D699006DA0A6</string>
<string>6BB7FF3610F4D699006DA0A6</string>
<string>6BB7FF7910F4E8E2006DA0A6</string>
<string>6BB7FF7A10F4E8E2006DA0A6</string>
<string>6BB7FF7B10F4E8E2006DA0A6</string>
<string>6BB7FF7C10F4E8E2006DA0A6</string>
<string>6BB7FF7D10F4E8E2006DA0A6</string>
<string>6BB7FF7E10F4E8E2006DA0A6</string>
<string>6BB7FF7F10F4E8E2006DA0A6</string>
<string>6BB7FF8010F4E8E2006DA0A6</string>
<string>6BB7FF8110F4E8E2006DA0A6</string>
<string>6BB7FF8210F4E8E2006DA0A6</string>
<string>6BB7FF8310F4E8E2006DA0A6</string>
<string>6BB7FF8410F4E8E2006DA0A6</string>
<string>6BB7FF8510F4E8E2006DA0A6</string>
<string>6BB7FF8610F4E8E2006DA0A6</string>
<string>6BB7FF8710F4E8E2006DA0A6</string>
<string>6BB7FF8810F4E8E2006DA0A6</string>
<string>6BB7FF8910F4E8E2006DA0A6</string>
<string>6BB7FF8A10F4E8E2006DA0A6</string>
<string>6BB7FF8B10F4E8E2006DA0A6</string>
<string>6BB7FF8C10F4E8E2006DA0A6</string>
<string>6BB7FF8D10F4E8E2006DA0A6</string>
<string>6BB7FF8E10F4E8E2006DA0A6</string>
<string>6BB7FF8F10F4E8E2006DA0A6</string>
<string>6BB7FF9010F4E8E2006DA0A6</string>
<string>6BB7FF9110F4E8E2006DA0A6</string>
<string>6BB7FF9210F4E8E2006DA0A6</string>
<string>6BB7FF9310F4E8E2006DA0A6</string>
<string>6BB7FF9410F4E8E2006DA0A6</string>
<string>6BB7FF9510F4E8E2006DA0A6</string>
<string>6BB7FF9610F4E8E2006DA0A6</string>
<string>6BB7FF9710F4E8E2006DA0A6</string>
<string>6BB7FF9810F4E8E2006DA0A6</string>
<string>6BB7FF9910F4E8E2006DA0A6</string>
<string>6BB7FF9A10F4E8E2006DA0A6</string>
<string>6BB7FF9B10F4E8E2006DA0A6</string>
<string>6BB7FF9C10F4E8E2006DA0A6</string>
<string>6BB7FF9D10F4E8E2006DA0A6</string>
<string>6BB7FF9E10F4E8E2006DA0A6</string>
<string>6BB7FF9F10F4E8E2006DA0A6</string>
<string>6BB7FFA010F4E8E2006DA0A6</string>
<string>6BB7FFA110F4E8E2006DA0A6</string>
<string>6BB7FFA210F4E8E2006DA0A6</string>
<string>6BB7FFA310F4E8E2006DA0A6</string>
<string>6BB7FFA410F4E8E2006DA0A6</string>
<string>6BB7FFA510F4E8E2006DA0A6</string>
<string>6BB7FFA610F4E8E2006DA0A6</string>
<string>6BB7FFA710F4E8E2006DA0A6</string>
<string>6BB7FFA810F4E8E2006DA0A6</string>
<string>6BB7FFA910F4E8E2006DA0A6</string>
<string>6BB7FFAA10F4E8E2006DA0A6</string>
<string>6BB7FFAB10F4E8E2006DA0A6</string>
<string>6BB7FFAC10F4E8E2006DA0A6</string>
<string>6BB7FFAD10F4E8E2006DA0A6</string>
<string>6BB7FFB310F4E951006DA0A6</string>
<string>6BB7FFC010F4E9A8006DA0A6</string>
<string>6BB7FFC110F4E9A8006DA0A6</string>
<string>6BB7FFCC10F4EC02006DA0A6</string>
<string>6BB7FFCD10F4EC02006DA0A6</string>
<string>6BB7FFCE10F4EC02006DA0A6</string>
<string>6BB7FFCF10F4EC02006DA0A6</string>
<string>6BB7FFD010F4EC02006DA0A6</string>
<string>6BB7FFD110F4EC02006DA0A6</string>
<string>6BB7FFD910F4EC73006DA0A6</string>
<string>6BB7FFDA10F4EC73006DA0A6</string>
<string>6BB7FFDB10F4EC73006DA0A6</string>
<string>6BB7FFE110F4EC8C006DA0A6</string>
<string>6BB7FFEB10F4EF20006DA0A6</string>
<string>6BB7FFFE10F4EFB6006DA0A6</string>
<string>6BB7000010F4EFB6006DA0A6</string>
<string>6BB7000810F4F03D006DA0A6</string>
<string>6BB7000910F4F03D006DA0A6</string>
<string>6BB7000F10F4F045006DA0A6</string>
<string>6BB7001710F4F17C006DA0A6</string>
<string>6BB7001910F4F17C006DA0A6</string>
<string>6BB7001B10F4F17C006DA0A6</string>
<string>6BB7001D10F4F17C006DA0A6</string>
<string>6BB7001F10F4F17C006DA0A6</string>
<string>6BB7002110F4F17C006DA0A6</string>
<string>6BB7002310F4F17C006DA0A6</string>
<string>6BB7002410F4F17C006DA0A6</string>
<string>6BB7002510F4F17C006DA0A6</string>
<string>6BB7002710F4F17C006DA0A6</string>
<string>6BB7002F10F4F257006DA0A6</string>
<string>6BB7003010F4F257006DA0A6</string>
<string>6BB7003E10F4F39B006DA0A6</string>
<string>6BB7003F10F4F39B006DA0A6</string>
<string>6BB7004010F4F39B006DA0A6</string>
<string>6BB7004110F4F39B006DA0A6</string>
<string>6BB7004210F4F39B006DA0A6</string>
<string>6BB7005110F4F532006DA0A6</string>
<string>6BB7005710F4F532006DA0A6</string>
<string>6BB7005E10FA2777006DA0A6</string>
<string>6BB7007510FA2B13006DA0A6</string>
<string>6BB7008C10FA3475006DA0A6</string>
<string>6BB7008E10FA3475006DA0A6</string>
<string>6BB7009D10FA3649006DA0A6</string>
<string>6BB700AB10FA37BD006DA0A6</string>
<string>6BB700C310FA3AB1006DA0A6</string>
<string>6BB700C510FA3AB1006DA0A6</string>
<string>6BB700D110FA3C46006DA0A6</string>
<string>6BB700DF10FA3D11006DA0A6</string>
<string>6BB7007C10FA2E34006DA0A6</string>
<string>6BB7010B10FA40ED006DA0A6</string>
<string>6BB7011110FA4171006DA0A6</string>
</array>
</dict>
<key>SplitCount</key>
@ -499,18 +645,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {976, 527}}</string>
<string>{{0, 0}, {952, 566}}</string>
<key>RubberWindowFrame</key>
<string>0 59 1280 719 0 0 1280 778 </string>
<string>11 76 1256 702 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>527pt</string>
<string>566pt</string>
</dict>
<dict>
<key>Proportion</key>
<string>146pt</string>
<string>90pt</string>
<key>Tabs</key>
<array>
<dict>
@ -540,7 +686,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {976, 220}}</string>
<string>{{10, 27}, {952, 63}}</string>
<key>RubberWindowFrame</key>
<string>11 76 1256 702 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
@ -578,9 +726,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {976, 119}}</string>
<key>RubberWindowFrame</key>
<string>0 59 1280 719 0 0 1280 778 </string>
<string>{{10, 27}, {952, 63}}</string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@ -589,7 +735,7 @@
</dict>
</array>
<key>Proportion</key>
<string>976pt</string>
<string>952pt</string>
</dict>
</array>
<key>Name</key>
@ -663,12 +809,12 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {1280, 359}}</string>
<string>{{0, 0}, {1256, 209}}</string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>359pt</string>
<string>209pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
@ -687,8 +833,8 @@
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {620, 115}}</string>
<string>{{620, 0}, {660, 115}}</string>
<string>{{0, 0}, {627, 93}}</string>
<string>{{627, 0}, {629, 93}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
@ -703,8 +849,8 @@
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {1280, 115}}</string>
<string>{{0, 115}, {1280, 199}}</string>
<string>{{0, 0}, {1256, 93}}</string>
<string>{{0, 93}, {1256, 354}}</string>
</array>
</dict>
</dict>
@ -724,7 +870,7 @@
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 364}, {1280, 314}}</string>
<string>{{0, 214}, {1256, 447}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
@ -734,16 +880,16 @@
<string>Value</string>
<real>85</real>
<string>Summary</string>
<real>430</real>
<real>399</real>
</array>
<key>Frame</key>
<string>{{620, 0}, {660, 115}}</string>
<string>{{627, 0}, {629, 93}}</string>
</dict>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>314pt</string>
<string>447pt</string>
</dict>
</array>
<key>Name</key>
@ -805,7 +951,7 @@
<string>/Users/memon/Code/recastnavigation/RecastDemo/Build/Xcode/Recast.xcodeproj</string>
</array>
<key>WindowString</key>
<string>0 59 1280 719 0 0 1280 778 </string>
<string>11 76 1256 702 0 0 1280 778 </string>
<key>WindowToolsV3</key>
<array>
<dict>

View File

@ -35,8 +35,8 @@
6BA1E88C10C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */; };
6BB788170FC0472B003C24DB /* ChunkyTriMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BB788160FC0472B003C24DB /* ChunkyTriMesh.cpp */; };
6BB7FC0B10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; };
6BB7FD4A10F3559D006DA0A6 /* ExtraLinkTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BB7FD4910F3559D006DA0A6 /* ExtraLinkTool.cpp */; };
6BB7FDA510F36F0E006DA0A6 /* InputGeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BB7FDA410F36F0E006DA0A6 /* InputGeom.cpp */; };
6BB7FE9110F4A192006DA0A6 /* OffMeshLinkTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BB7FE9010F4A192006DA0A6 /* OffMeshLinkTool.cpp */; };
6BB93C7D10CFE1D500F74F2B /* DebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BB93C7A10CFE1D500F74F2B /* DebugDraw.cpp */; };
6BB93C7E10CFE1D500F74F2B /* DetourDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BB93C7B10CFE1D500F74F2B /* DetourDebugDraw.cpp */; };
6BB93C7F10CFE1D500F74F2B /* RecastDebugDraw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BB93C7C10CFE1D500F74F2B /* RecastDebugDraw.cpp */; };
@ -98,10 +98,10 @@
6BB788180FC04753003C24DB /* ChunkyTriMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChunkyTriMesh.h; path = ../../Include/ChunkyTriMesh.h; sourceTree = SOURCE_ROOT; };
6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NavMeshTesterTool.h; path = ../../Include/NavMeshTesterTool.h; sourceTree = SOURCE_ROOT; };
6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NavMeshTesterTool.cpp; path = ../../Source/NavMeshTesterTool.cpp; sourceTree = SOURCE_ROOT; };
6BB7FD4810F3558D006DA0A6 /* ExtraLinkTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExtraLinkTool.h; path = ../../Include/ExtraLinkTool.h; sourceTree = SOURCE_ROOT; };
6BB7FD4910F3559D006DA0A6 /* ExtraLinkTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExtraLinkTool.cpp; path = ../../Source/ExtraLinkTool.cpp; sourceTree = SOURCE_ROOT; };
6BB7FDA310F36EFC006DA0A6 /* InputGeom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputGeom.h; path = ../../Include/InputGeom.h; sourceTree = SOURCE_ROOT; };
6BB7FDA410F36F0E006DA0A6 /* InputGeom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InputGeom.cpp; path = ../../Source/InputGeom.cpp; sourceTree = SOURCE_ROOT; };
6BB7FE8F10F4A192006DA0A6 /* OffMeshLinkTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OffMeshLinkTool.h; path = ../../Include/OffMeshLinkTool.h; sourceTree = SOURCE_ROOT; };
6BB7FE9010F4A192006DA0A6 /* OffMeshLinkTool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OffMeshLinkTool.cpp; path = ../../Source/OffMeshLinkTool.cpp; sourceTree = SOURCE_ROOT; };
6BB93C7710CFE1D500F74F2B /* DebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DebugDraw.h; path = ../../../DebugUtils/Include/DebugDraw.h; sourceTree = SOURCE_ROOT; };
6BB93C7810CFE1D500F74F2B /* DetourDebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DetourDebugDraw.h; path = ../../../DebugUtils/Include/DetourDebugDraw.h; sourceTree = SOURCE_ROOT; };
6BB93C7910CFE1D500F74F2B /* RecastDebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RecastDebugDraw.h; path = ../../../DebugUtils/Include/RecastDebugDraw.h; sourceTree = SOURCE_ROOT; };
@ -136,6 +136,7 @@
6BDD9E030F91110C00904EEF /* Detour */,
6B137C7D0F7FCBE800459200 /* Recast */,
6B555DF5100B25FC00247EA3 /* Samples */,
6BB7FE8E10F4A175006DA0A6 /* Tools */,
6B25B6180FFA62BE004F1BC4 /* main.cpp */,
6B137C7A0F7FCBE400459200 /* imgui.h */,
6B137C6C0F7FCBBB00459200 /* imgui.cpp */,
@ -243,10 +244,6 @@
6B555DF5100B25FC00247EA3 /* Samples */ = {
isa = PBXGroup;
children = (
6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */,
6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */,
6BB7FD4810F3558D006DA0A6 /* ExtraLinkTool.h */,
6BB7FD4910F3559D006DA0A6 /* ExtraLinkTool.cpp */,
6B25B6100FFA62AD004F1BC4 /* Sample.h */,
6B25B6140FFA62BE004F1BC4 /* Sample.cpp */,
6BA1E88E10C7BFD3008007F6 /* Sample_SoloMeshSimple.h */,
@ -259,6 +256,17 @@
name = Samples;
sourceTree = "<group>";
};
6BB7FE8E10F4A175006DA0A6 /* Tools */ = {
isa = PBXGroup;
children = (
6BB7FE8F10F4A192006DA0A6 /* OffMeshLinkTool.h */,
6BB7FE9010F4A192006DA0A6 /* OffMeshLinkTool.cpp */,
6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */,
6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */,
);
name = Tools;
sourceTree = "<group>";
};
6BB93C7610CFE1BD00F74F2B /* DebugUtils */ = {
isa = PBXGroup;
children = (
@ -373,8 +381,8 @@
6BB93C7F10CFE1D500F74F2B /* RecastDebugDraw.cpp in Sources */,
6BB93CF610CFEC4500F74F2B /* RecastDump.cpp in Sources */,
6BB7FC0B10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp in Sources */,
6BB7FD4A10F3559D006DA0A6 /* ExtraLinkTool.cpp in Sources */,
6BB7FDA510F36F0E006DA0A6 /* InputGeom.cpp in Sources */,
6BB7FE9110F4A192006DA0A6 /* OffMeshLinkTool.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -22,12 +22,6 @@
#include "ChunkyTriMesh.h"
#include "MeshLoaderObj.h"
struct ExtraLink
{
float spos[3]; // Start position of the link.
float epos[3]; // End position of the link.
};
class InputGeom
{
rcChunkyTriMesh* m_chunkyMesh;
@ -36,7 +30,7 @@ class InputGeom
static const int MAX_LINKS = 256;
ExtraLink m_links[MAX_LINKS];
float m_linkVerts[MAX_LINKS*3*2];
int m_nlinks;
public:
@ -53,10 +47,11 @@ public:
bool raycastMesh(float* src, float* dst, float& tmin);
// Extra links
int getExtraLinkCount() const { return m_nlinks; }
ExtraLink* getExtraLink(int i) { return &m_links[i]; }
void addExtraLink(const float* spos, const float* epos);
void deleteExtraLink(int i);
int getOffMeshLinkCount() const { return m_nlinks; }
const float* getOffMeshLinkVertices() const { return m_linkVerts; }
void addOffMeshLink(const float* spos, const float* epos);
void deleteOffMeshLink(int i);
void drawLinks(struct duDebugDraw* dd, const float s);
};
#endif // INPUTGEOM_H

View File

@ -75,7 +75,7 @@ public:
virtual void handleRenderOverlay(double* proj, double* model, int* view);
void recalc();
void drawAgent(const float* pos, float r, float h, float c, const float* col);
void drawAgent(const float* pos, float r, float h, float c, const unsigned int col);
};
#endif // NAVMESHTESTERTOOL_H

View File

@ -16,24 +16,24 @@
// 3. This notice may not be removed or altered from any source distribution.
//
#ifndef EXTRALINKTOOL_H
#define EXTRALINKTOOL_H
#ifndef OFFMESHLINKTOOL_H
#define OFFMESHLINKTOOL_H
#include "Sample.h"
// Tool to create extra links for InputGeom
class ExtraLinkTool : public SampleTool
class OffMeshLinkTool : public SampleTool
{
Sample* m_sample;
float m_hitPos[3];
bool m_hitPosSet;
public:
ExtraLinkTool();
~ExtraLinkTool();
OffMeshLinkTool();
~OffMeshLinkTool();
virtual int type() { return TOOL_EXTRA_LINK; }
virtual int type() { return TOOL_OFFMESH_LINK; }
virtual void init(Sample* sample);
virtual void reset();
virtual void handleMenu();
@ -42,4 +42,4 @@ public:
virtual void handleRenderOverlay(double* proj, double* model, int* view);
};
#endif // EXTRALINKTOOL_H
#endif // OFFMESHLINKTOOL_H

View File

@ -35,7 +35,7 @@ enum SampleToolType
TOOL_NONE = 0,
TOOL_TILE_EDIT,
TOOL_NAVMESH_TESTER,
TOOL_EXTRA_LINK,
TOOL_OFFMESH_LINK,
};
struct SampleTool

View File

@ -44,7 +44,7 @@ protected:
int m_maxPolysPerTile;
float m_tileSize;
float m_tileCol[4];
unsigned int m_tileCol;
float m_tileBmin[3];
float m_tileBmax[3];
float m_tileBuildTime;

View File

@ -23,7 +23,8 @@
#include "InputGeom.h"
#include "ChunkyTriMesh.h"
#include "MeshLoaderObj.h"
#include "DebugDraw.h"
#include "RecastDebugDraw.h"
static bool intersectSegmentTriangle(const float* sp, const float* sq,
@ -158,16 +159,31 @@ bool InputGeom::raycastMesh(float* src, float* dst, float& tmin)
return hit;
}
void InputGeom::addExtraLink(const float* spos, const float* epos)
void InputGeom::addOffMeshLink(const float* spos, const float* epos)
{
if (m_nlinks >= MAX_LINKS) return;
ExtraLink* link = &m_links[m_nlinks++];
vcopy(link->spos, spos);
vcopy(link->epos, epos);
float* v = &m_linkVerts[m_nlinks*3*2];
m_nlinks++;
vcopy(&v[0], spos);
vcopy(&v[3], epos);
}
void InputGeom::deleteExtraLink(int i)
void InputGeom::deleteOffMeshLink(int i)
{
m_nlinks--;
m_links[i] = m_links[m_nlinks];
float* src = &m_linkVerts[(m_nlinks-1)*3*2];
float* dst = &m_linkVerts[i*3*2];
vcopy(&dst[0], &src[0]);
vcopy(&dst[3], &src[3]);
}
void InputGeom::drawLinks(duDebugDraw* dd, const float s)
{
for (int i = 0; i < m_nlinks; ++i)
{
float* v = &m_linkVerts[i*3*2];
duDebugDrawArc(dd, v[0],v[1],v[2], v[3],v[4],v[5], 0.25f, duRGBA(255,255,255,192), 2.0f);
duDebugDrawCross(dd, v[0],v[1]+0.1f,v[2], s, duRGBA(0,0,0,255), 2.0f);
duDebugDrawCross(dd, v[3],v[4]+0.1f,v[5], s, duRGBA(0,0,0,255), 2.0f);
}
}

View File

@ -148,11 +148,15 @@ void NavMeshTesterTool::recalc()
if (m_sposSet && m_eposSet && m_startRef && m_endRef)
{
m_npolys = m_navMesh->findPath(m_startRef, m_endRef, m_spos, m_epos, m_polys, MAX_POLYS);
m_nstraightPath = 0;
m_nsmoothPath = 0;
if (m_npolys)
{
m_nstraightPath = m_navMesh->findStraightPath(m_spos, m_epos, m_polys, m_npolys, m_straightPath, MAX_POLYS);
// Iterate over the path to find smooth path on the detail mesh surface.
/* // Iterate over the path to find smooth path on the detail mesh surface.
const dtPolyRef* polys = m_polys;
int npolys = m_npolys;
@ -224,8 +228,7 @@ void NavMeshTesterTool::recalc()
vcopy(&m_smoothPath[m_nsmoothPath*3], iterPos);
m_nsmoothPath++;
}
}
}*/
}
}
else
@ -302,9 +305,9 @@ void NavMeshTesterTool::handleRender()
DebugDrawGL dd;
static const float startCol[4] = { 0.5f, 0.1f, 0.0f, 0.75f };
static const float endCol[4] = { 0.2f, 0.4f, 0.0f, 0.75f };
static const float pathCol[4] = {0,0,0,0.25f};
static const unsigned int startCol = duRGBA(128,25,0,192);
static const unsigned int endCol = duRGBA(51,102,0,129);
static const unsigned int pathCol = duRGBA(0,0,0,64);
glDepthMask(GL_FALSE);
@ -333,30 +336,26 @@ void NavMeshTesterTool::handleRender()
}
if (m_nstraightPath)
{
glColor4ub(64,16,0,64);
glLineWidth(2.0f);
glBegin(GL_LINE_STRIP);
const unsigned int pathCol = duRGBA(64,16,0,220);
dd.begin(DU_DRAW_LINES, 2.0f);
for (int i = 0; i < m_nstraightPath-1; ++i)
{
dd.vertex(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2], pathCol);
dd.vertex(m_straightPath[(i+1)*3], m_straightPath[(i+1)*3+1]+0.4f, m_straightPath[(i+1)*3+2], pathCol);
}
dd.end();
dd.begin(DU_DRAW_POINTS, 4.0f);
for (int i = 0; i < m_nstraightPath; ++i)
glVertex3f(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2]);
glEnd();
glLineWidth(1.0f);
glColor4ub(64,16,0,128);
glPointSize(3.0f);
glBegin(GL_POINTS);
for (int i = 0; i < m_nstraightPath; ++i)
glVertex3f(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2]);
glEnd();
glPointSize(1.0f);
dd.vertex(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2], pathCol);
dd.end();
}
if (m_nsmoothPath)
{
glColor4ub(0,0,0,220);
glLineWidth(3.0f);
glBegin(GL_LINES);
const unsigned int pathCol = duRGBA(0,0,0,220);
dd.begin(DU_DRAW_LINES, 3.0f);
for (int i = 0; i < m_nsmoothPath; ++i)
glVertex3f(m_smoothPath[i*3], m_smoothPath[i*3+1]+0.1f, m_smoothPath[i*3+2]);
glEnd();
glLineWidth(1.0f);
dd.vertex(m_smoothPath[i*3], m_smoothPath[i*3+1]+0.1f, m_smoothPath[i*3+2], pathCol);
dd.end();
}
}
else if (m_toolMode == TOOLMODE_RAYCAST)
@ -368,44 +367,39 @@ void NavMeshTesterTool::handleRender()
for (int i = 1; i < m_npolys; ++i)
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_polys[i], pathCol);
glColor4ub(64,16,0,220);
glLineWidth(3.0f);
glBegin(GL_LINE_STRIP);
const unsigned int pathCol = duRGBA(64,16,0,220);
dd.begin(DU_DRAW_LINES, 2.0f);
for (int i = 0; i < m_nstraightPath-1; ++i)
{
dd.vertex(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2], pathCol);
dd.vertex(m_straightPath[(i+1)*3], m_straightPath[(i+1)*3+1]+0.4f, m_straightPath[(i+1)*3+2], pathCol);
}
dd.end();
dd.begin(DU_DRAW_POINTS, 4.0f);
for (int i = 0; i < m_nstraightPath; ++i)
glVertex3f(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2]);
glEnd();
glLineWidth(1.0f);
glPointSize(4.0f);
glBegin(GL_POINTS);
for (int i = 0; i < m_nstraightPath; ++i)
glVertex3f(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2]);
glEnd();
glPointSize(1.0f);
dd.vertex(m_straightPath[i*3], m_straightPath[i*3+1]+0.4f, m_straightPath[i*3+2], pathCol);
dd.end();
glColor4ub(255,255,255,128);
glBegin(GL_LINES);
glVertex3f(m_hitPos[0], m_hitPos[1] + 0.4f, m_hitPos[2]);
glVertex3f(m_hitPos[0] + m_hitNormal[0]*m_agentRadius, m_hitPos[1] + 0.4f + m_hitNormal[1]*m_agentRadius, m_hitPos[2] + m_hitNormal[2]*m_agentRadius);
glEnd();
const unsigned int hitCol = duRGBA(0,0,0,128);
dd.begin(DU_DRAW_LINES, 2.0f);
dd.vertex(m_hitPos[0], m_hitPos[1] + 0.4f, m_hitPos[2], hitCol);
dd.vertex(m_hitPos[0] + m_hitNormal[0]*m_agentRadius,
m_hitPos[1] + 0.4f + m_hitNormal[1]*m_agentRadius,
m_hitPos[2] + m_hitNormal[2]*m_agentRadius, hitCol);
dd.end();
}
}
else if (m_toolMode == TOOLMODE_DISTANCE_TO_WALL)
{
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_startRef, startCol);
const float col[4] = {1,1,1,0.5f};
duDebugDrawCylinderWire(&dd, m_spos[0]-m_distanceToWall, m_spos[1]+0.02f, m_spos[2]-m_distanceToWall,
m_spos[0]+m_distanceToWall, m_spos[1]+m_agentHeight, m_spos[2]+m_distanceToWall, col);
glLineWidth(3.0f);
glColor4fv(col);
glBegin(GL_LINES);
glVertex3f(m_hitPos[0], m_hitPos[1] + 0.02f, m_hitPos[2]);
glVertex3f(m_hitPos[0], m_hitPos[1] + m_agentHeight, m_hitPos[2]);
glEnd();
glLineWidth(1.0f);
duDebugDrawCircle(&dd, m_spos[0], m_spos[1]+m_agentHeight/2, m_spos[2], m_distanceToWall, duRGBA(64,16,0,220), 2.0f);
dd.begin(DU_DRAW_LINES, 3.0f);
dd.vertex(m_hitPos[0], m_hitPos[1] + 0.02f, m_hitPos[2], duRGBA(0,0,0,192));
dd.vertex(m_hitPos[0], m_hitPos[1] + m_agentHeight, m_hitPos[2], duRGBA(0,0,0,192));
dd.end();
}
else if (m_toolMode == TOOLMODE_FIND_POLYS_AROUND)
{
const float cola[4] = {0,0,0,0.5f};
for (int i = 0; i < m_npolys; ++i)
{
duDebugDrawNavMeshPoly(&dd, m_navMesh, m_polys[i], pathCol);
@ -414,16 +408,14 @@ void NavMeshTesterTool::handleRender()
float p0[3], p1[3];
getPolyCenter(m_navMesh, m_polys[i], p0);
getPolyCenter(m_navMesh, m_parent[i], p1);
duDebugDrawArc(&dd, p0, p1, cola, 2.0f);
duDebugDrawArc(&dd, p0[0],p0[1],p0[2], p1[0],p1[1],p1[2], 0.25f, duRGBA(0,0,0,128), 2.0f);
}
}
const float dx = m_epos[0] - m_spos[0];
const float dz = m_epos[2] - m_spos[2];
float dist = sqrtf(dx*dx + dz*dz);
const float col[4] = {1,1,1,0.5f};
duDebugDrawCylinderWire(&dd, m_spos[0]-dist, m_spos[1]+0.02f, m_spos[2]-dist,
m_spos[0]+dist, m_spos[1]+m_agentHeight, m_spos[2]+dist, col);
const float dist = sqrtf(dx*dx + dz*dz);
duDebugDrawCircle(&dd, m_spos[0], m_spos[1]+m_agentHeight/2, m_spos[2], dist, duRGBA(64,16,0,220), 2.0f);
}
}
@ -447,26 +439,24 @@ void NavMeshTesterTool::handleRenderOverlay(double* proj, double* model, int* vi
}
}
void NavMeshTesterTool::drawAgent(const float* pos, float r, float h, float c, const float* col)
void NavMeshTesterTool::drawAgent(const float* pos, float r, float h, float c, const unsigned int col)
{
DebugDrawGL dd;
glDepthMask(GL_FALSE);
// Agent dimensions.
glLineWidth(2.0f);
duDebugDrawCylinderWire(&dd, pos[0]-r, pos[1]+0.02f, pos[2]-r, pos[0]+r, pos[1]+h, pos[2]+r, col);
glLineWidth(1.0f);
duDebugDrawCylinderWire(&dd, pos[0]-r, pos[1]+0.02f, pos[2]-r, pos[0]+r, pos[1]+h, pos[2]+r, col, 2.0f);
glColor4ub(0,0,0,196);
glBegin(GL_LINES);
glVertex3f(pos[0], pos[1]-c, pos[2]);
glVertex3f(pos[0], pos[1]+c, pos[2]);
glVertex3f(pos[0]-r/2, pos[1]+0.02f, pos[2]);
glVertex3f(pos[0]+r/2, pos[1]+0.02f, pos[2]);
glVertex3f(pos[0], pos[1]+0.02f, pos[2]-r/2);
glVertex3f(pos[0], pos[1]+0.02f, pos[2]+r/2);
glEnd();
unsigned int colb = duRGBA(0,0,0,196);
dd.begin(DU_DRAW_LINES);
dd.vertex(pos[0], pos[1]-c, pos[2], colb);
dd.vertex(pos[0], pos[1]+c, pos[2], colb);
dd.vertex(pos[0]-r/2, pos[1]+0.02f, pos[2], colb);
dd.vertex(pos[0]+r/2, pos[1]+0.02f, pos[2], colb);
dd.vertex(pos[0], pos[1]+0.02f, pos[2]-r/2, colb);
dd.vertex(pos[0], pos[1]+0.02f, pos[2]+r/2, colb);
dd.end();
glDepthMask(GL_TRUE);
}

View File

@ -24,7 +24,7 @@
#include "SDL.h"
#include "SDL_opengl.h"
#include "imgui.h"
#include "ExtraLinkTool.h"
#include "OffMeshLinkTool.h"
#include "InputGeom.h"
#include "Sample.h"
#include "Recast.h"
@ -35,39 +35,27 @@
# define snprintf _snprintf
#endif
static void drawCross(const float* p, const float s, const float dy)
{
glBegin(GL_LINES);
glVertex3f(p[0]-s,p[1]+dy,p[2]);
glVertex3f(p[0]+s,p[1]+dy,p[2]);
glVertex3f(p[0],p[1]-s+dy,p[2]);
glVertex3f(p[0],p[1]+s+dy,p[2]);
glVertex3f(p[0],p[1]+dy,p[2]-s);
glVertex3f(p[0],p[1]+dy,p[2]+s);
glEnd();
}
ExtraLinkTool::ExtraLinkTool() :
OffMeshLinkTool::OffMeshLinkTool() :
m_sample(0),
m_hitPosSet(0)
{
}
ExtraLinkTool::~ExtraLinkTool()
OffMeshLinkTool::~OffMeshLinkTool()
{
}
void ExtraLinkTool::init(Sample* sample)
void OffMeshLinkTool::init(Sample* sample)
{
m_sample = sample;
}
void ExtraLinkTool::reset()
void OffMeshLinkTool::reset()
{
m_hitPosSet = false;
}
void ExtraLinkTool::handleMenu()
void OffMeshLinkTool::handleMenu()
{
if (m_hitPosSet)
{
@ -79,7 +67,7 @@ void ExtraLinkTool::handleMenu()
}
}
void ExtraLinkTool::handleClick(const float* p, bool shift)
void OffMeshLinkTool::handleClick(const float* p, bool shift)
{
if (!m_sample) return;
InputGeom* geom = m_sample->getInputGeom();
@ -88,30 +76,25 @@ void ExtraLinkTool::handleClick(const float* p, bool shift)
if (shift)
{
// Delete
// Find nearest link end-point
float nearestDist = FLT_MAX;
int nearestIndex = -1;
for (int i = 0; i < geom->getExtraLinkCount(); ++i)
const float* verts = geom->getOffMeshLinkVertices();
for (int i = 0; i < geom->getOffMeshLinkCount()*2; ++i)
{
ExtraLink* link = geom->getExtraLink(i);
float d;
d = vdistSqr(p, link->spos);
const float* v = &verts[i*3];
float d = vdistSqr(p, v);
if (d < nearestDist)
{
nearestDist = d;
nearestIndex = i;
}
d = vdistSqr(p, link->epos);
if (d < nearestDist)
{
nearestDist = d;
nearestIndex = i;
nearestIndex = i/2; // Each link has two vertices.
}
}
// If end point close enough, delete it.
if (nearestIndex != -1 &&
sqrtf(nearestDist) < m_sample->getAgentRadius())
{
geom->deleteExtraLink(nearestIndex);
geom->deleteOffMeshLink(nearestIndex);
}
}
else
@ -124,46 +107,27 @@ void ExtraLinkTool::handleClick(const float* p, bool shift)
}
else
{
geom->addExtraLink(m_hitPos, p);
geom->addOffMeshLink(m_hitPos, p);
m_hitPosSet = false;
}
}
}
void ExtraLinkTool::handleRender()
void OffMeshLinkTool::handleRender()
{
if (m_hitPosSet)
{
const float s = m_sample->getAgentRadius();
glColor4ub(0,0,0,128);
glLineWidth(2.0f);
drawCross(m_hitPos, s, 0.1f);
glLineWidth(1.0f);
}
DebugDrawGL dd;
const float s = m_sample->getAgentRadius();
if (m_hitPosSet)
duDebugDrawCross(&dd, m_hitPos[0],m_hitPos[1]+0.1f,m_hitPos[2], s, duRGBA(0,0,0,128), 2.0f);
InputGeom* geom = m_sample->getInputGeom();
if (!geom) return;
DebugDrawGL dd;
const float linkCol[4] = {1,1,1,0.75f};
for (int i = 0; i < geom->getExtraLinkCount(); ++i)
{
ExtraLink* link = geom->getExtraLink(i);
duDebugDrawArc(&dd, link->spos, link->epos, linkCol, 2.0f);
glLineWidth(2.0f);
glColor4ub(0,0,0,255);
drawCross(link->spos, s, 0.1f);
drawCross(link->epos, s, 0.1f);
glLineWidth(1.0f);
}
if (geom)
geom->drawLinks(&dd, s);
}
void ExtraLinkTool::handleRenderOverlay(double* proj, double* model, int* view)
void OffMeshLinkTool::handleRenderOverlay(double* proj, double* model, int* view)
{
GLdouble x, y, z;

View File

@ -120,8 +120,7 @@ void Sample::handleRender()
// Draw bounds
const float* bmin = m_geom->getMeshBoundsMin();
const float* bmax = m_geom->getMeshBoundsMax();
float col[4] = {1,1,1,0.5f};
duDebugDrawBoxWire(&dd, bmin[0],bmin[1],bmin[2], bmax[0],bmax[1],bmax[2], col);
duDebugDrawBoxWire(&dd, bmin[0],bmin[1],bmin[2], bmax[0],bmax[1],bmax[2], duRGBA(255,255,255,128), 1.0f);
}
void Sample::handleRenderOverlay(double* proj, double* model, int* view)

View File

@ -34,7 +34,7 @@
#include "DetourNavMeshBuilder.h"
#include "DetourDebugDraw.h"
#include "NavMeshTesterTool.h"
#include "ExtraLinkTool.h"
#include "OffMeshLinkTool.h"
#ifdef WIN32
# define snprintf _snprintf
@ -95,9 +95,9 @@ void Sample_SoloMeshSimple::handleTools()
{
setTool(new NavMeshTesterTool);
}
if (imguiCheck("Create Extra Links", type == TOOL_EXTRA_LINK))
if (imguiCheck("Create Off-Mesh Links", type == TOOL_OFFMESH_LINK))
{
setTool(new ExtraLinkTool);
setTool(new OffMeshLinkTool);
}
imguiSeparator();
@ -186,8 +186,6 @@ void Sample_SoloMeshSimple::handleRender()
if (!m_geom || !m_geom->getMesh())
return;
float col[4];
DebugDrawGL dd;
glEnable(GL_FOG);
@ -199,12 +197,14 @@ void Sample_SoloMeshSimple::handleRender()
duDebugDrawTriMeshSlope(&dd, m_geom->getMesh()->getVerts(), m_geom->getMesh()->getVertCount(),
m_geom->getMesh()->getTris(), m_geom->getMesh()->getNormals(), m_geom->getMesh()->getTriCount(),
m_agentMaxSlope);
m_geom->drawLinks(&dd, m_agentRadius);
}
else if (m_drawMode != DRAWMODE_NAVMESH_TRANS)
{
// Draw mesh
duDebugDrawTriMesh(&dd, m_geom->getMesh()->getVerts(), m_geom->getMesh()->getVertCount(),
m_geom->getMesh()->getTris(), m_geom->getMesh()->getNormals(), m_geom->getMesh()->getTriCount(), 0);
m_geom->drawLinks(&dd, m_agentRadius);
}
glDisable(GL_FOG);
@ -213,8 +213,7 @@ void Sample_SoloMeshSimple::handleRender()
// Draw bounds
const float* bmin = m_geom->getMeshBoundsMin();
const float* bmax = m_geom->getMeshBoundsMax();
col[0] = 1; col[1] = 1; col[2] = 1; col[3] = 0.5f;
duDebugDrawBoxWire(&dd, bmin[0],bmin[1],bmin[2], bmax[0],bmax[1],bmax[2], col);
duDebugDrawBoxWire(&dd, bmin[0],bmin[1],bmin[2], bmax[0],bmax[1],bmax[2], duRGBA(255,255,255,128), 1.0f);
if (m_navMesh &&
(m_drawMode == DRAWMODE_NAVMESH ||
@ -332,7 +331,7 @@ bool Sample_SoloMeshSimple::handleBuild()
cleanup();
const float* bmin = m_geom->getMeshBoundsMin();
const float* bmax = m_geom->getMeshBoundsMin();
const float* bmax = m_geom->getMeshBoundsMax();
const float* verts = m_geom->getMesh()->getVerts();
const int nverts = m_geom->getMesh()->getVertCount();
const int* tris = m_geom->getMesh()->getTris();
@ -555,6 +554,7 @@ bool Sample_SoloMeshSimple::handleBuild()
m_pmesh->polys, m_pmesh->npolys, m_pmesh->nvp,
m_dmesh->meshes, m_dmesh->verts, m_dmesh->nverts,
m_dmesh->tris, m_dmesh->ntris,
m_geom->getOffMeshLinkVertices(), m_geom->getOffMeshLinkCount(),
m_pmesh->bmin, m_pmesh->bmax, m_cfg.cs, m_cfg.ch, 0, m_cfg.walkableClimb,
&navData, &navDataSize))
{

View File

@ -33,7 +33,7 @@
#include "DetourNavMeshBuilder.h"
#include "DetourDebugDraw.h"
#include "NavMeshTesterTool.h"
#include "ExtraLinkTool.h"
#include "OffMeshLinkTool.h"
#ifdef WIN32
# define snprintf _snprintf
@ -110,9 +110,9 @@ void Sample_SoloMeshTiled::handleTools()
{
setTool(new NavMeshTesterTool);
}
if (imguiCheck("Create Extra Links", type == TOOL_EXTRA_LINK))
if (imguiCheck("Create Off-Mesh Links", type == TOOL_OFFMESH_LINK))
{
setTool(new ExtraLinkTool);
setTool(new OffMeshLinkTool);
}
imguiSeparator();
@ -220,8 +220,6 @@ void Sample_SoloMeshTiled::handleRender()
if (!m_geom || !m_geom->getMesh())
return;
float col[4];
DebugDrawGL dd;
glEnable(GL_FOG);
@ -233,12 +231,14 @@ void Sample_SoloMeshTiled::handleRender()
duDebugDrawTriMeshSlope(&dd, m_geom->getMesh()->getVerts(), m_geom->getMesh()->getVertCount(),
m_geom->getMesh()->getTris(), m_geom->getMesh()->getNormals(), m_geom->getMesh()->getTriCount(),
m_agentMaxSlope);
m_geom->drawLinks(&dd, m_agentRadius);
}
else if (m_drawMode != DRAWMODE_NAVMESH_TRANS)
{
// Draw mesh
duDebugDrawTriMesh(&dd, m_geom->getMesh()->getVerts(), m_geom->getMesh()->getVertCount(),
m_geom->getMesh()->getTris(), m_geom->getMesh()->getNormals(), m_geom->getMesh()->getTriCount(), 0);
m_geom->drawLinks(&dd, m_agentRadius);
}
glDisable(GL_FOG);
@ -247,46 +247,15 @@ void Sample_SoloMeshTiled::handleRender()
// Draw bounds
const float* bmin = m_geom->getMeshBoundsMin();
const float* bmax = m_geom->getMeshBoundsMax();
col[0] = 1; col[1] = 1; col[2] = 1; col[3] = 0.5f;
duDebugDrawBoxWire(&dd, bmin[0],bmin[1],bmin[2], bmax[0],bmax[1],bmax[2], col);
duDebugDrawBoxWire(&dd, bmin[0],bmin[1],bmin[2], bmax[0],bmax[1],bmax[2], duRGBA(255,255,255,128), 1.0f);
// Tiling grid.
const int ts = (int)m_tileSize;
int gw = 0, gh = 0;
rcCalcGridSize(bmin, bmax, m_cellSize, &gw, &gh);
int tw = (gw + ts-1) / ts;
int th = (gh + ts-1) / ts;
const float s = ts*m_cellSize;
glBegin(GL_LINES);
glColor4ub(0,0,0,64);
for (int y = 0; y < th; ++y)
{
for (int x = 0; x < tw; ++x)
{
float fx, fy, fz;
fx = bmin[0] + x*s;
fy = bmin[1];
fz = bmin[2] + y*s;
glVertex3f(fx,fy,fz);
glVertex3f(fx+s,fy,fz);
glVertex3f(fx,fy,fz);
glVertex3f(fx,fy,fz+s);
if (x+1 >= tw)
{
glVertex3f(fx+s,fy,fz);
glVertex3f(fx+s,fy,fz+s);
}
if (y+1 >= th)
{
glVertex3f(fx,fy,fz+s);
glVertex3f(fx+s,fy,fz+s);
}
}
}
glEnd();
const int tw = (gw + (int)m_tileSize-1) / (int)m_tileSize;
const int th = (gh + (int)m_tileSize-1) / (int)m_tileSize;
const float s = m_tileSize*m_cellSize;
duDebugDrawGridXZ(&dd, bmin[0],bmin[1],bmin[2], tw,th, s, duRGBA(0,0,0,64), 1.0f);
if (m_navMesh &&
(m_drawMode == DRAWMODE_NAVMESH ||
@ -614,7 +583,7 @@ bool Sample_SoloMeshTiled::handleBuild()
cleanup();
const float* bmin = m_geom->getMeshBoundsMin();
const float* bmax = m_geom->getMeshBoundsMin();
const float* bmax = m_geom->getMeshBoundsMax();
const float* verts = m_geom->getMesh()->getVerts();
const int nverts = m_geom->getMesh()->getVertCount();
const int ntris = m_geom->getMesh()->getTriCount();
@ -957,6 +926,7 @@ bool Sample_SoloMeshTiled::handleBuild()
m_pmesh->polys, m_pmesh->npolys, m_pmesh->nvp,
m_dmesh->meshes, m_dmesh->verts, m_dmesh->nverts,
m_dmesh->tris, m_dmesh->ntris,
0, 0,
m_pmesh->bmin, m_pmesh->bmax, m_cfg.cs, m_cfg.ch, 0, m_cfg.walkableClimb,
&navData, &navDataSize))
{

View File

@ -33,7 +33,7 @@
#include "DetourNavMeshBuilder.h"
#include "DetourDebugDraw.h"
#include "NavMeshTesterTool.h"
#include "ExtraLinkTool.h"
#include "OffMeshLinkTool.h"
#ifdef WIN32
# define snprintf _snprintf
@ -253,9 +253,9 @@ void Sample_TileMesh::handleTools()
{
setTool(new NavMeshTileTool);
}
if (imguiCheck("Create Extra Links", type == TOOL_EXTRA_LINK))
if (imguiCheck("Create Off-Mesh Links", type == TOOL_OFFMESH_LINK))
{
setTool(new ExtraLinkTool);
setTool(new OffMeshLinkTool);
}
imguiSeparator();
@ -311,54 +311,25 @@ void Sample_TileMesh::handleRender()
// Draw mesh
duDebugDrawTriMesh(&dd, m_geom->getMesh()->getVerts(), m_geom->getMesh()->getVertCount(),
m_geom->getMesh()->getTris(), m_geom->getMesh()->getNormals(), m_geom->getMesh()->getTriCount(), 0);
m_geom->drawLinks(&dd, m_agentRadius);
glDepthMask(GL_FALSE);
// Draw bounds
const float* bmin = m_geom->getMeshBoundsMin();
const float* bmax = m_geom->getMeshBoundsMax();
const float col[4] = {1,1,1,0.5f};
duDebugDrawBoxWire(&dd, bmin[0],bmin[1],bmin[2], bmax[0],bmax[1],bmax[2], col);
duDebugDrawBoxWire(&dd, bmin[0],bmin[1],bmin[2], bmax[0],bmax[1],bmax[2], duRGBA(255,255,255,128), 1.0f);
// Tiling grid.
const int ts = (int)m_tileSize;
int gw = 0, gh = 0;
rcCalcGridSize(bmin, bmax, m_cellSize, &gw, &gh);
int tw = (gw + ts-1) / ts;
int th = (gh + ts-1) / ts;
const float s = ts*m_cellSize;
glBegin(GL_LINES);
glColor4ub(0,0,0,64);
for (int y = 0; y < th; ++y)
{
for (int x = 0; x < tw; ++x)
{
float fx, fy, fz;
fx = bmin[0] + x*s;
fy = bmin[1];
fz = bmin[2] + y*s;
glVertex3f(fx,fy,fz);
glVertex3f(fx+s,fy,fz);
glVertex3f(fx,fy,fz);
glVertex3f(fx,fy,fz+s);
if (x+1 >= tw)
{
glVertex3f(fx+s,fy,fz);
glVertex3f(fx+s,fy,fz+s);
}
if (y+1 >= th)
{
glVertex3f(fx,fy,fz+s);
glVertex3f(fx+s,fy,fz+s);
}
}
}
glEnd();
const int tw = (gw + (int)m_tileSize-1) / (int)m_tileSize;
const int th = (gh + (int)m_tileSize-1) / (int)m_tileSize;
const float s = m_tileSize*m_cellSize;
duDebugDrawGridXZ(&dd, bmin[0],bmin[1],bmin[2], tw,th, s, duRGBA(0,0,0,64), 1.0f);
// Draw active tile
duDebugDrawBoxWire(&dd, m_tileBmin[0],m_tileBmin[1],m_tileBmin[2], m_tileBmax[0],m_tileBmax[1],m_tileBmax[2], m_tileCol);
duDebugDrawBoxWire(&dd, m_tileBmin[0],m_tileBmin[1],m_tileBmin[2], m_tileBmax[0],m_tileBmax[1],m_tileBmax[2], m_tileCol, 2.0f);
if (m_navMesh)
duDebugDrawNavMesh(&dd, m_navMesh);
@ -461,7 +432,7 @@ void Sample_TileMesh::buildTile(const float* pos)
m_tileBmax[1] = bmax[1];
m_tileBmax[2] = bmin[2] + (ty+1)*ts;
m_tileCol[0] = 0.3f; m_tileCol[1] = 0.8f; m_tileCol[2] = 0; m_tileCol[3] = 1;
m_tileCol = duRGBA(77,204,0,255);
int dataSize = 0;
unsigned char* data = buildTileMesh(m_tileBmin, m_tileBmax, dataSize);
@ -499,7 +470,7 @@ void Sample_TileMesh::removeTile(const float* pos)
m_tileBmax[1] = bmax[1];
m_tileBmax[2] = bmin[2] + (ty+1)*ts;
m_tileCol[0] = 0.8f; m_tileCol[1] = 0.1f; m_tileCol[2] = 0; m_tileCol[3] = 1;
m_tileCol = duRGBA(204,25,0,255);
unsigned char* rdata = 0;
int rdataSize = 0;
@ -814,7 +785,9 @@ unsigned char* Sample_TileMesh::buildTileMesh(const float* bmin, const float* bm
if (!dtCreateNavMeshData(m_pmesh->verts, m_pmesh->nverts,
m_pmesh->polys, m_pmesh->npolys, m_pmesh->nvp,
m_dmesh->meshes, m_dmesh->verts, m_dmesh->nverts, m_dmesh->tris, m_dmesh->ntris,
bmin, bmax, m_cfg.cs, m_cfg.ch, m_cfg.tileSize, m_cfg.walkableClimb, &navData, &navDataSize))
0, 0,
bmin, bmax, m_cfg.cs, m_cfg.ch, m_cfg.tileSize, m_cfg.walkableClimb,
&navData, &navDataSize))
{
if (rcGetLog())
rcGetLog()->log(RC_LOG_ERROR, "Could not build Detour navmesh.");