Exemplo n.º 1
0
        private FVector AsVector(VectorType type)
        {
            _reader.Reset();

            FVector tVector = null;

            switch (type)
            {
            case VectorType.Normal:
                tVector = _reader.SerializePropertyVectorNormal();
                break;

            case VectorType.Vector10:
                tVector = _reader.SerializePropertyVector10();
                break;

            case VectorType.Vector100:
                tVector = _reader.SerializePropertyVector100();
                break;

            case VectorType.Quantize:
                tVector = _reader.SerializePropertyQuantizedVector();
                break;
            }

            if (_reader.IsError || !_reader.AtEnd())
            {
                return(null);
            }

            return(tVector);
        }
Exemplo n.º 2
0
        private FVector AsVector(VectorType type)
        {
            _reader.Reset();

            FVector tVector = type switch
            {
                VectorType.Normal => _reader.SerializePropertyVectorNormal(),
                VectorType.Vector10 => _reader.SerializePropertyVector10(),
                VectorType.Vector100 => _reader.SerializePropertyVector100(),
                VectorType.Quantize => _reader.SerializePropertyQuantizedVector(),
                _ => null
            };

            if (_reader.IsError || !_reader.AtEnd())
            {
                return(null);
            }

            return(tVector);
        }