Class ModelMeshPart
Represents a batch of geometry information to submit to the graphics device during rendering. Each ModelMeshPart is a subdivision of a ModelMesh object. The ModelMesh class is split into multiple ModelMeshPart objects, typically based on material information.
public sealed class ModelMeshPart
- Inheritance
-
ModelMeshPart
- Inherited Members
Remarks
It is not necessary to use this class directly. In advanced rendering scenarios, it is possible to draw using ModelMeshPart properties in combination with the vertex and index buffers on ModelMesh. However, in most cases, Draw() will be sufficient.
Constructors
ModelMeshPart()
Using this constructor is strongly discouraged. Adding meshes to models at runtime is not supported and may lead to NullReferenceExceptions if parent is not set.
[Obsolete("This constructor is deprecated and will be made internal in a future release.")]
public ModelMeshPart()
Properties
Effect
Gets or sets the material Effect for this mesh part.
public Effect Effect { get; set; }
Property Value
IndexBuffer
Gets the index buffer for this mesh part.
public IndexBuffer IndexBuffer { get; set; }
Property Value
NumVertices
Gets the number of vertices used during a draw call.
public int NumVertices { get; set; }
Property Value
PrimitiveCount
Gets the number of primitives to render.
public int PrimitiveCount { get; set; }
Property Value
StartIndex
Gets the location in the index array at which to start reading vertices.
public int StartIndex { get; set; }
Property Value
Tag
Gets or sets an object identifying this model mesh part.
public object Tag { get; set; }
Property Value
VertexBuffer
Gets the vertex buffer for this mesh part.
public VertexBuffer VertexBuffer { get; set; }
Property Value
VertexOffset
Gets the offset (in vertices) from the top of vertex buffer.
public int VertexOffset { get; set; }