Class MergeExtensions
- Namespace
- Stride.Extensions
- Assembly
- Stride.Rendering.dll
public static class MergeExtensions- Inheritance
- 
      objectMergeExtensions
Methods
CreateDeclarationMergeGroup(IList<MeshDraw>)
Group meshes that can be merged because they have the same vertex declaration.
public static List<List<MeshDraw>> CreateDeclarationMergeGroup(IList<MeshDraw> meshDrawDatas)Parameters
Returns
CreateIntIndexBuffer(int, int, byte[], bool)
Create an int typed index buffer.
public static byte[] CreateIntIndexBuffer(int offset, int count, byte[] baseIndices = null, bool is32Bits = true)Parameters
- offsetint
- The offset to apply to the indices. 
- countint
- The number of indices. 
- baseIndicesbyte[]
- A possible base index buffer 
- is32Bitsbool
- Stating if baseIndices is filled with 32 bits int 
Returns
- byte[]
- A new index buffer. 
CreateOptimizedMergeGroups(IList<MeshDraw>, bool)
Create group of MeshDrawData that will be merged.
public static List<List<MeshDraw>> CreateOptimizedMergeGroups(IList<MeshDraw> meshDrawDatas, bool can32BitIndex)Parameters
- meshDrawDatasIList<MeshDraw>
- List of MehsDrawData to merge. 
- can32BitIndexbool
- A flag stating if 32 bit index buffers are allowed. 
Returns
CreateShortIndexBuffer(int, int, byte[], bool)
Create an short typed index buffer.
public static byte[] CreateShortIndexBuffer(int offset, int count, byte[] baseIndices = null, bool is32Bit = true)Parameters
- offsetint
- The offset to apply to the indices. 
- countint
- The number of indices. 
- baseIndicesbyte[]
- A possible base index buffer 
- is32Bitbool
- Stating if baseIndices is filled with 32 bits int 
Returns
- byte[]
- A new index buffer. 
GroupDrawData(IList<MeshDraw>, bool)
Group the meshes.
public static List<MeshDraw> GroupDrawData(this IList<MeshDraw> meshDrawDatas, bool can32BitIndex)Parameters
- meshDrawDatasIList<MeshDraw>
- The list of meshes to group. 
- can32BitIndexbool
- A flag stating if 32 bit index buffers are allowed 
Returns
IsIndexed(IList<MeshDraw>)
Check if a index buffer will be needed for this merge group.
public static bool IsIndexed(IList<MeshDraw> meshDrawDatas)Parameters
Returns
- bool
- True if an index is needed, false otherwise. 
MergeDrawData(IList<MeshDraw>, bool)
Transform a vertex buffer positions, normals, tangents and bitangents using the given matrix.
public static MeshDraw MergeDrawData(IList<MeshDraw> meshDrawDatas, bool can32BitIndex)Parameters
- meshDrawDatasIList<MeshDraw>
- The mesh draw datas. 
- can32BitIndexbool
- A flag stating if 32 bit index buffers.