public void AllocateBuffers(int trianglesNum) { if (lsHash == null) { // MeshUtils.Log("Allocating contour: " + trianglesNum); midPoints = new ArrayDictionary <MidPoint>(trianglesNum * 2); contour = new List <Dictionary <HashType, int> >(); lsHash = new LSHash(0.001f, trianglesNum * 2); } else { lsHash.Clear(); foreach (var item in contour) { item.Clear(); } contour.Clear(); if (midPoints.Size < trianglesNum * 2) { // MeshUtils.Log("Re-allocating midPoint: " + trianglesNum); midPoints = new ArrayDictionary <MidPoint>(trianglesNum * 2); } else { midPoints.Clear(); } } }
// Token: 0x0600428E RID: 17038 RVA: 0x001521EC File Offset: 0x001505EC public bool TryGetValue(int key, out T value) { ArrayDictionary <T> .DicItem dicItem = this.dictionary[key]; if (dicItem.valid) { value = dicItem.data; return(true); } value = default(T); return(false); }
// Token: 0x0600428F RID: 17039 RVA: 0x00152238 File Offset: 0x00150638 public T GetFirstValue() { for (int i = 0; i < this.Size; i++) { ArrayDictionary <T> .DicItem dicItem = this.dictionary[i]; if (dicItem.valid) { return(dicItem.data); } } return(default(T)); }