27 ArgumentNullException.ThrowIfNull(vertexBuffer);
28 ArgumentNullException.ThrowIfNull(indexBuffer);
31 || startIndex + indicesCount > indexBuffer.
IndicesCount) {
32 throw new InvalidOperationException(
"Specified range is outside of index buffer.");
36 modelMeshPart.VertexBuffer = vertexBuffer;
37 modelMeshPart.IndexBuffer = indexBuffer;
38 modelMeshPart.StartIndex = startIndex;
39 modelMeshPart.IndicesCount = indicesCount;
40 modelMeshPart.BoundingBox = boundingBox;