Mesh Methods |
The Mesh type exposes the following members.
Name | Description | |
---|---|---|
Dispose | Disposes all resources that are used by this mesh (except in case when SceneCached flag is set then nothing is disposed). | |
Dispose(Boolean) |
Releases unmanaged and managed resources (when disposing is true).
This method may be called only from the CheckAndDispose(Boolean) method and must not be called manually by the user.
(Overrides ComponentBaseDispose(Boolean)) | |
DisposeIndexBuffer | DisposeIndexBuffer | |
DisposeVertexBuffer | DisposeVertexBuffer | |
DumpDetails | Dumps values of individual vertices and triangle indices into the Visual Studio Output window. | |
DumpOverview | Dumps an overview information about this mesh into the Visual Studio Output window. | |
GetDataChannel(MeshDataChannelTypes) | GetDataChannel returns an object with the data from the specified channel. For example, for Positions an array of Vector3 is returned with positions defined by this mesh. Executing this method may take some time because the method may need to create new array objects and copy data from some other data structure (for example an array of PositionNormalTextureVertex values). | |
GetDataChannelT(MeshDataChannelTypes) | GetDataChannel returns an object with the data from the specified channel. For example, for Positions an array of Vector3 is returned with positions defined by this mesh. When the type of the data does not match the specified type T, then ArgumentException is thrown. Executing this method may take some time because the method may need to create new array objects and copy data from some other data structure (for example an array of PositionNormalTextureVertex values). | |
GetDataChannelArrayT | GetDataChannel returns an array with data from the specified channel. For example, for Positions an array of Vector3 is returned with positions defined by this mesh. When the type of the data array does not match the specified type T, then null is returned. Executing this method may take some time because the method may need to create new array objects and copy data from some other data structure (for example an array of PositionNormalTextureVertex values). | |
GetDataChannelGpuBuffer | Returns a GpuBuffer that is defined by the specified data channel. When no GpuBuffer is defined, then null is returned. | |
GetDetailsText | GetDetailsText method gets string with values of individual vertices and triangle indices of this mesh. | |
GetMetadata(String) | Gets the object that was stored to the specified key by the SetMetadata(String, Object) method. When the key is not found then null is returned. If you know that the key exists and you know the type, then you can use the generic GetMetadataT(String) method. | |
GetMetadataT(String) | Gets the object that was stored to the specified key by the SetMetadata(String, Object) method. When the key is not found then ArgumentException is thrown. When the metadata with that key cannot be converted to the target type T, then FormatException is thrown. If you are not sure if the key exist or what type its data is, then use the non-generic GetMetadata(String) that returns object or null. | |
GetOverviewText | GetOverviewText adds string that writes an overview information about this mesh into the specified StringBuilder. To get values of individual vertices and triangle indices use GetDetailsText(Boolean, Boolean, Boolean, Int32, Int32, Int32) method. | |
LockMesh | LockMesh method locks the mesh and prevents changing it. To indicate that the mesh is locked, the LockedMesh is set in _flags property. Locked mesh cannot be unlocked. | |
NotifyMeshChange | NotifyMeshChange sets the MeshChanged and updates the Version number. | |
OnUpdateMesh | OnUpdateMesh | |
RemoveDataChannel | RemoveDataChannel method removes the data from the specified channel. If GpuBuffer is assigned to that channel, then it is disposed when disposeGpuBuffer parameter is true (by default). | |
RemoveMetadata | Removes the specified key from the metadata Dictionary. | |
SetDataChannel(MeshDataChannelTypes, Object) | SetDataChannel method sets the specified data to the specified channel. | |
SetDataChannel(MeshDataChannelTypes, Object, GpuBuffer, Boolean) | SetDataChannel method sets the specified data and the GpuBuffer to the specified channel. | |
SetDataChannelGpuBuffer | Sets the specified GpuBuffer to the data with the specified channel type. If any existing GpuBuffer was already assigned to the channel, then it is disposed. | |
SetIndexBuffer | SetIndexBuffer sets the IndexBuffer and IndexCount. The method disposes any existing IndexBuffer and subscribes to Disposing event on the new indexBuffer. | |
SetMetadata | Sets the key with the specified value to the metadata Dictionary that is created for this mesh (using Metadata channel). When value is nul, then the key is removed from the Dictionary. | |
SetVertexBuffer | SetVertexBuffer sets the VertexBuffer and VertexCount. The method disposes any existing VertexBuffer and subscribes to Disposing event on the new vertexBuffer. | |
ToString | (Overrides ObjectToString) | |
UpdateDataChannel | UpdateDataChannel method should be called when the data in the channel array are changed. This will dispose the existing GpuBuffer and generate a new one when needed. | |
UpdateMesh | UpdateMesh method can be called to update the GPU buffers from the mesh data. When possible, use the UpdateMesh(BoundingBox) that takes boundingBox as parameter. | |
UpdateMesh(BoundingBox) | UpdateMesh method can be called to update the GPU buffers from the mesh data. |