public ILODNodeData CreateLODNodeData(LODOctreeNode node) { Block45LODNodeData data = new Block45LODNodeData(node); data.HelperProc = this; return(data); }
public void AttachLODNode(Block45LODNodeData nData) { _nData = nData; if (_nData != null) { _nData.AddOctNode(this); } }
public void OnDestroyNodeData(ILODNodeData ndata) { Block45LODNodeData cdata = ndata as Block45LODNodeData; IntVector4 cpos = cdata.ChunkPosLod; if (cpos != null && cpos.w == 0) { SceneChunkDependence.Instance.ValidListRemove(cpos, EDependChunkType.ChunkBlkMask); } }
public void OnEndUpdateNodeData(ILODNodeData ndata) { Block45LODNodeData cdata = ndata as Block45LODNodeData; if (cdata.LOD == 0 && cdata.IsAllOctNodeReady()) { EDependChunkType type = cdata.IsEmpty ? EDependChunkType.ChunkBlkEmp : EDependChunkType.ChunkBlkCol; SceneChunkDependence.Instance.ValidListAdd(cdata.ChunkPosLod, type); } }
public void OnBegUpdateNodeData(ILODNodeData ndata) { if (LODOctreeMan._maxLod == 0) { Block45LODNodeData cdata = ndata as Block45LODNodeData; if (cdata.LOD == 0 && cdata.IsNodePosChange()) { SceneChunkDependence.Instance.ValidListRemove(cdata.ChunkPosLod, EDependChunkType.ChunkBlkMask); } } }
public void ChunkProcPreLoadData(ILODNodeData nData) { if (_dataSource == null || _dataSource.RootNode == null) { return; } Block45LODNodeData b45NodeData = nData as Block45LODNodeData; int size = 1 << (LODOctreeMan.Lod0NodeShift + b45NodeData.ChunkPosLod.w); _tmpBoundPos.x = b45NodeData.ChunkPosLod.x << VoxelTerrainConstants._shift; _tmpBoundPos.y = b45NodeData.ChunkPosLod.y << VoxelTerrainConstants._shift; _tmpBoundPos.z = b45NodeData.ChunkPosLod.z << VoxelTerrainConstants._shift; _tmpLstBlock45Datas.Clear(); lock (b45NodeData) { Block45OctNode.FindNodesCenterInside(_tmpBoundPos, size, b45NodeData.LOD, _dataSource.RootNode, ref _tmpLstBlock45Datas); b45NodeData.SetBlock45Datas(_tmpLstBlock45Datas); } }
public void DetachLODNode() { DestroyChunkGo(); _nData = null; }