Пример #1
0
 public void MergeFrom(PointData other)
 {
     if (other == null)
     {
         return;
     }
     if (other.LaserId != 0)
     {
         LaserId = other.LaserId;
     }
     if (other.coordinate_ != null)
     {
         if (coordinate_ == null)
         {
             coordinate_ = new global::LiDarPointPack.Vector3();
         }
         Coordinate.MergeFrom(other.Coordinate);
     }
     if (other.Radius != 0F)
     {
         Radius = other.Radius;
     }
     if (other.Inclination != 0F)
     {
         Inclination = other.Inclination;
     }
     if (other.Azimuth != 0F)
     {
         Azimuth = other.Azimuth;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Пример #2
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 8: {
                    LaserId = input.ReadInt32();
                    break;
                }

                case 18: {
                    if (coordinate_ == null)
                    {
                        coordinate_ = new global::LiDarPointPack.Vector3();
                    }
                    input.ReadMessage(coordinate_);
                    break;
                }

                case 29: {
                    Radius = input.ReadFloat();
                    break;
                }

                case 37: {
                    Inclination = input.ReadFloat();
                    break;
                }

                case 45: {
                    Azimuth = input.ReadFloat();
                    break;
                }
                }
            }
        }