Esempio n. 1
0
        internal static RigidBodyList GetRigidBodyList(Stream fs, Header header)
        {
            RigidBodyList data = new RigidBodyList();

            data.RigidBodies    = new List <RigidBodyData>();
            data.RigidBodyCount = ParserHelper.getInt(fs);
            for (int i = 0; i < data.RigidBodyCount; i++)
            {
                data.RigidBodies.Add(RigidBodyData.GetRigidBodyData(fs, header));
            }
            return(data);
        }
Esempio n. 2
0
        /// <summary>
        /// read model data to ModelData class
        /// </summary>
        /// <param name="fs"></param>
        /// <returns></returns>
        public static ModelData GetModel(FileStream fs)
        {
            ModelData model = new ModelData();

            model.Header        = Header.getHeader(fs);
            model.ModelInfo     = ModelInfo.getModelInfo(fs, model.Header);
            model.VertexList    = VertexList.getVertexList(fs, model.Header);
            model.SurfaceList   = SurfaceList.getSurfaceList(fs, model.Header);
            model.TextureList   = TextureList.getTextureList(fs, model.Header);
            model.MaterialList  = MaterialList.getMaterialList(fs, model.Header);
            model.BoneList      = BoneList.getBoneList(fs, model.Header);
            model.MorphList     = MorphList.getMorphList(fs, model.Header);
            model.ShowFrameList = ShowFrameList.getShowFrameList(fs, model.Header);
            model.RigidBodyList = RigidBodyList.GetRigidBodyList(fs, model.Header);
            model.JointList     = JointList.getJointList(fs, model.Header);
            return(model);
        }