Exemplo n.º 1
0
 private bool importMD5ModelMeshes(MD5Model md5)
 {
     model = new WavefrontOBJ();
     md5.addToSimpleStaticMeshBuilder(model);
     recreateGPUBuffers();
     UpdateDirectXDisplay();
     return(false);
 }
Exemplo n.º 2
0
        private bool loadMD5Model(string fileName)
        {
            md5model = new MD5Model();
            if (md5model.loadMD5MeshFile(fileName))
            {
                md5model = null;
                return(true);
            }
            lb_md5MeshName.Text = fileName;

            md5model.buildBaseFrameVertices();
            rawMesh = new XYZTrianglesList();
            md5model.addToSimpleStaticMeshBuilder(rawMesh);
            gpuMesh = new DXVertexBufferXYZNormals();
            gpuMesh.create(rawMesh, device);
            UpdateDirectXDisplay();
            return(false);
        }
Exemplo n.º 3
0
        private void exportObjFile(string fileName)
        {
            if (md5model == null)
            {
                return;
            }
            WavefrontOBJ obj = new WavefrontOBJ();

            md5model.addToSimpleStaticMeshBuilder(obj);
            obj.saveObjModel(fileName);
        }