1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
| FRecastNavMeshGenerationProperties::FRecastNavMeshGenerationProperties() { TilePoolSize = 1024; TileSizeUU = 988.f; CellSize = 19; CellHeight = 10; AgentRadius = 34.f; AgentHeight = 144.f; AgentMaxSlope = 44.f; AgentMaxStepHeight = 35.f; MinRegionArea = 0.f; MergeRegionSize = 400.f; MaxSimplificationError = 1.3f; TileNumberHardLimit = 1 << 20; RegionPartitioning = ERecastPartitioning::Watershed; LayerPartitioning = ERecastPartitioning::Watershed; RegionChunkSplits = 2; LayerChunkSplits = 2; bSortNavigationAreasByCost = false; bPerformVoxelFiltering = true; bMarkLowHeightAreas = false; bUseExtraTopCellWhenMarkingAreas = true; bFilterLowSpanSequences = false; bFilterLowSpanFromTileCache = false; bFixedTilePoolSize = false; }
FRecastNavMeshGenerationProperties::FRecastNavMeshGenerationProperties(const ARecastNavMesh& RecastNavMesh) { TilePoolSize = RecastNavMesh.TilePoolSize; TileSizeUU = RecastNavMesh.TileSizeUU; CellSize = RecastNavMesh.CellSize; CellHeight = RecastNavMesh.CellHeight; AgentRadius = RecastNavMesh.AgentRadius; AgentHeight = RecastNavMesh.AgentHeight; AgentMaxSlope = RecastNavMesh.AgentMaxSlope; AgentMaxStepHeight = RecastNavMesh.AgentMaxStepHeight; MinRegionArea = RecastNavMesh.MinRegionArea; MergeRegionSize = RecastNavMesh.MergeRegionSize; MaxSimplificationError = RecastNavMesh.MaxSimplificationError; TileNumberHardLimit = RecastNavMesh.TileNumberHardLimit; RegionPartitioning = RecastNavMesh.RegionPartitioning; LayerPartitioning = RecastNavMesh.LayerPartitioning; RegionChunkSplits = RecastNavMesh.RegionChunkSplits; LayerChunkSplits = RecastNavMesh.LayerChunkSplits; bSortNavigationAreasByCost = RecastNavMesh.bSortNavigationAreasByCost; bPerformVoxelFiltering = RecastNavMesh.bPerformVoxelFiltering; bMarkLowHeightAreas = RecastNavMesh.bMarkLowHeightAreas; bUseExtraTopCellWhenMarkingAreas = RecastNavMesh.bUseExtraTopCellWhenMarkingAreas; bFilterLowSpanSequences = RecastNavMesh.bFilterLowSpanSequences; bFilterLowSpanFromTileCache = RecastNavMesh.bFilterLowSpanFromTileCache; bFixedTilePoolSize = RecastNavMesh.bFixedTilePoolSize; } ARecastNavMesh::ARecastNavMesh(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) , bDrawFilledPolys(true) , bDrawNavMeshEdges(true) , bDrawNavLinks(true) , bDrawOctreeDetails(true) , bDrawMarkedForbiddenPolys(false) , bDistinctlyDrawTilesBeingBuilt(true) , DrawOffset(10.f) , TilePoolSize(1024) , MaxSimplificationError(1.3f) , DefaultMaxSearchNodes(RECAST_MAX_SEARCH_NODES) , DefaultMaxHierarchicalSearchNodes(RECAST_MAX_SEARCH_NODES) , bPerformVoxelFiltering(true) , bMarkLowHeightAreas(false) , bUseExtraTopCellWhenMarkingAreas(true) , bFilterLowSpanSequences(false) , bFilterLowSpanFromTileCache(false) , bStoreEmptyTileLayers(false) , bUseVirtualFilters(true) , bAllowNavLinkAsPathEnd(false) , TileSetUpdateInterval(1.0f) , NavMeshVersion(NAVMESHVER_LATEST) , RecastNavMeshImpl(NULL) { HeuristicScale = 0.999f; RegionPartitioning = ERecastPartitioning::Watershed; LayerPartitioning = ERecastPartitioning::Watershed; RegionChunkSplits = 2; LayerChunkSplits = 2; MaxSimultaneousTileGenerationJobsCount = 1024; bDoFullyAsyncNavDataGathering = false; TileNumberHardLimit = 1 << 20;
#if RECAST_ASYNC_REBUILDING BatchQueryCounter = 0; #endif
if (HasAnyFlags(RF_ClassDefaultObject) == false) { INC_DWORD_STAT_BY(STAT_NavigationMemory, sizeof(*this) );
FindPathImplementation = FindPath; FindHierarchicalPathImplementation = FindPath;
TestPathImplementation = TestPath; TestHierarchicalPathImplementation = TestHierarchicalPath;
RaycastImplementation = NavMeshRaycast;
RecastNavMeshImpl = new FPImplRecastNavMesh(this); SupportedAreas.Add(FSupportedAreaData(UNavArea_Null::StaticClass(), RECAST_NULL_AREA)); SupportedAreas.Add(FSupportedAreaData(UNavArea_LowHeight::StaticClass(), RECAST_LOW_AREA)); SupportedAreas.Add(FSupportedAreaData(UNavArea_Default::StaticClass(), RECAST_DEFAULT_AREA)); } }
|