public override void Decompress(BinaryReaderEx reader, BinaryWriter writer, StreamElement element) { var decompressor = StreamDecompressors.GetUShortDecompressor(element.CompressionType); var val = decompressor(reader); writer.Write(val); }
public override void Decompress(BinaryReaderEx reader, BinaryWriter writer, StreamElement element) { var decompressor = StreamDecompressors.GetIntDecompressor(element.CompressionType); int count = Math.Min(StreamDataType.MaxBonesPerVert, element.NumElements); for (var i = 0; i < count; i++) { var val = decompressor(reader); writer.Write(val); } }
public override void Decompress(BinaryReaderEx reader, BinaryWriter writer, StreamElement element) { FloatStreamDecompressor decompressor = StreamDecompressors.GetFloatDecompressor(element.CompressionType); float x = decompressor(reader); float y = decompressor(reader); float z = decompressor(reader); writer.Write(x); writer.Write(y); writer.Write(z); }
public virtual void Decompress(BinaryReaderEx reader, BinaryWriter writer, StreamElement element) { int count = Math.Min(this.NumValues, element.NumElements); FloatStreamDecompressor decompressor = StreamDecompressors.GetFloatDecompressor(element.CompressionType); for (var i = 0; i < count; i++) { float val = decompressor(reader); writer.Write(val); } }