Esempio n. 1
0
 static bool CompareModels(NJS_OBJECT model1, NJS_OBJECT model2)
 {
     if (model1.GetFlags() != model2.GetFlags())
     {
         return(false);
     }
     if (model1.Position.X != model2.Position.X)
     {
         return(false);
     }
     if (model1.Position.Y != model2.Position.Y)
     {
         return(false);
     }
     if (model1.Position.Z != model2.Position.Z)
     {
         return(false);
     }
     if (model1.Rotation.X != model2.Rotation.X)
     {
         return(false);
     }
     if (model1.Rotation.Y != model2.Rotation.Y)
     {
         return(false);
     }
     if (model1.Rotation.Z != model2.Rotation.Z)
     {
         return(false);
     }
     if (model1.Scale.X != model2.Scale.X)
     {
         return(false);
     }
     if (model1.Scale.Y != model2.Scale.Y)
     {
         return(false);
     }
     if (model1.Scale.Z != model2.Scale.Z)
     {
         return(false);
     }
     if (model1.CountAnimated() != model2.CountAnimated())
     {
         return(false);
     }
     if (model1.Attach != null && model2.Attach != null)
     {
         BasicAttach attach1 = (BasicAttach)model1.Attach;
         BasicAttach attach2 = (BasicAttach)model2.Attach;
         if (attach1.Material.Count != attach2.Material.Count)
         {
             return(false);
         }
         if (attach1.Vertex.Length != attach2.Vertex.Length)
         {
             return(false);
         }
         if (attach1.Normal.Length != attach2.Normal.Length)
         {
             return(false);
         }
         if (attach1.Mesh.Count != attach2.Mesh.Count)
         {
             return(false);
         }
     }
     return(true);
 }