Ejemplo n.º 1
0
        public override int GetHashCode()
        {
            string hash = Position.GetHashCode() + ":" + Normal.GetHashCode() + ":" +
                          Diffuse.GetHashCode() + ":" + UV.GetHashCode() + ":" + UV1.GetHashCode() + ":" +
                          UV2.GetHashCode() + ":" + UV3.GetHashCode();

            return(hash.GetHashCode());
        }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
 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);
     }
 }