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