Exemple #1
0
 private static SubMesh[] GetSubMeshes(IExportContainer container, Mesh origin, Mesh instance)
 {
     if (Mesh.HasLODData(container.Version))
     {
         return(LODConverter.GenerateSubMeshes(container, instance, ref origin.LODData[0]));
     }
     else
     {
         return(SubMeshConverter.Convert(container, instance, origin.SubMeshes));
     }
 }
Exemple #2
0
 private static byte[] GetIndexBuffer(IExportContainer container, Mesh origin)
 {
     if (Mesh.HasLODData(container.Version))
     {
         return(LODConverter.GenerateIndexBuffer(container, ref origin.LODData[0]));
     }
     else
     {
         if (container.Platform == container.ExportPlatform ||
             container.Platform != Platform.XBox360 && container.ExportPlatform != Platform.XBox360)
         {
             return(origin.IndexBuffer.ToArray());
         }
         else
         {
             AlignType align = GetUse16bitIndices(container, origin) == 0 ? AlignType.Align4 : AlignType.Align2;
             return(origin.IndexBuffer.SwapBytes(align));
         }
     }
 }