Exemplo n.º 1
0
        private void button_pointList_Click(object sender, EventArgs e)
        {
            VertexEditor  v           = new VertexEditor();
            List <Vertex> newVertices = v.ShowDialog(Vertices, BitmapSize);

            if (newVertices != null)
            {
                Vertices = newVertices; //uncomment
                PreviewVertices();
            }
        }
Exemplo n.º 2
0
    private void GenerateVerticesEditorObjects()
    {
        // tip: we don't need to have any reference to instantiated mini cubes
        // because the cube is independent itself

        for (int i = 0; i < m_Vertices.Count; i++)
        {
            VertexEditor meshEditor = Instantiate(m_MiniCubePrefab, transform);
            meshEditor.transform.localPosition = m_Vertices[i];
            meshEditor.name          = "MeshEditor " + i;
            meshEditor.m_VertexIndex = i;
        }
    }
Exemplo n.º 3
0
        private void AddNode(fancyModelMesh.Block Block)
        {
            TreeNode tNode = new TreeNode();
            ToolWindowBase tBase = null;

            if (Block is fancyModelMesh.VertexBlock)
                tBase = new VertexEditor(tNode, Block);
            else if (Block is fancyModelMesh.IndexBlock)
                tBase = new IndexEditor(tNode, Block);
            else if (Block is fancyModelMesh.SubsetBlock)
                tBase = new SubsetEditor(tNode, Block);
            else if (Block is fancyModelMesh.MaterialBlock)
                tBase = new MaterialEditor(tNode, Block);
            else if (Block is fancyModelMesh.BoundingBoxBlock)
                tBase = new BoundingBoxEditor(tNode, Block);
            else if (Block is fancyModelMesh.UnknownBlock)
                tBase = new UserDataEditor(tNode, Block);

            tNode.Tag = tBase;
            LabelTreeView.Nodes.Add(tNode);
        }