public FindingSet() { m_openNodes = new MyBinaryStructHeap <float, PathNode>(MaxOpenNodes); m_reachedNodes = new Dictionary <long, PathNode>(); m_blueSkyNodes = new List <Vector3D>(); NodeDistance = DefaultNodeDistance << 1; #if PROFILE m_unreachableNodes = 0; #endif }
public MyVoxelNavigationMesh(MyVoxelMap voxelMap, MyNavmeshCoordinator coordinator, Func <long> timestampFunction) : base(coordinator.Links, 16, timestampFunction) { m_voxelMap = voxelMap; m_cellSize = m_voxelMap.SizeInMetres / m_voxelMap.Storage.Geometry.CellsCount * (1 << NAVMESH_LOD); m_processedCells = new MyVector3ISet(); m_markedForAddition = new MyVector3ISet(); m_toAdd = new MyBinaryStructHeap <float, Vector3I>(128); m_connectionHelper = new MyVoxelConnectionHelper(); m_navmeshCoordinator = coordinator; m_higherLevel = new MyHighLevelGroup(this, coordinator.HighLevelLinks, timestampFunction); m_higherLevelHelper = new MyVoxelHighLevelHelper(this); m_debugCellEdges = new Dictionary <ulong, List <DebugDrawEdge> >(); voxelMap.Storage.RangeChanged += OnStorageChanged; }
public MyVoxelNavigationMesh(MyVoxelBase voxelMap, MyNavmeshCoordinator coordinator, Func<long> timestampFunction) : base(coordinator.Links, 16, timestampFunction) { m_voxelMap = voxelMap; m_cellSize = m_voxelMap.SizeInMetres / m_voxelMap.Storage.Geometry.CellsCount * (1 << NAVMESH_LOD); m_processedCells = new MyVector3ISet(); m_markedForAddition = new MyVector3ISet(); m_toAdd = new MyBinaryStructHeap<float, Vector3I>(128); m_connectionHelper = new MyVoxelConnectionHelper(); m_navmeshCoordinator = coordinator; m_higherLevel = new MyHighLevelGroup(this, coordinator.HighLevelLinks, timestampFunction); m_higherLevelHelper = new MyVoxelHighLevelHelper(this); m_debugCellEdges = new Dictionary<ulong, List<DebugDrawEdge>>(); voxelMap.Storage.RangeChanged += OnStorageChanged; }