예제 #1
0
        public override void Decompress(BinaryReaderEx reader, BinaryWriter writer, StreamElement element)
        {
            var decompressor = StreamDecompressors.GetUShortDecompressor(element.CompressionType);
            var val          = decompressor(reader);

            writer.Write(val);
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
            }
        }