Ejemplo n.º 1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    if (vector3_ == null)
                    {
                        vector3_ = new global::Ubii.DataStructure.Vector3();
                    }
                    input.ReadMessage(vector3_);
                    break;
                }

                case 18: {
                    if (quaternion_ == null)
                    {
                        quaternion_ = new global::Ubii.DataStructure.Quaternion();
                    }
                    input.ReadMessage(quaternion_);
                    break;
                }
                }
            }
        }
Ejemplo n.º 2
0
 public void MergeFrom(Object3D other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.pose_ != null)
     {
         if (pose_ == null)
         {
             Pose = new global::Ubii.DataStructure.Pose3D();
         }
         Pose.MergeFrom(other.Pose);
     }
     if (other.size_ != null)
     {
         if (size_ == null)
         {
             Size = new global::Ubii.DataStructure.Vector3();
         }
         Size.MergeFrom(other.Size);
     }
     if (other.UserDataJson.Length != 0)
     {
         UserDataJson = other.UserDataJson;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 3
0
        public void MergeFrom(Pose3D other)
        {
            if (other == null)
            {
                return;
            }
            if (other.position_ != null)
            {
                if (position_ == null)
                {
                    Position = new global::Ubii.DataStructure.Vector3();
                }
                Position.MergeFrom(other.Position);
            }
            switch (other.OrientationCase)
            {
            case OrientationOneofCase.Quaternion:
                if (Quaternion == null)
                {
                    Quaternion = new global::Ubii.DataStructure.Quaternion();
                }
                Quaternion.MergeFrom(other.Quaternion);
                break;

            case OrientationOneofCase.Euler:
                if (Euler == null)
                {
                    Euler = new global::Ubii.DataStructure.Vector3();
                }
                Euler.MergeFrom(other.Euler);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Ejemplo n.º 4
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    if (emg_ == null)
                    {
                        Emg = new global::Ubii.DataStructure.Vector8();
                    }
                    input.ReadMessage(Emg);
                    break;
                }

                case 18: {
                    if (orientation_ == null)
                    {
                        Orientation = new global::Ubii.DataStructure.Quaternion();
                    }
                    input.ReadMessage(Orientation);
                    break;
                }

                case 26: {
                    if (gyroscope_ == null)
                    {
                        Gyroscope = new global::Ubii.DataStructure.Vector3();
                    }
                    input.ReadMessage(Gyroscope);
                    break;
                }

                case 34: {
                    if (accelerometer_ == null)
                    {
                        Accelerometer = new global::Ubii.DataStructure.Vector3();
                    }
                    input.ReadMessage(Accelerometer);
                    break;
                }

                case 40: {
                    Gesture = (global::Ubii.DataStructure.HandGestureType)input.ReadEnum();
                    break;
                }
                }
            }
        }
Ejemplo n.º 5
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    if (position_ == null)
                    {
                        Position = new global::Ubii.DataStructure.Vector3();
                    }
                    input.ReadMessage(Position);
                    break;
                }

                case 18: {
                    global::Ubii.DataStructure.Quaternion subBuilder = new global::Ubii.DataStructure.Quaternion();
                    if (orientationCase_ == OrientationOneofCase.Quaternion)
                    {
                        subBuilder.MergeFrom(Quaternion);
                    }
                    input.ReadMessage(subBuilder);
                    Quaternion = subBuilder;
                    break;
                }

                case 26: {
                    global::Ubii.DataStructure.Vector3 subBuilder = new global::Ubii.DataStructure.Vector3();
                    if (orientationCase_ == OrientationOneofCase.Euler)
                    {
                        subBuilder.MergeFrom(Euler);
                    }
                    input.ReadMessage(subBuilder);
                    Euler = subBuilder;
                    break;
                }
                }
            }
        }
Ejemplo n.º 6
0
 public void MergeFrom(MyoEvent other)
 {
     if (other == null)
     {
         return;
     }
     if (other.emg_ != null)
     {
         if (emg_ == null)
         {
             Emg = new global::Ubii.DataStructure.Vector8();
         }
         Emg.MergeFrom(other.Emg);
     }
     if (other.orientation_ != null)
     {
         if (orientation_ == null)
         {
             Orientation = new global::Ubii.DataStructure.Quaternion();
         }
         Orientation.MergeFrom(other.Orientation);
     }
     if (other.gyroscope_ != null)
     {
         if (gyroscope_ == null)
         {
             Gyroscope = new global::Ubii.DataStructure.Vector3();
         }
         Gyroscope.MergeFrom(other.Gyroscope);
     }
     if (other.accelerometer_ != null)
     {
         if (accelerometer_ == null)
         {
             Accelerometer = new global::Ubii.DataStructure.Vector3();
         }
         Accelerometer.MergeFrom(other.Accelerometer);
     }
     if (other.Gesture != global::Ubii.DataStructure.HandGestureType.Rest)
     {
         Gesture = other.Gesture;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 7
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    Id = input.ReadString();
                    break;
                }

                case 18: {
                    if (pose_ == null)
                    {
                        Pose = new global::Ubii.DataStructure.Pose3D();
                    }
                    input.ReadMessage(Pose);
                    break;
                }

                case 26: {
                    if (size_ == null)
                    {
                        Size = new global::Ubii.DataStructure.Vector3();
                    }
                    input.ReadMessage(Size);
                    break;
                }

                case 34: {
                    UserDataJson = input.ReadString();
                    break;
                }
                }
            }
        }
