Click or drag to resize
Ab4d.SharpEngine logo

MeshModelNodeSetCustomVertexBuffer(PositionNormalTextureVertex, GpuBuffer, VertexBufferDescription) Method

SetCustomVertexBuffer can be used to change the vertices and the vertex buffer that is used to render this MeshModelNode. This method also recalculates the bounding box of the mesh based on the new vertices. To prevent this, also pass the existing bounding box as a parameter. This method can be called only when Mesh is StandardMesh or TriangleMesh<PositionNormalTextureVertex>.

Namespace: Ab4d.SharpEngine.SceneNodes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 5.0.1075+bc537c8d217949260b11f66ee86aefa6456ac517
Syntax
C#
public void SetCustomVertexBuffer(
	PositionNormalTextureVertex[] vertices,
	GpuBuffer customVertexBuffer,
	VertexBufferDescription? customVertexBufferDescription = null
)

Parameters

vertices  PositionNormalTextureVertex
Array of vertices of the specified type T
customVertexBuffer  GpuBuffer
vertexBuffer as GpuBuffer that contains data from the vertices
customVertexBufferDescription  VertexBufferDescription  (Optional)
optional VertexBufferDescription; when null then the existing VertexBufferDescription is preserved
See Also