Example #1
0
 //该函数还要补充模型动作与镜头动作的判断
 public void ParseVMDHeader()
 {
     if (stream == null)
     {
         return;
     }
     mVmdHeader = new VMD_HEADER();
     Byte[] buffer = new byte[Marshal.SizeOf(typeof(VMD_HEADER))];
     stream.Read(buffer, 0, buffer.Length);
     mVmdHeader = (VMD_HEADER)RawDeserialize(buffer, typeof(VMD_HEADER));
     if (CompareTwoBytes(mVmdHeader.VmdModelName, mVmdModelName [0]))
     {
         Console.Write("加载的是模型的动作文件,请更换为镜头动作");
         stream = null;
     }
 }
Example #2
0
 public VMD()
 {
     clsHeader         = new VMD_HEADER();
     uiMotionCount     = 0;
     clsMotion         = null;
     uiSkinCount       = 0;
     clsSkin           = null;
     uiCameraCount     = 0;
     clsCamera         = null;
     uiLightCount      = 0;
     clsLight          = null;
     uiSelfShadowCount = 0;
     clsSelfShadow     = null;
     uiShowIKCount     = 0;
     clsShowIK         = null;
 }