| 679 | } |
| 680 | |
| 681 | void InitConfig(rcConfig& config, NavMesh* navMesh) |
| 682 | { |
| 683 | auto& settings = *NavigationSettings::Get(); |
| 684 | auto& navMeshProperties = navMesh->Properties; |
| 685 | |
| 686 | config.cs = settings.CellSize; |
| 687 | config.ch = settings.CellHeight; |
| 688 | config.walkableSlopeAngle = navMeshProperties.Agent.MaxSlopeAngle; |
| 689 | config.walkableHeight = (int)(navMeshProperties.Agent.Height / config.ch + 0.99f); |
| 690 | config.walkableClimb = (int)(navMeshProperties.Agent.StepHeight / config.ch); |
| 691 | config.walkableRadius = (int)(navMeshProperties.Agent.Radius / config.cs + 0.99f); |
| 692 | config.maxEdgeLen = (int)(settings.MaxEdgeLen / config.cs); |
| 693 | config.maxSimplificationError = settings.MaxEdgeError; |
| 694 | config.minRegionArea = rcSqr(settings.MinRegionArea); |
| 695 | config.mergeRegionArea = rcSqr(settings.MergeRegionArea); |
| 696 | config.maxVertsPerPoly = 6; |
| 697 | config.detailSampleDist = config.cs * settings.DetailSamplingDist; |
| 698 | config.detailSampleMaxError = config.ch * settings.MaxDetailSamplingError; |
| 699 | config.borderSize = config.walkableRadius + 3; |
| 700 | config.tileSize = settings.TileSize; |
| 701 | config.width = config.tileSize + config.borderSize * 2; |
| 702 | config.height = config.tileSize + config.borderSize * 2; |
| 703 | } |
| 704 | |
| 705 | struct BuildRequest |
| 706 | { |
no test coverage detected