/// <summary> /// Hash code for the object. /// </summary> public override int GetHashCode() { int hash = Part.GetHashCode() ^ port.GetHashCode(); if (shield != null) { hash ^= shield.GetHashCode(); } return(hash); }
/// <summary> /// Hash the docking ports. /// </summary> public override int GetHashCode() { int hash = part.GetHashCode() ^ port.GetHashCode(); if (shield != null) { hash ^= shield.GetHashCode(); } if (portNameModule != null) { hash ^= portNameModule.GetHashCode(); } if (portNameField != null) { hash ^= portNameField.GetHashCode(); } return(hash); }
/// <summary> /// Hash code for the object. /// </summary> public override int GetHashCode() { var hash = type.GetHashCode(); if (body != null) { hash ^= body.name.GetHashCode(); } hash ^= vesselId.GetHashCode(); if (node != null) { hash ^= node.GetHashCode(); } hash ^= partId.GetHashCode(); if (dockingPort != null) { hash ^= dockingPort.GetHashCode(); } if (thruster != null) { hash ^= thruster.GetHashCode(); } if (parent != null) { hash ^= parent.GetHashCode(); } if (type == ReferenceFrameType.Relative) { hash ^= relativePosition.GetHashCode(); hash ^= relativeRotation.GetHashCode(); hash ^= relativeVelocity.GetHashCode(); hash ^= relativeAngularVelocity.GetHashCode(); } if (type == ReferenceFrameType.Hybrid) { hash ^= hybridPosition.GetHashCode(); hash ^= hybridRotation.GetHashCode(); hash ^= hybridVelocity.GetHashCode(); hash ^= hybridAngularVelocity.GetHashCode(); } return(hash); }
/// <summary> /// Hash the reference frame. /// </summary> public override int GetHashCode() { var hash = type.GetHashCode(); if (body != null) { hash ^= body.name.GetHashCode(); } hash ^= vesselId.GetHashCode(); if (node != null) { hash ^= node.GetHashCode(); } hash ^= partId.GetHashCode(); if (dockingPort != null) { hash ^= dockingPort.GetHashCode(); } return(hash); }