示例#1
0
 public MdlxParser(Mdlx mdlx)
 {
     if (IsEntity(mdlx))
     {
         MeshDescriptors = new Kkdf2MdlxParser(mdlx.SubModels.First())
                           .ProcessVerticesAndBuildModel(
             MdlxMatrixUtil.BuildTPoseMatrices(mdlx.SubModels.First(), Matrix4x4.Identity)
             );
     }
     else if (IsMap(mdlx))
     {
         MeshDescriptors = mdlx.MapModel.VifPackets
                           .Select(vifPacket => Parse(vifPacket))
                           .ToList();
     }
 }
示例#2
0
 public MdlxParser(Mdlx mdlx)
 {
     if (IsEntity(mdlx))
     {
         InitialPose     = BuildTPoseMatrices(mdlx.SubModels.First(), Matrix4x4.Identity);
         Bones           = mdlx.SubModels.First().Bones;
         _parsedModel    = new Kkdf2MdlxParser(mdlx.SubModels.First());
         MeshDescriptors = _parsedModel.ProcessVerticesAndBuildModel(InitialPose);
     }
     else if (IsMap(mdlx))
     {
         MeshDescriptors = mdlx.MapModel.VifPackets
                           .Select(vifPacket => Parse(vifPacket))
                           .ToList();
     }
 }