public override int GetHashCode() { string hash = Position.GetHashCode() + ":" + Normal.GetHashCode() + ":" + Diffuse.GetHashCode() + ":" + UV.GetHashCode() + ":" + UV1.GetHashCode() + ":" + UV2.GetHashCode() + ":" + UV3.GetHashCode(); return(hash.GetHashCode()); }
public void Write(BinaryWriter writer) { Position.Write(writer); if (_withNormal) { Normal.Write(writer); } writer.Write(Diffuse); UV.Write(writer); if (_maxUV > 0) { UV1.Write(writer); } if (_maxUV > 1) { UV2.Write(writer); } if (_maxUV > 2) { UV3.Write(writer); } }
public void Read(BinaryReader reader, bool withNormal, int maxUV) { _withNormal = withNormal; _maxUV = maxUV; Position.Read(reader); if (_withNormal) { Normal.Read(reader); } Diffuse = reader.ReadInt32(); UV.Read(reader); if (_maxUV > 0) { UV1.Read(reader); } if (_maxUV > 1) { UV2.Read(reader); } if (_maxUV > 2) { UV3.Read(reader); } }