// Token: 0x06003044 RID: 12356 RVA: 0x000CB8E0 File Offset: 0x000C9AE0 public void DrawGizmosInternal() { if (this.level == this.maxLevels) { CombinedLODManager.MaxCell maxCell = (CombinedLODManager.MaxCell) this; if (maxCell.currentLod == 0) { Gizmos.color = Color.red; } else if (maxCell.currentLod == 1) { Gizmos.color = Color.green; } else if (maxCell.currentLod == 2) { Gizmos.color = Color.yellow; } else if (maxCell.currentLod == 3) { Gizmos.color = Color.blue; } Gizmos.DrawWireCube(this.bounds.center, this.bounds.size - new Vector3(0.25f, 0.25f, 0.25f)); Gizmos.color = Color.white; return; } for (int i = 0; i < 8; i++) { if (this.cellsUsed[i]) { this.cells[i].DrawGizmosInternal(); } } }
// Token: 0x06003042 RID: 12354 RVA: 0x000CB7C0 File Offset: 0x000C99C0 public void LodInternal(CombinedLODManager.LOD[] lods, int lodLevel) { if (this.level == this.maxLevels) { CombinedLODManager.MaxCell maxCell = (CombinedLODManager.MaxCell) this; if (maxCell.currentLod != lodLevel) { for (int i = 0; i < lods.Length; i++) { bool enabled = i == lodLevel; for (int j = 0; j < maxCell.mrList[i].Count; j++) { maxCell.mrList[i][j].enabled = enabled; } } maxCell.currentLod = lodLevel; return; } } else { for (int k = 0; k < 8; k++) { if (this.cellsUsed[k]) { this.cells[k].LodInternal(lods, lodLevel); } } } }
// Token: 0x06003041 RID: 12353 RVA: 0x000CB64C File Offset: 0x000C984C public void AutoLodInternal(CombinedLODManager.LOD[] lods, float lodCulledDistance) { if (this.level == this.maxLevels) { CombinedLODManager.MaxCell maxCell = (CombinedLODManager.MaxCell) this; if (lodCulledDistance != -1f && (this.bounds.center - lods[0].sphere.center).sqrMagnitude > lodCulledDistance * lodCulledDistance) { if (maxCell.currentLod != -1) { for (int i = 0; i < lods.Length; i++) { for (int j = 0; j < maxCell.mrList[i].Count; j++) { maxCell.mrList[i][j].enabled = false; } } maxCell.currentLod = -1; } return; } int k = 0; while (k < lods.Length) { bool flag = k >= lods.Length - 1 || Mathw.IntersectAABB3Sphere3(this.box, lods[k].sphere); if (flag) { if (maxCell.currentLod != k) { for (int l = 0; l < lods.Length; l++) { bool enabled = l == k; for (int m = 0; m < maxCell.mrList[l].Count; m++) { maxCell.mrList[l][m].enabled = enabled; } } maxCell.currentLod = k; return; } return; } else { k++; } } return; } else { for (int n = 0; n < 8; n++) { if (this.cellsUsed[n]) { this.cells[n].AutoLodInternal(lods, lodCulledDistance); } } } }
// Token: 0x06003040 RID: 12352 RVA: 0x000CB598 File Offset: 0x000C9798 private void AddMeshRendererInternal(MeshRenderer mr, Vector3 position, int lodLevel, int lodLevels) { if (this.level == this.maxLevels) { CombinedLODManager.MaxCell maxCell = (CombinedLODManager.MaxCell) this; if (maxCell.mrList == null) { maxCell.mrList = new List <MeshRenderer> [lodLevels]; } List <MeshRenderer>[] mrList = maxCell.mrList; if (mrList[lodLevel] == null) { mrList[lodLevel] = new List <MeshRenderer>(); } mrList[lodLevel].Add(mr); maxCell.currentLod = -1; return; } bool flag; int num = base.AddCell <CombinedLODManager.Cell, CombinedLODManager.MaxCell>(ref this.cells, position, out flag); this.cells[num].box = new AABB3(this.cells[num].bounds.min, this.cells[num].bounds.max); this.cells[num].AddMeshRendererInternal(mr, position, lodLevel, lodLevels); }