Mesh Class |
public abstract class Mesh : InitializedSceneComponent, IDisposable
The Mesh type exposes the following members.
Name | Description | |
---|---|---|
BoundingBox | Gets the bounding box of the mesh | |
IndexBuffer | Gets the GpuBuffer with IndexBuffer data. The IndexBuffer is set by protected SetIndexBuffer(GpuBuffer, Int32) method. | |
IndexBufferType | Gets IndexBufferType | |
IndexCount | Gets number of vertices that are used by this mesh. | |
IsLocked | Indicates that the mesh will never change, so it can be optimized by the engine (for example merged with some other mesh). | |
IsSceneCached | Indicates that this mesh is cashed by Scene objects and cannot be disposed by calling Dispose method. This means the mesh can be shared without worrying that someone will dispose the mesh. This flag is set when the mesh is cached by calling Scene.CacheObject(String, Object) method. The mesh will be disposed when the Scene will be disposed or if it is removed from the cache and then disposed. | |
PrimitiveTopology | Gets PrimitiveTopology | |
Version | Gets the version number of this Material. Version is increased each time the material is changed. Note: When material is changed a lot of times, the Version value can overflow from positive to negative numbers (to prevent problems do not check for bigger value but for not equal value) | |
VertexBuffer | Gets the GpuBuffer with VertexBuffer data. The VertexBuffer is set by protected SetVertexBuffer(GpuBuffer, Int32) method. | |
VertexBufferDescription | Gets VertexBufferDescription | |
VertexCount | Gets number of vertices that are used by this mesh. |
Name | Description | |
---|---|---|
ClearDataChannel | ClearDataChannel method clears the data from the specified channel. | |
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. 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. 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). | |
GetDetailsText | GetDetailsText method gets string with values of individual vertices and triangle indices of this mesh. | |
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 | |
SetDataChannel | SetDataChannel method sets the specified data to the specified channel. | |
SetIndexBuffer | SetIndexBuffer sets the IndexBuffer and IndexCount. The method disposes any existing IndexBuffer and subscribes to Disposing event on the new indexBuffer. | |
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) | |
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. |