#if (UNITY_EDITOR) using System; using UnityEngine; namespace ECE { /// /// A vertex represented by the transform it's attached to and it's local position. /// [System.Serializable] public class EasyColliderVertex : IEquatable { /// /// Local position of the vertex on the transform. /// public Vector3 LocalPosition; /// /// Transform the vertex comes from. /// public Transform T; /// /// Create a new Easy Collider Vertex /// /// Transform the vertex is on /// Local position of the vertex public EasyColliderVertex(Transform transform, Vector3 localPosition) { this.T = transform; this.LocalPosition = localPosition; } public bool Equals(EasyColliderVertex other) { return (other.LocalPosition == this.LocalPosition && other.T == this.T); } public override int GetHashCode() { int hashCode = 13 * 31 + LocalPosition.GetHashCode(); return hashCode * 31 + T.GetHashCode(); } } } #endif