Beispiel #1
0
 public MeshChangedListener(int nPort, string sFilePath)
 {
     this.nPort     = nPort;
     this.sFilePath = sFilePath;
     lastRead       = new PackedMesh();
     lastRead_mutex = new Mutex();
 }
Beispiel #2
0
        public object Clone()
        {
            PackedMesh mTo = new PackedMesh();

            this.CopyTo(mTo);
            return(mTo);
        }
Beispiel #3
0
        public PackedMesh GetLastMesh()
        {
            lastRead_mutex.WaitOne();
            PackedMesh pm = (PackedMesh)lastRead.Clone();

            lastRead_mutex.ReleaseMutex();
            return(pm);
        }
Beispiel #4
0
 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);
 }
Beispiel #5
0
 public void GetLastMesh(PackedMesh mCopyTo)
 {
     lastRead_mutex.WaitOne();
     lastRead.CopyTo(mCopyTo);
     lastRead_mutex.ReleaseMutex();
 }
Beispiel #6
0
 private void testWriteButton_Click(object sender, EventArgs e)
 {
     mm.PackedMesh pm = new mm.PackedMesh();
     pm.InitializeToTestMesh();
     pm.Write("c:\\scratch\\livemesh_test.bin");
 }