The prtm model.
Inheritance: ParsedModel
Exemplo n.º 1
0
        /// <summary>
        /// The tree view 1_ key press.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The e.</param>
        /// <remarks></remarks>
        private void treeView1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((byte)e.KeyChar == 22)
            {
                // Ctrl + v
                if (map.SelectedMeta == null)
                {
                    return;
                }

                if (map.SelectedMeta.type == "PRTM")
                {
                    // PRTM Viewer
                    PRTMModel pm = new PRTMModel(ref map.SelectedMeta);
                    ModelViewer mv = new ModelViewer(pm);
                }
                else if (map.SelectedMeta.type == "mod2" || map.SelectedMeta.type == "mode")
                {
                    // MODE Viewer
                    ParsedModel pm = new ParsedModel(ref map.SelectedMeta);
                    ModelViewer mv = new ModelViewer(pm);
                    pm.Dispose();
                    pm = null;
                    mv.Dispose();
                    mv = null;
                }
                else if (map.SelectedMeta.type == "coll")
                {
                    collisonViewerToolStripMenuItem_Click(this, null);
                }
                else if (map.SelectedMeta.type == "sbsp")
                {
                    loadBSP(map.SelectedMeta.TagIndex);
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// The view prtm tool strip menu item_ click.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The e.</param>
        /// <remarks></remarks>
        private void viewPRTMToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PRTMModel pm = new PRTMModel(ref map.SelectedMeta);

            ModelViewer mv = new ModelViewer(pm);
        }
Exemplo n.º 3
0
        /// <summary>
        /// The extract prtmobj tool strip menu item_ click.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The e.</param>
        /// <remarks></remarks>
        private void extractPRTMOBJToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (folderBrowserDialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }

            PRTMModel pm = new PRTMModel(ref map.SelectedMeta);

            pm.ExtractMeshesToOBJ(folderBrowserDialog.SelectedPath);
            MessageBox.Show("Done");
        }