< Summary

Class:DCL.ECSComponents.RaycastHitReflection
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/RaycastHit.gen.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:550
Line coverage:100% (4 of 4)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:2
Method coverage:100% (2 of 2)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
RaycastHitReflection()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/RaycastHit.gen.cs

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: decentraland/sdk/components/common/raycast_hit.proto
 4// </auto-generated>
 5#pragma warning disable 1591, 0612, 3021
 6#region Designer generated code
 7
 8using pb = global::Google.Protobuf;
 9using pbc = global::Google.Protobuf.Collections;
 10using pbr = global::Google.Protobuf.Reflection;
 11using scg = global::System.Collections.Generic;
 12namespace DCL.ECSComponents {
 13
 14  /// <summary>Holder for reflection information generated from decentraland/sdk/components/common/raycast_hit.proto</su
 15  public static partial class RaycastHitReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for decentraland/sdk/components/common/raycast_hit.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 120      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static RaycastHitReflection() {
 125      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "CjRkZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvY29tbW9uL3JheWNhc3Rf",
 28            "aGl0LnByb3RvEiJkZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMuY29tbW9u",
 29            "GiFkZWNlbnRyYWxhbmQvY29tbW9uL3ZlY3RvcnMucHJvdG8isAIKClJheWNh",
 30            "c3RIaXQSLgoIcG9zaXRpb24YASABKAsyHC5kZWNlbnRyYWxhbmQuY29tbW9u",
 31            "LlZlY3RvcjMSMwoNZ2xvYmFsX29yaWdpbhgCIAEoCzIcLmRlY2VudHJhbGFu",
 32            "ZC5jb21tb24uVmVjdG9yMxIvCglkaXJlY3Rpb24YAyABKAsyHC5kZWNlbnRy",
 33            "YWxhbmQuY29tbW9uLlZlY3RvcjMSMAoKbm9ybWFsX2hpdBgEIAEoCzIcLmRl",
 34            "Y2VudHJhbGFuZC5jb21tb24uVmVjdG9yMxIOCgZsZW5ndGgYBSABKAISFgoJ",
 35            "bWVzaF9uYW1lGAYgASgJSACIAQESFgoJZW50aXR5X2lkGAcgASgNSAGIAQFC",
 36            "DAoKX21lc2hfbmFtZUIMCgpfZW50aXR5X2lkQhSqAhFEQ0wuRUNTQ29tcG9u",
 37            "ZW50c2IGcHJvdG8z"));
 138      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 39          new pbr::FileDescriptor[] { global::Decentraland.Common.VectorsReflection.Descriptor, },
 40          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 41            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.RaycastHit), global::DCL.ECSComponents.Raycas
 42          }));
 143    }
 44    #endregion
 45
 46  }
 47  #region Messages
 48  /// <summary>
 49  /// RaycastHit contains information about the intersection of a ray with a mesh.
 50  /// </summary>
 51  public sealed partial class RaycastHit : pb::IMessage<RaycastHit>
 52  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 53      , pb::IBufferMessage
 54  #endif
 55  {
 56    private static readonly pb::MessageParser<RaycastHit> _parser = new pb::MessageParser<RaycastHit>(() => new RaycastH
 57    private pb::UnknownFieldSet _unknownFields;
 58    private int _hasBits0;
 59    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 60    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 61    public static pb::MessageParser<RaycastHit> Parser { get { return _parser; } }
 62
 63    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 64    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 65    public static pbr::MessageDescriptor Descriptor {
 66      get { return global::DCL.ECSComponents.RaycastHitReflection.Descriptor.MessageTypes[0]; }
 67    }
 68
 69    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 70    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 71    pbr::MessageDescriptor pb::IMessage.Descriptor {
 72      get { return Descriptor; }
 73    }
 74
 75    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 76    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 77    public RaycastHit() {
 78      OnConstruction();
 79    }
 80
 81    partial void OnConstruction();
 82
 83    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 84    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 85    public RaycastHit(RaycastHit other) : this() {
 86      _hasBits0 = other._hasBits0;
 87      position_ = other.position_ != null ? other.position_.Clone() : null;
 88      globalOrigin_ = other.globalOrigin_ != null ? other.globalOrigin_.Clone() : null;
 89      direction_ = other.direction_ != null ? other.direction_.Clone() : null;
 90      normalHit_ = other.normalHit_ != null ? other.normalHit_.Clone() : null;
 91      length_ = other.length_;
 92      meshName_ = other.meshName_;
 93      entityId_ = other.entityId_;
 94      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 95    }
 96
 97    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 98    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 99    public RaycastHit Clone() {
 100      return new RaycastHit(this);
 101    }
 102
 103    /// <summary>Field number for the "position" field.</summary>
 104    public const int PositionFieldNumber = 1;
 105    private global::Decentraland.Common.Vector3 position_;
 106    /// <summary>
 107    /// Position will be relative to the scene
 108    /// </summary>
 109    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 110    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 111    public global::Decentraland.Common.Vector3 Position {
 112      get { return position_; }
 113      set {
 114        position_ = value;
 115      }
 116    }
 117
 118    /// <summary>Field number for the "global_origin" field.</summary>
 119    public const int GlobalOriginFieldNumber = 2;
 120    private global::Decentraland.Common.Vector3 globalOrigin_;
 121    /// <summary>
 122    /// the starting point of the ray in global coordinates
 123    /// </summary>
 124    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 125    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 126    public global::Decentraland.Common.Vector3 GlobalOrigin {
 127      get { return globalOrigin_; }
 128      set {
 129        globalOrigin_ = value;
 130      }
 131    }
 132
 133    /// <summary>Field number for the "direction" field.</summary>
 134    public const int DirectionFieldNumber = 3;
 135    private global::Decentraland.Common.Vector3 direction_;
 136    /// <summary>
 137    /// the direction vector of the ray in global coordinates
 138    /// </summary>
 139    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 140    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 141    public global::Decentraland.Common.Vector3 Direction {
 142      get { return direction_; }
 143      set {
 144        direction_ = value;
 145      }
 146    }
 147
 148    /// <summary>Field number for the "normal_hit" field.</summary>
 149    public const int NormalHitFieldNumber = 4;
 150    private global::Decentraland.Common.Vector3 normalHit_;
 151    /// <summary>
 152    /// normal of the hit surface in global coordinates
 153    /// </summary>
 154    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 155    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 156    public global::Decentraland.Common.Vector3 NormalHit {
 157      get { return normalHit_; }
 158      set {
 159        normalHit_ = value;
 160      }
 161    }
 162
 163    /// <summary>Field number for the "length" field.</summary>
 164    public const int LengthFieldNumber = 5;
 165    private float length_;
 166    /// <summary>
 167    /// the distance between the ray origin and the hit position
 168    /// </summary>
 169    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 170    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 171    public float Length {
 172      get { return length_; }
 173      set {
 174        length_ = value;
 175      }
 176    }
 177
 178    /// <summary>Field number for the "mesh_name" field.</summary>
 179    public const int MeshNameFieldNumber = 6;
 180    private string meshName_;
 181    /// <summary>
 182    /// mesh name, if collision happened inside a GltfContainer
 183    /// </summary>
 184    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 185    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 186    public string MeshName {
 187      get { return meshName_ ?? ""; }
 188      set {
 189        meshName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 190      }
 191    }
 192    /// <summary>Gets whether the "mesh_name" field is set</summary>
 193    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 194    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 195    public bool HasMeshName {
 196      get { return meshName_ != null; }
 197    }
 198    /// <summary>Clears the value of the "mesh_name" field</summary>
 199    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 200    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 201    public void ClearMeshName() {
 202      meshName_ = null;
 203    }
 204
 205    /// <summary>Field number for the "entity_id" field.</summary>
 206    public const int EntityIdFieldNumber = 7;
 207    private uint entityId_;
 208    /// <summary>
 209    /// the ID of the Entity that has the impacted mesh attached
 210    /// </summary>
 211    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 212    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 213    public uint EntityId {
 214      get { if ((_hasBits0 & 1) != 0) { return entityId_; } else { return 0; } }
 215      set {
 216        _hasBits0 |= 1;
 217        entityId_ = value;
 218      }
 219    }
 220    /// <summary>Gets whether the "entity_id" field is set</summary>
 221    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 222    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 223    public bool HasEntityId {
 224      get { return (_hasBits0 & 1) != 0; }
 225    }
 226    /// <summary>Clears the value of the "entity_id" field</summary>
 227    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 228    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 229    public void ClearEntityId() {
 230      _hasBits0 &= ~1;
 231    }
 232
 233    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 234    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 235    public override bool Equals(object other) {
 236      return Equals(other as RaycastHit);
 237    }
 238
 239    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 240    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 241    public bool Equals(RaycastHit other) {
 242      if (ReferenceEquals(other, null)) {
 243        return false;
 244      }
 245      if (ReferenceEquals(other, this)) {
 246        return true;
 247      }
 248      if (!object.Equals(Position, other.Position)) return false;
 249      if (!object.Equals(GlobalOrigin, other.GlobalOrigin)) return false;
 250      if (!object.Equals(Direction, other.Direction)) return false;
 251      if (!object.Equals(NormalHit, other.NormalHit)) return false;
 252      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Length, other.Length)) return false;
 253      if (MeshName != other.MeshName) return false;
 254      if (EntityId != other.EntityId) return false;
 255      return Equals(_unknownFields, other._unknownFields);
 256    }
 257
 258    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 259    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 260    public override int GetHashCode() {
 261      int hash = 1;
 262      if (position_ != null) hash ^= Position.GetHashCode();
 263      if (globalOrigin_ != null) hash ^= GlobalOrigin.GetHashCode();
 264      if (direction_ != null) hash ^= Direction.GetHashCode();
 265      if (normalHit_ != null) hash ^= NormalHit.GetHashCode();
 266      if (Length != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Length);
 267      if (HasMeshName) hash ^= MeshName.GetHashCode();
 268      if (HasEntityId) hash ^= EntityId.GetHashCode();
 269      if (_unknownFields != null) {
 270        hash ^= _unknownFields.GetHashCode();
 271      }
 272      return hash;
 273    }
 274
 275    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 276    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 277    public override string ToString() {
 278      return pb::JsonFormatter.ToDiagnosticString(this);
 279    }
 280
 281    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 282    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 283    public void WriteTo(pb::CodedOutputStream output) {
 284    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 285      output.WriteRawMessage(this);
 286    #else
 287      if (position_ != null) {
 288        output.WriteRawTag(10);
 289        output.WriteMessage(Position);
 290      }
 291      if (globalOrigin_ != null) {
 292        output.WriteRawTag(18);
 293        output.WriteMessage(GlobalOrigin);
 294      }
 295      if (direction_ != null) {
 296        output.WriteRawTag(26);
 297        output.WriteMessage(Direction);
 298      }
 299      if (normalHit_ != null) {
 300        output.WriteRawTag(34);
 301        output.WriteMessage(NormalHit);
 302      }
 303      if (Length != 0F) {
 304        output.WriteRawTag(45);
 305        output.WriteFloat(Length);
 306      }
 307      if (HasMeshName) {
 308        output.WriteRawTag(50);
 309        output.WriteString(MeshName);
 310      }
 311      if (HasEntityId) {
 312        output.WriteRawTag(56);
 313        output.WriteUInt32(EntityId);
 314      }
 315      if (_unknownFields != null) {
 316        _unknownFields.WriteTo(output);
 317      }
 318    #endif
 319    }
 320
 321    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 322    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 323    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 324    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 325      if (position_ != null) {
 326        output.WriteRawTag(10);
 327        output.WriteMessage(Position);
 328      }
 329      if (globalOrigin_ != null) {
 330        output.WriteRawTag(18);
 331        output.WriteMessage(GlobalOrigin);
 332      }
 333      if (direction_ != null) {
 334        output.WriteRawTag(26);
 335        output.WriteMessage(Direction);
 336      }
 337      if (normalHit_ != null) {
 338        output.WriteRawTag(34);
 339        output.WriteMessage(NormalHit);
 340      }
 341      if (Length != 0F) {
 342        output.WriteRawTag(45);
 343        output.WriteFloat(Length);
 344      }
 345      if (HasMeshName) {
 346        output.WriteRawTag(50);
 347        output.WriteString(MeshName);
 348      }
 349      if (HasEntityId) {
 350        output.WriteRawTag(56);
 351        output.WriteUInt32(EntityId);
 352      }
 353      if (_unknownFields != null) {
 354        _unknownFields.WriteTo(ref output);
 355      }
 356    }
 357    #endif
 358
 359    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 360    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 361    public int CalculateSize() {
 362      int size = 0;
 363      if (position_ != null) {
 364        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Position);
 365      }
 366      if (globalOrigin_ != null) {
 367        size += 1 + pb::CodedOutputStream.ComputeMessageSize(GlobalOrigin);
 368      }
 369      if (direction_ != null) {
 370        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Direction);
 371      }
 372      if (normalHit_ != null) {
 373        size += 1 + pb::CodedOutputStream.ComputeMessageSize(NormalHit);
 374      }
 375      if (Length != 0F) {
 376        size += 1 + 4;
 377      }
 378      if (HasMeshName) {
 379        size += 1 + pb::CodedOutputStream.ComputeStringSize(MeshName);
 380      }
 381      if (HasEntityId) {
 382        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(EntityId);
 383      }
 384      if (_unknownFields != null) {
 385        size += _unknownFields.CalculateSize();
 386      }
 387      return size;
 388    }
 389
 390    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 391    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 392    public void MergeFrom(RaycastHit other) {
 393      if (other == null) {
 394        return;
 395      }
 396      if (other.position_ != null) {
 397        if (position_ == null) {
 398          Position = new global::Decentraland.Common.Vector3();
 399        }
 400        Position.MergeFrom(other.Position);
 401      }
 402      if (other.globalOrigin_ != null) {
 403        if (globalOrigin_ == null) {
 404          GlobalOrigin = new global::Decentraland.Common.Vector3();
 405        }
 406        GlobalOrigin.MergeFrom(other.GlobalOrigin);
 407      }
 408      if (other.direction_ != null) {
 409        if (direction_ == null) {
 410          Direction = new global::Decentraland.Common.Vector3();
 411        }
 412        Direction.MergeFrom(other.Direction);
 413      }
 414      if (other.normalHit_ != null) {
 415        if (normalHit_ == null) {
 416          NormalHit = new global::Decentraland.Common.Vector3();
 417        }
 418        NormalHit.MergeFrom(other.NormalHit);
 419      }
 420      if (other.Length != 0F) {
 421        Length = other.Length;
 422      }
 423      if (other.HasMeshName) {
 424        MeshName = other.MeshName;
 425      }
 426      if (other.HasEntityId) {
 427        EntityId = other.EntityId;
 428      }
 429      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 430    }
 431
 432    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 433    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 434    public void MergeFrom(pb::CodedInputStream input) {
 435    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 436      input.ReadRawMessage(this);
 437    #else
 438      uint tag;
 439      while ((tag = input.ReadTag()) != 0) {
 440        switch(tag) {
 441          default:
 442            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 443            break;
 444          case 10: {
 445            if (position_ == null) {
 446              Position = new global::Decentraland.Common.Vector3();
 447            }
 448            input.ReadMessage(Position);
 449            break;
 450          }
 451          case 18: {
 452            if (globalOrigin_ == null) {
 453              GlobalOrigin = new global::Decentraland.Common.Vector3();
 454            }
 455            input.ReadMessage(GlobalOrigin);
 456            break;
 457          }
 458          case 26: {
 459            if (direction_ == null) {
 460              Direction = new global::Decentraland.Common.Vector3();
 461            }
 462            input.ReadMessage(Direction);
 463            break;
 464          }
 465          case 34: {
 466            if (normalHit_ == null) {
 467              NormalHit = new global::Decentraland.Common.Vector3();
 468            }
 469            input.ReadMessage(NormalHit);
 470            break;
 471          }
 472          case 45: {
 473            Length = input.ReadFloat();
 474            break;
 475          }
 476          case 50: {
 477            MeshName = input.ReadString();
 478            break;
 479          }
 480          case 56: {
 481            EntityId = input.ReadUInt32();
 482            break;
 483          }
 484        }
 485      }
 486    #endif
 487    }
 488
 489    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 490    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 491    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 492    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 493      uint tag;
 494      while ((tag = input.ReadTag()) != 0) {
 495        switch(tag) {
 496          default:
 497            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 498            break;
 499          case 10: {
 500            if (position_ == null) {
 501              Position = new global::Decentraland.Common.Vector3();
 502            }
 503            input.ReadMessage(Position);
 504            break;
 505          }
 506          case 18: {
 507            if (globalOrigin_ == null) {
 508              GlobalOrigin = new global::Decentraland.Common.Vector3();
 509            }
 510            input.ReadMessage(GlobalOrigin);
 511            break;
 512          }
 513          case 26: {
 514            if (direction_ == null) {
 515              Direction = new global::Decentraland.Common.Vector3();
 516            }
 517            input.ReadMessage(Direction);
 518            break;
 519          }
 520          case 34: {
 521            if (normalHit_ == null) {
 522              NormalHit = new global::Decentraland.Common.Vector3();
 523            }
 524            input.ReadMessage(NormalHit);
 525            break;
 526          }
 527          case 45: {
 528            Length = input.ReadFloat();
 529            break;
 530          }
 531          case 50: {
 532            MeshName = input.ReadString();
 533            break;
 534          }
 535          case 56: {
 536            EntityId = input.ReadUInt32();
 537            break;
 538          }
 539        }
 540      }
 541    }
 542    #endif
 543
 544  }
 545
 546  #endregion
 547
 548}
 549
 550#endregion Designer generated code