static public IOWriteResult WriteMesh(string sFilename, IMesh mesh, WriteOptions options) { StandardMeshWriter writer = new StandardMeshWriter(); return(writer.Write(sFilename, new List <WriteMesh>() { new WriteMesh(mesh) }, options)); }
public static void WriteDebugMesh(IMesh mesh, string sPath) { WriteOptions options = WriteOptions.Defaults; options.bWriteGroups = true; StandardMeshWriter.WriteFile(sPath, new List <WriteMesh>() { new WriteMesh(mesh) }, options); }
static public IOWriteResult WriteMeshes(string sFilename, List <DMesh3> vMeshes, WriteOptions options) { List <WriteMesh> meshes = new List <g3.WriteMesh>(); foreach (var m in vMeshes) { meshes.Add(new WriteMesh(m)); } StandardMeshWriter writer = new StandardMeshWriter(); return(writer.Write(sFilename, meshes, options)); }
public static void WriteDebugMesh(IMesh mesh, string sPath = @"..\..\test_output\debug.obj") { WriteOptions options = WriteOptions.Defaults; options.bWriteGroups = true; options.bPerVertexColors = true; options.bPerVertexNormals = true; options.bPerVertexUVs = true; StandardMeshWriter.WriteFile(sPath, new List <WriteMesh>() { new WriteMesh(mesh) }, options); }
public static void WriteDebugMeshAndMarkers(IMesh mesh, List <Vector3d> Markers, string sPath = @"..\..\test_output\debug.obj") { WriteOptions options = WriteOptions.Defaults; options.bWriteGroups = true; List <WriteMesh> meshes = new List <WriteMesh>() { new WriteMesh(mesh) }; double size = BoundsUtil.Bounds(mesh).Diagonal.Length * 0.01f; foreach (Vector3d v in Markers) { TrivialBox3Generator boxgen = new TrivialBox3Generator(); boxgen.Box = new Box3d(v, size * Vector3d.One); boxgen.Generate(); DMesh3 m = new DMesh3(); boxgen.MakeMesh(m); meshes.Add(new WriteMesh(m)); } StandardMeshWriter.WriteFile(sPath, meshes, options); }
static public IOWriteResult WriteFile(string sFilename, List <WriteMesh> vMeshes, WriteOptions options) { StandardMeshWriter writer = new StandardMeshWriter(); return(writer.Write(sFilename, vMeshes, options)); }