Beispiel #1
0
        private void dooSabinToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SubdivisionQuad sub = new SubdivisionQuad(GlobalData.Instance.QuadMesh);

            GlobalData.Instance.QuadMesh = sub.DooSabin();
            QuadMeshUtil.ComputeNormal(GlobalData.Instance.QuadMesh);
        }
Beispiel #2
0
        private void cubeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            QuadMesh mesh = QuadShape.Instance.CreateCube();

            QuadMeshUtil.ScaleToUnit(mesh, 1.0);
            QuadMeshUtil.MoveToCenter(mesh);
            QuadMeshUtil.ComputeNormal(mesh);
            GlobalData.Instance.QuadMesh = mesh;
        }
Beispiel #3
0
        public void OpenQuadMesh()
        {
            String filename = SetUpOpenDialog();

            if (filename == null)
            {
                return;
            }

            else
            {
                QuadMesh mesh = QuadMesh.FromOffFile(filename);

                QuadMeshUtil.ScaleToUnit(mesh, 1.0);
                QuadMeshUtil.MoveToCenter(mesh);
                QuadMeshUtil.ComputeNormal(mesh);
                GlobalData.Instance.QuadMesh = mesh;
            }
        }