示例#1
0
 /// <summary>
 /// Updates collection handle and number of elements in it.
 /// </summary>
 public virtual void UpdateCollection()
 {
     this.CollectionHandle =
         MeshInterop.GetStreamHandle(this.MeshHandle, this.MemoryRegionIdentifier);
     this.Count =
         MeshInterop.GetNumberOfElements(this.MeshHandle, this.MemoryRegionIdentifier);
 }
示例#2
0
 /// <summary>
 /// Signals underlying static object to create a new render mesh.
 /// </summary>
 /// <param name="staticObject">Ignored.</param>
 public override void Export(StaticObject staticObject)
 {
     MeshInterop.Export(this.StaticObject.Handle);
 }
示例#3
0
 private void mesh_VerticesReallocated(object sender, VertexCollectionEventArgs e)
 {
     MeshInterop.ReallocateStream
         (this.MeshHandle, NativeMeshMemoryRegion.TextureCoordinates, e.NewCount);
     this.UpdateCollection();
 }
示例#4
0
 /// <summary>
 /// Zeros elements of this collection.
 /// </summary>
 public virtual void Clear()
 {
     MeshInterop.ReallocateStream(this.MeshHandle, this.MemoryRegionIdentifier, 0);
     MeshInterop.ReallocateStream(this.MeshHandle, this.MemoryRegionIdentifier, this.Count);
     this.UpdateCollection();
 }