コード例 #1
0
        /// <summary>
        /// Checks to see if the given <see cref="SurfaceData"/> is equal to <see cref="this"/>.
        /// </summary>
        /// <param name="other">The instance to check equality with.</param>
        /// <returns>Whether the two instances are equal.</returns>
        public virtual bool Equals(SurfaceData other)
        {
            if (other == null || !GetType().Equals(other.GetType()))
            {
                return(false);
            }

            return(base.Equals(other) &&
                   Origin.ApproxEquals(other.Origin) &&
                   Direction.ApproxEquals(other.Direction) &&
                   CollisionData.Equals(other.CollisionData) &&
                   PreviousCollisionData.Equals(other.PreviousCollisionData));
        }