Ejemplo n.º 8
0
 public void MergeFrom(Pose other)
 {
     if (other == null)
     {
         return;
     }
     if (other.vector3_ != null)
     {
         if (vector3_ == null)
         {
             vector3_ = new global::Ubii.DataStructure.Vector3();
         }
         Vector3.MergeFrom(other.Vector3);
     }
     if (other.quaternion_ != null)
     {
         if (quaternion_ == null)
         {
             quaternion_ = new global::Ubii.DataStructure.Quaternion();
         }
         Quaternion.MergeFrom(other.Quaternion);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 9
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    Topic = input.ReadString();
                    break;
                }

                case 17: {
                    Number = input.ReadDouble();
                    break;
                }

                case 24: {
                    Boolean = input.ReadBool();
                    break;
                }

                case 34: {
                    String = input.ReadString();
                    break;
                }

                case 42: {
                    global::Ubii.DataStructure.Vector2 subBuilder = new global::Ubii.DataStructure.Vector2();
                    if (typeCase_ == TypeOneofCase.Vector2)
                    {
                        subBuilder.MergeFrom(Vector2);
                    }
                    input.ReadMessage(subBuilder);
                    Vector2 = subBuilder;
                    break;
                }

                case 50: {
                    global::Ubii.DataStructure.Vector3 subBuilder = new global::Ubii.DataStructure.Vector3();
                    if (typeCase_ == TypeOneofCase.Vector3)
                    {
                        subBuilder.MergeFrom(Vector3);
                    }
                    input.ReadMessage(subBuilder);
                    Vector3 = subBuilder;
                    break;
                }

                case 58: {
                    global::Ubii.DataStructure.Vector4 subBuilder = new global::Ubii.DataStructure.Vector4();
                    if (typeCase_ == TypeOneofCase.Vector4)
                    {
                        subBuilder.MergeFrom(Vector4);
                    }
                    input.ReadMessage(subBuilder);
                    Vector4 = subBuilder;
                    break;
                }

                case 66: {
                    global::Ubii.DataStructure.Quaternion subBuilder = new global::Ubii.DataStructure.Quaternion();
                    if (typeCase_ == TypeOneofCase.Quaternion)
                    {
                        subBuilder.MergeFrom(Quaternion);
                    }
                    input.ReadMessage(subBuilder);
                    Quaternion = subBuilder;
                    break;
                }

                case 74: {
                    global::Ubii.DataStructure.Matrix3x2 subBuilder = new global::Ubii.DataStructure.Matrix3x2();
                    if (typeCase_ == TypeOneofCase.Matrix3X2)
                    {
                        subBuilder.MergeFrom(Matrix3X2);
                    }
                    input.ReadMessage(subBuilder);
                    Matrix3X2 = subBuilder;
                    break;
                }

                case 82: {
                    global::Ubii.DataStructure.Matrix4x4 subBuilder = new global::Ubii.DataStructure.Matrix4x4();
                    if (typeCase_ == TypeOneofCase.Matrix4X4)
                    {
                        subBuilder.MergeFrom(Matrix4X4);
                    }
                    input.ReadMessage(subBuilder);
                    Matrix4X4 = subBuilder;
                    break;
                }

                case 90: {
                    global::Ubii.DataStructure.Color subBuilder = new global::Ubii.DataStructure.Color();
                    if (typeCase_ == TypeOneofCase.Color)
                    {
                        subBuilder.MergeFrom(Color);
                    }
                    input.ReadMessage(subBuilder);
                    Color = subBuilder;
                    break;
                }
                }
            }
        }
Ejemplo n.º 10
0
        public void MergeFrom(TopicDataRecord other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Topic.Length != 0)
            {
                Topic = other.Topic;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.Number:
                Number = other.Number;
                break;

            case TypeOneofCase.Boolean:
                Boolean = other.Boolean;
                break;

            case TypeOneofCase.String:
                String = other.String;
                break;

            case TypeOneofCase.Vector2:
                if (Vector2 == null)
                {
                    Vector2 = new global::Ubii.DataStructure.Vector2();
                }
                Vector2.MergeFrom(other.Vector2);
                break;

            case TypeOneofCase.Vector3:
                if (Vector3 == null)
                {
                    Vector3 = new global::Ubii.DataStructure.Vector3();
                }
                Vector3.MergeFrom(other.Vector3);
                break;

            case TypeOneofCase.Vector4:
                if (Vector4 == null)
                {
                    Vector4 = new global::Ubii.DataStructure.Vector4();
                }
                Vector4.MergeFrom(other.Vector4);
                break;

            case TypeOneofCase.Quaternion:
                if (Quaternion == null)
                {
                    Quaternion = new global::Ubii.DataStructure.Quaternion();
                }
                Quaternion.MergeFrom(other.Quaternion);
                break;

            case TypeOneofCase.Matrix3X2:
                if (Matrix3X2 == null)
                {
                    Matrix3X2 = new global::Ubii.DataStructure.Matrix3x2();
                }
                Matrix3X2.MergeFrom(other.Matrix3X2);
                break;

            case TypeOneofCase.Matrix4X4:
                if (Matrix4X4 == null)
                {
                    Matrix4X4 = new global::Ubii.DataStructure.Matrix4x4();
                }
                Matrix4X4.MergeFrom(other.Matrix4X4);
                break;

            case TypeOneofCase.Color:
                if (Color == null)
                {
                    Color = new global::Ubii.DataStructure.Color();
                }
                Color.MergeFrom(other.Color);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }