diff --git a/Recast/Build/Xcode/Recast.xcodeproj/memon.pbxuser b/Recast/Build/Xcode/Recast.xcodeproj/memon.pbxuser index 42150ec..b573dcf 100644 --- a/Recast/Build/Xcode/Recast.xcodeproj/memon.pbxuser +++ b/Recast/Build/Xcode/Recast.xcodeproj/memon.pbxuser @@ -1,7 +1,7 @@ // !$*UTF8*$! { 29B97313FDCFA39411CA2CEA /* Project object */ = { - activeBuildConfigurationName = Debug; + activeBuildConfigurationName = Release; activeExecutable = 6B8632970F78114600E2684A /* Recast */; activeTarget = 8D1107260486CEB800E47090 /* Recast */; addToTargets = ( @@ -34,12 +34,14 @@ PBXFileDataSource_Target_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 259608223; - PBXWorkspaceStateSaveDate = 259608223; + PBXPerProjectTemplateStateSaveDate = 260016673; + PBXWorkspaceStateSaveDate = 260016673; }; perUserProjectItems = { - 6B68D7640F781974007E6D78 /* PBXTextBookmark */ = 6B68D7640F781974007E6D78 /* PBXTextBookmark */; - 6B85EA8A0F7970D500780B56 /* PBXTextBookmark */ = 6B85EA8A0F7970D500780B56 /* PBXTextBookmark */; + 6B803CEE0F7F8A8000255AE5 /* PBXTextBookmark */ = 6B803CEE0F7F8A8000255AE5 /* PBXTextBookmark */; + 6B803CF00F7F8A8000255AE5 /* PBXTextBookmark */ = 6B803CF00F7F8A8000255AE5 /* PBXTextBookmark */; + 6B803CFB0F7F912A00255AE5 /* PBXTextBookmark */ = 6B803CFB0F7F912A00255AE5 /* PBXTextBookmark */; + 6B803CFD0F7F96D900255AE5 /* PBXTextBookmark */ = 6B803CFD0F7F96D900255AE5 /* PBXTextBookmark */; 6B8633370F7813A600E2684A /* PBXTextBookmark */ = 6B8633370F7813A600E2684A /* PBXTextBookmark */; 6B86333A0F7813A600E2684A /* PBXTextBookmark */ = 6B86333A0F7813A600E2684A /* PBXTextBookmark */; 6B86333B0F7813A600E2684A /* PBXTextBookmark */ = 6B86333B0F7813A600E2684A /* PBXTextBookmark */; @@ -54,25 +56,45 @@ userBuildSettings = { }; }; - 6B68D7640F781974007E6D78 /* PBXTextBookmark */ = { + 6B803CEE0F7F8A8000255AE5 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 6B8632BC0F7811CB00E2684A /* demo.cpp */; - name = "demo.cpp: 631"; + name = "demo.cpp: 35"; rLen = 0; - rLoc = 16040; + rLoc = 1240; rType = 0; - vrLen = 1544; - vrLoc = 15684; + vrLen = 678; + vrLoc = 919; }; - 6B85EA8A0F7970D500780B56 /* PBXTextBookmark */ = { + 6B803CF00F7F8A8000255AE5 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 6B8632BC0F7811CB00E2684A /* demo.cpp */; - name = "demo.cpp: 640"; + name = "demo.cpp: 35"; rLen = 0; - rLoc = 16397; + rLoc = 1240; rType = 0; - vrLen = 1544; - vrLoc = 15684; + vrLen = 678; + vrLoc = 919; + }; + 6B803CFB0F7F912A00255AE5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8633570F7816C900E2684A /* imgui.h */; + name = "imgui.h: 15"; + rLen = 0; + rLoc = 804; + rType = 0; + vrLen = 1368; + vrLoc = 0; + }; + 6B803CFD0F7F96D900255AE5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 6B8633570F7816C900E2684A /* imgui.h */; + name = "imgui.h: 23"; + rLen = 0; + rLoc = 1027; + rType = 0; + vrLen = 1241; + vrLoc = 591; }; 6B8632970F78114600E2684A /* Recast */ = { isa = PBXExecutable; @@ -118,9 +140,9 @@ }; 6B8632BC0F7811CB00E2684A /* demo.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {803, 11568}}"; - sepNavSelRange = "{16397, 0}"; - sepNavVisRange = "{15684, 1544}"; + sepNavIntBoundsRect = "{{0, 0}, {803, 12344}}"; + sepNavSelRange = "{1240, 0}"; + sepNavVisRange = "{919, 743}"; }; }; 6B8633370F7813A600E2684A /* PBXTextBookmark */ = { @@ -167,6 +189,13 @@ path = /Library/Frameworks/SDL.framework/Versions/A/Headers/SDL_events.h; sourceTree = ""; }; + 6B8633570F7816C900E2684A /* imgui.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {803, 736}}"; + sepNavSelRange = "{1027, 0}"; + sepNavVisRange = "{591, 1241}"; + }; + }; 6B86335E0F7816FA00E2684A /* Recast.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {803, 4720}}"; diff --git a/Recast/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 b/Recast/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 index 8e7c960..fecb8d9 100644 --- a/Recast/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 +++ b/Recast/Build/Xcode/Recast.xcodeproj/memon.perspectivev3 @@ -268,6 +268,7 @@ 29B97314FDCFA39411CA2CEA 080E96DDFE201D6D7F000001 + 6B8633730F7816FE00E2684A 29B97323FDCFA39411CA2CEA 1058C7A0FEA54F0111CA2CBB @@ -315,7 +316,7 @@ PBXProjectModuleGUID 6B8632A30F78115100E2684A PBXProjectModuleLabel - demo.cpp + imgui.h PBXSplitModuleInNavigatorKey Split0 @@ -323,18 +324,19 @@ PBXProjectModuleGUID 6B8632A40F78115100E2684A PBXProjectModuleLabel - demo.cpp + imgui.h _historyCapacity 0 bookmark - 6B85EA8A0F7970D500780B56 + 6B803CFD0F7F96D900255AE5 history 6B8633370F7813A600E2684A 6B8633780F78173000E2684A 6B8633790F78173000E2684A 6B8633820F78174400E2684A - 6B68D7640F781974007E6D78 + 6B803CEE0F7F8A8000255AE5 + 6B803CFB0F7F912A00255AE5 prevStack @@ -343,6 +345,7 @@ 6B86337C0F78173000E2684A 6B86337E0F78173000E2684A 6B8633840F78174400E2684A + 6B803CF00F7F8A8000255AE5 SplitCount @@ -465,11 +468,11 @@ TableOfContents - 6B85EA810F794EA900780B56 + 6B803CF20F7F8A8000255AE5 1CA23ED40692098700951B8B - 6B85EA820F794EA900780B56 + 6B803CF30F7F8A8000255AE5 6B8632A30F78115100E2684A - 6B85EA830F794EA900780B56 + 6B803CF40F7F8A8000255AE5 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -616,14 +619,14 @@ TableOfContents - 6B85EA840F794EA900780B56 + 6B803CF50F7F8A8000255AE5 1CCC7628064C1048000F2A68 1CCC7629064C1048000F2A68 - 6B85EA850F794EA900780B56 - 6B85EA860F794EA900780B56 - 6B85EA870F794EA900780B56 - 6B85EA880F794EA900780B56 - 6B85EA890F794EA900780B56 + 6B803CF60F7F8A8000255AE5 + 6B803CF70F7F8A8000255AE5 + 6B803CF80F7F8A8000255AE5 + 6B803CF90F7F8A8000255AE5 + 6B803CFA0F7F8A8000255AE5 ToolbarConfiguration xcode.toolbar.config.debugV3 @@ -653,7 +656,7 @@ 5 WindowOrderList - /Users/memon/Code/Recast/Build/Xcode/Recast.xcodeproj + /Users/memon/Code/recastnavigation/Recast/Build/Xcode/Recast.xcodeproj WindowString 55 112 1071 654 0 0 1280 778 diff --git a/Recast/Build/Xcode/Recast.xcodeproj/project.pbxproj b/Recast/Build/Xcode/Recast.xcodeproj/project.pbxproj index 118f09b..12c09dc 100644 --- a/Recast/Build/Xcode/Recast.xcodeproj/project.pbxproj +++ b/Recast/Build/Xcode/Recast.xcodeproj/project.pbxproj @@ -38,6 +38,7 @@ 32CA4F630368D1EE00C91783 /* Recast_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Recast_Prefix.pch; sourceTree = ""; }; 6B68D7620F78196F007E6D78 /* RecastDebugDraw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RecastDebugDraw.h; path = ../../Include/RecastDebugDraw.h; sourceTree = SOURCE_ROOT; }; 6B68D7630F78196F007E6D78 /* RecastTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RecastTimer.h; path = ../../Include/RecastTimer.h; sourceTree = SOURCE_ROOT; }; + 6B803CE90F7F8A6D00255AE5 /* RecastLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RecastLog.h; path = ../../Include/RecastLog.h; sourceTree = SOURCE_ROOT; }; 6B8632B90F78119A00E2684A /* SDLMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDLMain.h; path = ../../Examples/SDLMain.h; sourceTree = SOURCE_ROOT; }; 6B8632BA0F78119A00E2684A /* SDLMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLMain.m; path = ../../Examples/SDLMain.m; sourceTree = SOURCE_ROOT; }; 6B8632BC0F7811CB00E2684A /* demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = demo.cpp; path = ../../Examples/demo.cpp; sourceTree = SOURCE_ROOT; }; @@ -55,7 +56,6 @@ 6B8633600F7816FA00E2684A /* RecastDebugDraw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RecastDebugDraw.cpp; path = ../../Source/RecastDebugDraw.cpp; sourceTree = SOURCE_ROOT; }; 6B8633620F7816FA00E2684A /* RecastFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RecastFilter.cpp; path = ../../Source/RecastFilter.cpp; sourceTree = SOURCE_ROOT; }; 6B8633630F7816FA00E2684A /* RecastLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RecastLog.cpp; path = ../../Source/RecastLog.cpp; sourceTree = SOURCE_ROOT; }; - 6B8633640F7816FA00E2684A /* RecastLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RecastLog.h; path = ../../Source/RecastLog.h; sourceTree = SOURCE_ROOT; }; 6B8633650F7816FA00E2684A /* RecastMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RecastMesh.cpp; path = ../../Source/RecastMesh.cpp; sourceTree = SOURCE_ROOT; }; 6B8633660F7816FA00E2684A /* RecastRasterization.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RecastRasterization.cpp; path = ../../Source/RecastRasterization.cpp; sourceTree = SOURCE_ROOT; }; 6B8633670F7816FA00E2684A /* RecastRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RecastRegion.cpp; path = ../../Source/RecastRegion.cpp; sourceTree = SOURCE_ROOT; }; @@ -165,6 +165,7 @@ 6B8633730F7816FE00E2684A /* Recast */ = { isa = PBXGroup; children = ( + 6B803CE90F7F8A6D00255AE5 /* RecastLog.h */, 6B68D7620F78196F007E6D78 /* RecastDebugDraw.h */, 6B68D7630F78196F007E6D78 /* RecastTimer.h */, 6B86335E0F7816FA00E2684A /* Recast.cpp */, @@ -172,7 +173,6 @@ 6B8633600F7816FA00E2684A /* RecastDebugDraw.cpp */, 6B8633620F7816FA00E2684A /* RecastFilter.cpp */, 6B8633630F7816FA00E2684A /* RecastLog.cpp */, - 6B8633640F7816FA00E2684A /* RecastLog.h */, 6B8633650F7816FA00E2684A /* RecastMesh.cpp */, 6B8633660F7816FA00E2684A /* RecastRasterization.cpp */, 6B8633670F7816FA00E2684A /* RecastRegion.cpp */, diff --git a/Recast/Examples/Recast.app/Contents/Info.plist b/Recast/Examples/Recast.app/Contents/Info.plist new file mode 100644 index 0000000..ae9e84b --- /dev/null +++ b/Recast/Examples/Recast.app/Contents/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + Recast + CFBundleIdentifier + com.yourcompany.Recast + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Recast + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/Recast/Examples/Recast.app/Contents/MacOS/Recast b/Recast/Examples/Recast.app/Contents/MacOS/Recast new file mode 100755 index 0000000..2bdc147 Binary files /dev/null and b/Recast/Examples/Recast.app/Contents/MacOS/Recast differ diff --git a/Recast/Examples/Recast.app/Contents/PkgInfo b/Recast/Examples/Recast.app/Contents/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/Recast/Examples/Recast.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/Recast/Examples/Recast.app/Contents/Resources/English.lproj/InfoPlist.strings b/Recast/Examples/Recast.app/Contents/Resources/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..dea12de Binary files /dev/null and b/Recast/Examples/Recast.app/Contents/Resources/English.lproj/InfoPlist.strings differ diff --git a/Recast/Examples/Recast.app/Contents/Resources/English.lproj/MainMenu.nib b/Recast/Examples/Recast.app/Contents/Resources/English.lproj/MainMenu.nib new file mode 100644 index 0000000..cfc2025 Binary files /dev/null and b/Recast/Examples/Recast.app/Contents/Resources/English.lproj/MainMenu.nib differ diff --git a/Recast/Examples/imgui.h b/Recast/Examples/imgui.h index 16e80e0..b80a58c 100644 --- a/Recast/Examples/imgui.h +++ b/Recast/Examples/imgui.h @@ -42,4 +42,4 @@ void imguiValue(unsigned int id, const char* text); bool imguiSlider(unsigned int id, const char* text, float* val, float vmin, float vmax, float vinc); -#endif // IMGUI_H \ No newline at end of file +#endif // IMGUI_H diff --git a/Recast/Readme.txt b/Recast/Readme.txt index b29fe89..6c5df27 100644 --- a/Recast/Readme.txt +++ b/Recast/Readme.txt @@ -1,12 +1,33 @@ -Detour Version 1.0 +Recast Version 1.0 -Welcome to Detour! - -Detour is a navigation system for games. The system comes with two parts: 1) Automatic preprocess which generates navmesh automatically from a polygon soup and, 2) runtime library which allows to do spatic queries and pathfinding on the navmesh. +Recast is state of the art navigation mesh construction toolset for games. -The project files with this distribution with with Microsoft Visual C++ 2008 (you can download it for free) and XCode 3.1. + * It is automatic, which means that you can throw any level geometry + at it and you will get robust mesh out + * It is fast which means swift turnaround times for level designers + * It is open source so it comes with full source and you can + customize it to your hearts content. -You can find examples how to use the preprocess and runtime on the Examples directory. +The Recast process starts with constructing a voxel mold from a level geometry +and then casting a navigation mesh over it. The process consists of three steps, +building the voxel mold, partitioning the mold into simple regions, peeling off +the regions as simple polygons. + + 1. The voxel mold is build from the input triangle mesh by rasterizing + the triangles into a multi-layer heightfield. Some simple filters are + then applied to the mold to prune out locations where the character + would not be able to move. + 2. The walkable areas described by the mold are divided into simple + overlayed 2D regions. The resulting regions have only one non-overlapping + contour, which simplifies the final step of the process tremendously. + 3. The navigation polygons are peeled off from the regions by first tracing + the boundaries and then simplifying them. The resulting polygons are + finally converted to convex polygons which makes them perfect for + pathfinding and spatial reasoning about the level. + +The project files with this distribution can be compiled with Microsoft Visual C++ 2008 (you can download it for free) and XCode 3.1. + +You can find examples how to use the library on the Examples directory. Mikko Mononen