public void OpenTriMesh() { String filename = SetUpOpenDialog(); if (filename == null) return; else { if (filename.EndsWith(".obj")) { NonManifoldMesh mesh = new NonManifoldMesh(); mesh.ReadObj(filename); MeshRecord rec = new MeshRecord(filename, mesh); GlobalData.Instance.SimpleMesh = rec; } } GlobalData.Instance.OnChanged(EventArgs.Empty); }
public void RenderData() { if (GlobalData.Instance.TriMesh != null) { OpenGLTriMesh.Instance.DrawTriMesh(GlobalData.Instance.TriMesh); } if (GlobalData.Instance.QuadMesh != null) { OpenGLTriMesh.Instance.DrawHalfEdgeQuadMesh(GlobalData.Instance.QuadMesh); } MeshRecord currMeshRecord = GlobalData.Instance.SimpleMesh; if (currMeshRecord != null) { OpenGLNonManifold.Instance.DrawMesh(currMeshRecord.Mesh); } if (GlobalData.Instance.TetMesh != null) { OpenGLTetMesh.Instance.DrawFlag(GlobalData.Instance.TetMesh); } if (GlobalData.Instance.ske != null) { OpenGLTriMesh.Instance.DrawSkeleton(GlobalData.Instance.ske); } if (GlobalData.Instance.boxes != null) { OpenGLOctree.Instance.DrawDynamicOctree(GlobalData.Instance.boxes); } }
public void OpenTriMesh() { String filename = SetUpOpenDialog(); if (filename == null) { return; } else { if (filename.EndsWith(".obj")) { NonManifoldMesh mesh = new NonManifoldMesh(); mesh.ReadObj(filename); MeshRecord rec = new MeshRecord(filename, mesh); GlobalData.Instance.SimpleMesh = rec; } } GlobalData.Instance.OnChanged(EventArgs.Empty); }