< Summary

Class:DCL.ECSComponents.PBRaycastResult
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/RaycastResult.gen.cs
Covered lines:19
Uncovered lines:100
Coverable lines:119
Total lines:432
Line coverage:15.9% (19 of 119)
Covered branches:0
Total branches:0
Covered methods:11
Total methods:26
Method coverage:42.3% (11 of 26)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBRaycastResult()0%110100%
get_Descriptor()0%2100%
PBRaycastResult(...)0%30500%
Clone()0%2100%
ClearTimestamp()0%2100%
PBRaycastResult()0%110100%
Equals(...)0%2100%
Equals(...)0%72800%
GetHashCode()0%42600%
ToString()0%2100%
WriteTo(...)0%42600%
CalculateSize()0%42600%
MergeFrom(...)0%72800%
MergeFrom(...)0%1101000%

File(s)

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

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: decentraland/sdk/components/raycast_result.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/raycast_result.proto</summar
 15  public static partial class RaycastResultReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for decentraland/sdk/components/raycast_result.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static RaycastResultReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "CjBkZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvcmF5Y2FzdF9yZXN1bHQu",
 28            "cHJvdG8SG2RlY2VudHJhbGFuZC5zZGsuY29tcG9uZW50cxohZGVjZW50cmFs",
 29            "YW5kL2NvbW1vbi92ZWN0b3JzLnByb3RvGjRkZWNlbnRyYWxhbmQvc2RrL2Nv",
 30            "bXBvbmVudHMvY29tbW9uL3JheWNhc3RfaGl0LnByb3RvIvABCg9QQlJheWNh",
 31            "c3RSZXN1bHQSFgoJdGltZXN0YW1wGAEgASgNSACIAQESMwoNZ2xvYmFsX29y",
 32            "aWdpbhgCIAEoCzIcLmRlY2VudHJhbGFuZC5jb21tb24uVmVjdG9yMxIvCglk",
 33            "aXJlY3Rpb24YAyABKAsyHC5kZWNlbnRyYWxhbmQuY29tbW9uLlZlY3RvcjMS",
 34            "PAoEaGl0cxgEIAMoCzIuLmRlY2VudHJhbGFuZC5zZGsuY29tcG9uZW50cy5j",
 35            "b21tb24uUmF5Y2FzdEhpdBITCgt0aWNrX251bWJlchgFIAEoDUIMCgpfdGlt",
 36            "ZXN0YW1wQhSqAhFEQ0wuRUNTQ29tcG9uZW50c2IGcHJvdG8z"));
 37      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 38          new pbr::FileDescriptor[] { global::Decentraland.Common.VectorsReflection.Descriptor, global::DCL.ECSComponent
 39          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 40            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBRaycastResult), global::DCL.ECSComponents.P
 41          }));
 42    }
 43    #endregion
 44
 45  }
 46  #region Messages
 47  /// <summary>
 48  /// The PBRaycast component and PBRaycastResult are defined in https://adr.decentraland.org/adr/ADR-200
 49  ///
 50  /// The RaycastResult component is added to an Entity when the results of a previously attached
 51  /// Raycast component are available. It contains information about the ray and any objects it
 52  /// collided with.
 53  /// </summary>
 54  public sealed partial class PBRaycastResult : pb::IMessage<PBRaycastResult>
 55  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 56      , pb::IBufferMessage
 57  #endif
 58  {
 159    private static readonly pb::MessageParser<PBRaycastResult> _parser = new pb::MessageParser<PBRaycastResult>(() => ne
 60    private pb::UnknownFieldSet _unknownFields;
 61    private int _hasBits0;
 62    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 63    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 064    public static pb::MessageParser<PBRaycastResult> Parser { get { return _parser; } }
 65
 66    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 67    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 68    public static pbr::MessageDescriptor Descriptor {
 069      get { return global::DCL.ECSComponents.RaycastResultReflection.Descriptor.MessageTypes[0]; }
 70    }
 71
 72    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 73    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 74    pbr::MessageDescriptor pb::IMessage.Descriptor {
 075      get { return Descriptor; }
 76    }
 77
 78    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 79    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 3080    public PBRaycastResult() {
 81      OnConstruction();
 3082    }
 83
 84    partial void OnConstruction();
 85
 86    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 87    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 088    public PBRaycastResult(PBRaycastResult other) : this() {
 089      _hasBits0 = other._hasBits0;
 090      timestamp_ = other.timestamp_;
 091      globalOrigin_ = other.globalOrigin_ != null ? other.globalOrigin_.Clone() : null;
 092      direction_ = other.direction_ != null ? other.direction_.Clone() : null;
 093      hits_ = other.hits_.Clone();
 094      tickNumber_ = other.tickNumber_;
 095      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 096    }
 97
 98    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 99    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 100    public PBRaycastResult Clone() {
 0101      return new PBRaycastResult(this);
 102    }
 103
 104    /// <summary>Field number for the "timestamp" field.</summary>
 105    public const int TimestampFieldNumber = 1;
 106    private uint timestamp_;
 107    /// <summary>
 108    /// timestamp is a correlation id, copied from the PBRaycast
 109    /// </summary>
 110    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 111    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 112    public uint Timestamp {
 10113      get { if ((_hasBits0 & 1) != 0) { return timestamp_; } else { return 0; } }
 114      set {
 30115        _hasBits0 |= 1;
 30116        timestamp_ = value;
 30117      }
 118    }
 119    /// <summary>Gets whether the "timestamp" field is set</summary>
 120    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 121    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 122    public bool HasTimestamp {
 0123      get { return (_hasBits0 & 1) != 0; }
 124    }
 125    /// <summary>Clears the value of the "timestamp" field</summary>
 126    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 127    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 128    public void ClearTimestamp() {
 0129      _hasBits0 &= ~1;
 0130    }
 131
 132    /// <summary>Field number for the "global_origin" field.</summary>
 133    public const int GlobalOriginFieldNumber = 2;
 134    private global::Decentraland.Common.Vector3 globalOrigin_;
 135    /// <summary>
 136    /// the starting point of the ray in global coordinates
 137    /// </summary>
 138    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 139    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 140    public global::Decentraland.Common.Vector3 GlobalOrigin {
 40141      get { return globalOrigin_; }
 142      set {
 30143        globalOrigin_ = value;
 30144      }
 145    }
 146
 147    /// <summary>Field number for the "direction" field.</summary>
 148    public const int DirectionFieldNumber = 3;
 149    private global::Decentraland.Common.Vector3 direction_;
 150    /// <summary>
 151    /// the direction vector of the ray in global coordinates
 152    /// </summary>
 153    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 154    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 155    public global::Decentraland.Common.Vector3 Direction {
 20156      get { return direction_; }
 157      set {
 30158        direction_ = value;
 30159      }
 160    }
 161
 162    /// <summary>Field number for the "hits" field.</summary>
 163    public const int HitsFieldNumber = 4;
 1164    private static readonly pb::FieldCodec<global::DCL.ECSComponents.RaycastHit> _repeated_hits_codec
 165        = pb::FieldCodec.ForMessage(34, global::DCL.ECSComponents.RaycastHit.Parser);
 30166    private readonly pbc::RepeatedField<global::DCL.ECSComponents.RaycastHit> hits_ = new pbc::RepeatedField<global::DCL
 167    /// <summary>
 168    /// zero or more hits
 169    /// </summary>
 170    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 171    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 172    public pbc::RepeatedField<global::DCL.ECSComponents.RaycastHit> Hits {
 39173      get { return hits_; }
 174    }
 175
 176    /// <summary>Field number for the "tick_number" field.</summary>
 177    public const int TickNumberFieldNumber = 5;
 178    private uint tickNumber_;
 179    /// <summary>
 180    /// number of tick in which the event was produced, equals to EngineInfo.tick_number
 181    /// </summary>
 182    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 183    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 184    public uint TickNumber {
 1185      get { return tickNumber_; }
 186      set {
 30187        tickNumber_ = value;
 30188      }
 189    }
 190
 191    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 192    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 193    public override bool Equals(object other) {
 0194      return Equals(other as PBRaycastResult);
 195    }
 196
 197    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 198    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 199    public bool Equals(PBRaycastResult other) {
 0200      if (ReferenceEquals(other, null)) {
 0201        return false;
 202      }
 0203      if (ReferenceEquals(other, this)) {
 0204        return true;
 205      }
 0206      if (Timestamp != other.Timestamp) return false;
 0207      if (!object.Equals(GlobalOrigin, other.GlobalOrigin)) return false;
 0208      if (!object.Equals(Direction, other.Direction)) return false;
 0209      if(!hits_.Equals(other.hits_)) return false;
 0210      if (TickNumber != other.TickNumber) return false;
 0211      return Equals(_unknownFields, other._unknownFields);
 212    }
 213
 214    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 215    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 216    public override int GetHashCode() {
 0217      int hash = 1;
 0218      if (HasTimestamp) hash ^= Timestamp.GetHashCode();
 0219      if (globalOrigin_ != null) hash ^= GlobalOrigin.GetHashCode();
 0220      if (direction_ != null) hash ^= Direction.GetHashCode();
 0221      hash ^= hits_.GetHashCode();
 0222      if (TickNumber != 0) hash ^= TickNumber.GetHashCode();
 0223      if (_unknownFields != null) {
 0224        hash ^= _unknownFields.GetHashCode();
 225      }
 0226      return hash;
 227    }
 228
 229    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 230    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 231    public override string ToString() {
 0232      return pb::JsonFormatter.ToDiagnosticString(this);
 233    }
 234
 235    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 236    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 237    public void WriteTo(pb::CodedOutputStream output) {
 238    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 239      output.WriteRawMessage(this);
 240    #else
 0241      if (HasTimestamp) {
 0242        output.WriteRawTag(8);
 0243        output.WriteUInt32(Timestamp);
 244      }
 0245      if (globalOrigin_ != null) {
 0246        output.WriteRawTag(18);
 0247        output.WriteMessage(GlobalOrigin);
 248      }
 0249      if (direction_ != null) {
 0250        output.WriteRawTag(26);
 0251        output.WriteMessage(Direction);
 252      }
 0253      hits_.WriteTo(output, _repeated_hits_codec);
 0254      if (TickNumber != 0) {
 0255        output.WriteRawTag(40);
 0256        output.WriteUInt32(TickNumber);
 257      }
 0258      if (_unknownFields != null) {
 0259        _unknownFields.WriteTo(output);
 260      }
 261    #endif
 0262    }
 263
 264    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 265    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 266    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 267    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 268      if (HasTimestamp) {
 269        output.WriteRawTag(8);
 270        output.WriteUInt32(Timestamp);
 271      }
 272      if (globalOrigin_ != null) {
 273        output.WriteRawTag(18);
 274        output.WriteMessage(GlobalOrigin);
 275      }
 276      if (direction_ != null) {
 277        output.WriteRawTag(26);
 278        output.WriteMessage(Direction);
 279      }
 280      hits_.WriteTo(ref output, _repeated_hits_codec);
 281      if (TickNumber != 0) {
 282        output.WriteRawTag(40);
 283        output.WriteUInt32(TickNumber);
 284      }
 285      if (_unknownFields != null) {
 286        _unknownFields.WriteTo(ref output);
 287      }
 288    }
 289    #endif
 290
 291    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 292    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 293    public int CalculateSize() {
 0294      int size = 0;
 0295      if (HasTimestamp) {
 0296        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Timestamp);
 297      }
 0298      if (globalOrigin_ != null) {
 0299        size += 1 + pb::CodedOutputStream.ComputeMessageSize(GlobalOrigin);
 300      }
 0301      if (direction_ != null) {
 0302        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Direction);
 303      }
 0304      size += hits_.CalculateSize(_repeated_hits_codec);
 0305      if (TickNumber != 0) {
 0306        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TickNumber);
 307      }
 0308      if (_unknownFields != null) {
 0309        size += _unknownFields.CalculateSize();
 310      }
 0311      return size;
 312    }
 313
 314    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 315    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 316    public void MergeFrom(PBRaycastResult other) {
 0317      if (other == null) {
 0318        return;
 319      }
 0320      if (other.HasTimestamp) {
 0321        Timestamp = other.Timestamp;
 322      }
 0323      if (other.globalOrigin_ != null) {
 0324        if (globalOrigin_ == null) {
 0325          GlobalOrigin = new global::Decentraland.Common.Vector3();
 326        }
 0327        GlobalOrigin.MergeFrom(other.GlobalOrigin);
 328      }
 0329      if (other.direction_ != null) {
 0330        if (direction_ == null) {
 0331          Direction = new global::Decentraland.Common.Vector3();
 332        }
 0333        Direction.MergeFrom(other.Direction);
 334      }
 0335      hits_.Add(other.hits_);
 0336      if (other.TickNumber != 0) {
 0337        TickNumber = other.TickNumber;
 338      }
 0339      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0340    }
 341
 342    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 343    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 344    public void MergeFrom(pb::CodedInputStream input) {
 345    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 346      input.ReadRawMessage(this);
 347    #else
 348      uint tag;
 0349      while ((tag = input.ReadTag()) != 0) {
 350        switch(tag) {
 351          default:
 0352            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0353            break;
 354          case 8: {
 0355            Timestamp = input.ReadUInt32();
 0356            break;
 357          }
 358          case 18: {
 0359            if (globalOrigin_ == null) {
 0360              GlobalOrigin = new global::Decentraland.Common.Vector3();
 361            }
 0362            input.ReadMessage(GlobalOrigin);
 0363            break;
 364          }
 365          case 26: {
 0366            if (direction_ == null) {
 0367              Direction = new global::Decentraland.Common.Vector3();
 368            }
 0369            input.ReadMessage(Direction);
 0370            break;
 371          }
 372          case 34: {
 0373            hits_.AddEntriesFrom(input, _repeated_hits_codec);
 0374            break;
 375          }
 376          case 40: {
 0377            TickNumber = input.ReadUInt32();
 378            break;
 379          }
 380        }
 381      }
 382    #endif
 0383    }
 384
 385    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 386    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 387    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 388    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 389      uint tag;
 390      while ((tag = input.ReadTag()) != 0) {
 391        switch(tag) {
 392          default:
 393            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 394            break;
 395          case 8: {
 396            Timestamp = input.ReadUInt32();
 397            break;
 398          }
 399          case 18: {
 400            if (globalOrigin_ == null) {
 401              GlobalOrigin = new global::Decentraland.Common.Vector3();
 402            }
 403            input.ReadMessage(GlobalOrigin);
 404            break;
 405          }
 406          case 26: {
 407            if (direction_ == null) {
 408              Direction = new global::Decentraland.Common.Vector3();
 409            }
 410            input.ReadMessage(Direction);
 411            break;
 412          }
 413          case 34: {
 414            hits_.AddEntriesFrom(ref input, _repeated_hits_codec);
 415            break;
 416          }
 417          case 40: {
 418            TickNumber = input.ReadUInt32();
 419            break;
 420          }
 421        }
 422      }
 423    }
 424    #endif
 425
 426  }
 427
 428  #endregion
 429
 430}
 431
 432#endregion Designer generated code