public bool Equals(Vertex vertex, bool checkBones) { if (checkBones) { if (BoneWeights.Count != vertex.BoneWeights.Count) { return(false); } if (!BoneWeights.SequenceEqual(vertex.BoneWeights)) { return(false); } } return(Position.Equals(vertex.Position) && Normal.Equals(vertex.Normal) && TexCoord.Equals(vertex.TexCoord)); }
public bool Equals(Vertex other) { const float precision = 0.00001f; if (other == null) { return(false); } if (Influence != other.Influence) { return(false); } if (!Position.Equals(other.Position, precision)) { return(false); } if (!Normal.Equals(other.Normal, precision)) { return(false); } if (!Binormal.Equals(other.Binormal, precision)) { return(false); } if (!Tangent.Equals(other.Tangent, precision)) { return(false); } if (!Color.Equals(other.Color, precision)) { return(false); } if (!TexCoord.Equals(other.TexCoord, precision)) { return(false); } return(true); }
//public override bool Equals(object obj) //{ // return obj is Vertex vertex && // Position.Equals(vertex.Position) && // Normal.Equals(vertex.Normal) && // TexCoord.Equals(vertex.TexCoord); //} public bool Equals(Vertex vertex) { return(Position.Equals(vertex.Position) && Normal.Equals(vertex.Normal) && TexCoord.Equals(vertex.TexCoord)); }