public MeshChangedListener(int nPort, string sFilePath) { this.nPort = nPort; this.sFilePath = sFilePath; lastRead = new PackedMesh(); lastRead_mutex = new Mutex(); }
public object Clone() { PackedMesh mTo = new PackedMesh(); this.CopyTo(mTo); return(mTo); }
public PackedMesh GetLastMesh() { lastRead_mutex.WaitOne(); PackedMesh pm = (PackedMesh)lastRead.Clone(); lastRead_mutex.ReleaseMutex(); return(pm); }
public void CopyTo(PackedMesh mTo) { mTo.VersionFlags = this.VersionFlags; mTo.VertexFlags = this.VertexFlags; mTo.Vertices = fast_copy(this.Vertices, mTo.Vertices); mTo.Normals = fast_copy(this.Normals, mTo.Normals); mTo.Colors = fast_copy(this.Colors, mTo.Colors); mTo.UVs = fast_copy(this.UVs, mTo.UVs); mTo.TriangleFlags = this.TriangleFlags; mTo.Triangles = fast_copy(this.Triangles, mTo.Triangles); mTo.FaceGroups = fast_copy(this.FaceGroups, mTo.FaceGroups); }
public void GetLastMesh(PackedMesh mCopyTo) { lastRead_mutex.WaitOne(); lastRead.CopyTo(mCopyTo); lastRead_mutex.ReleaseMutex(); }
private void testWriteButton_Click(object sender, EventArgs e) { mm.PackedMesh pm = new mm.PackedMesh(); pm.InitializeToTestMesh(); pm.Write("c:\\scratch\\livemesh_test.bin"); }