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; }
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; } }