/// <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); }
/// <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); }
private void mesh_VerticesReallocated(object sender, VertexCollectionEventArgs e) { MeshInterop.ReallocateStream (this.MeshHandle, NativeMeshMemoryRegion.TextureCoordinates, e.NewCount); this.UpdateCollection(); }
/// <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(); }