public StringDictionaryBuilder Clear() { Entries.Clear(); IndicesBuffer.Clear(); NullBitmap.Clear(); NextIndex = 0; return(this); }
public void Dispose() { VerticesBuffer.Dispose(); IndicesBuffer.Dispose(); VerticesBuffer = null; IndicesBuffer = null; }
public TBuilder Append(TFrom value) { var convertedVal = ConvertTo(value); var temp = new DictionaryEntry(convertedVal, Comparer, HashFunction); if (!Entries.TryGetValue(temp, out var index)) { index = NextIndex++; Entries.Add(temp, index); ValuesBuffer.Append(convertedVal); } IndicesBuffer.Append(index); return(Instance); }
public Cubo() { cantidadDeVertices = GetVertices().Length / 5; cantidadDeIndices = GetIndices().Length; bufferDeVertices = new VerticesBuffer(GetVertices(), GetVertices().Length *sizeof(float)); bufferDeIndices = new IndicesBuffer(GetIndices(), GetIndices().Length); SetShader(); textura = new Textura("d:/ginno/Documents/Visual Studio 2017/Projects/Tarea1Grafica/Tarea1Grafica/Recursos/wall.png"); textura.Use(); arregloDeVertices = new VerticesArreglo(); arregloDeVertices.enlazar(); bufferDeVertices.enlazar(); bufferDeIndices.enlazar(); arregloDeVertices.añadirBuffer(bufferDeVertices, shader); CalcularMatrizModelo(); }
/// <inheritdoc /> public StringDictionaryBuilder Append(string value) { if (value == null) { NullBitmap.Append(0); IndicesBuffer.Append(-1); // need something in the indices buffer to make sure it makes sense NullCount++; return(this); } var temp = new DictionaryEntry(value, Comparer, HashFunction); if (!Entries.TryGetValue(temp, out var index)) { index = NextIndex++; Entries.Add(temp, index); AppendStringToBuffer(value); } NullBitmap.Append(1); IndicesBuffer.Append(index); return(this); }
public void Rebuild() { VerticesBuffer.UpdateBuffer(vertices); IndicesBuffer.UpdateBuffer(indices); }
public override FloatDictionaryArray Build(MemoryAllocator allocator) { allocator = allocator ?? MemoryAllocator.Default.Value; return(new FloatDictionaryArray(IndicesBuffer.Length, ValuesBuffer.Length, IndicesBuffer.Build(allocator), ValuesBuffer.Build(allocator), ArrowBuffer.Empty)); }
public StringDictionaryBuilder Resize(int length) { IndicesBuffer.Reserve(length); return(this); }
public StringDictionaryBuilder Reserve(int capacity) { IndicesBuffer.Reserve(capacity); return(this); }
public StringDictionaryArray Build(MemoryAllocator allocator) { ValueOffsets.Append(Offset); return(new StringDictionaryArray(IndicesBuffer.Length, Entries.Count, NullBitmap.Build(allocator), IndicesBuffer.Build(allocator), ValueBuffer.Build(allocator), ValueOffsets.Build(allocator), NullCount)); }