Exemplo n.º 1
0
        private FRepMovement AsRepMovement()
        {
            _reader.Reset();

            var repMovement = _reader.SerializeRepMovement();

            if (_reader.IsError || !_reader.AtEnd())
            {
                return(default);
        public void RepMovementTest(byte[] rawData, int bitCount,
                                    VectorQuantization locationQuantizationLevel  = VectorQuantization.RoundTwoDecimals,
                                    RotatorQuantization rotationQuantizationLevel = RotatorQuantization.ByteComponents,
                                    VectorQuantization velocityQuantizationLevel  = VectorQuantization.RoundWholeNumber)
        {
            var reader = new NetBitReader(rawData, bitCount);

            reader.SerializeRepMovement(locationQuantizationLevel, rotationQuantizationLevel, velocityQuantizationLevel);
            Assert.False(reader.IsError);
            Assert.True(reader.AtEnd());
        }
Exemplo n.º 3
0
        public void RepMovementTest()
        {
            byte[] rawData =
            {
                0x50, 0x76, 0x07, 0x4F, 0xEB, 0xB0, 0x7F, 0x90, 0x01, 0xDD, 0x81, 0x0F,
                0xE2, 0x0E, 0x20
            };
            var reader = new NetBitReader(rawData, 79);

            reader.SerializeRepMovement();
            Assert.True(reader.AtEnd());
        }
Exemplo n.º 4
0
        private FRepMovement AsFRepMovement(VectorQuantization vectorQuantization)
        {
            _reader.Reset();

            FRepMovement movement = _reader.SerializeRepMovement(vectorQuantization);

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

            return(movement);
        }
Exemplo n.º 5
0
        private FRepMovement AsRepMovement()
        {
            _reader.Reset();

            FRepMovement repMovement = _reader.SerializeRepMovement();

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

            return(repMovement);
        }