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, 0x10, timestampFunction) { this.LimitAddingWeight = GetWeight(25f); this.m_voxelMap = voxelMap; m_staticVoxelMap = this.m_voxelMap; this.m_processedCells = new MyVector3ISet(); this.m_cellsOnWayCoords = new HashSet <ulong>(); this.m_cellsOnWay = new List <Vector3I>(); this.m_primitivesOnPath = new List <MyHighLevelPrimitive>(0x80); this.m_toAdd = new MyBinaryHeap <float, CellToAddHeapItem>(0x80); this.m_heapItemList = new List <CellToAddHeapItem>(); this.m_markedForAddition = new MyVector3ISet(); this.m_cellsToChange = new LinkedList <Vector3I>(); this.m_cellsToChangeSet = new MyVector3ISet(); this.m_connectionHelper = new MyVoxelConnectionHelper(); this.m_navmeshCoordinator = coordinator; this.m_higherLevel = new MyHighLevelGroup(this, coordinator.HighLevelLinks, timestampFunction); this.m_higherLevelHelper = new MyVoxelHighLevelHelper(this); this.m_debugCellEdges = new Dictionary <ulong, List <DebugDrawEdge> >(); voxelMap.Storage.RangeChanged += new Action <Vector3I, Vector3I, MyStorageDataTypeFlags>(this.OnStorageChanged); this.m_maxCellCoord = ((Vector3I)(this.m_voxelMap.Size / 8)) - Vector3I.One; }
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; }