Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Paradox.Extensions.MergeExtensions Class Reference

Static Public Member Functions

static unsafe MeshDrawData MergeDrawData (IList< MeshDrawData > meshDrawDatas, bool can32BitIndex)
 Transform a vertex buffer positions, normals, tangents and bitangents using the given matrix. More...
 
static List< List< MeshDrawData > > CreateDeclarationMergeGroup (IList< MeshDrawData > meshDrawDatas)
 Group meshes that can be merged because they have the same vertex declaration. More...
 
static List< List< MeshDrawData > > CreateOptimizedMergeGroups (IList< MeshDrawData > meshDrawDatas, bool can32BitIndex)
 Create group of MeshDrawData that will be merged. More...
 
static byte[] CreateShortIndexBuffer (int offset, int count, byte[] baseIndices=null, bool is32Bit=true)
 Create an short typed index buffer. More...
 
static byte[] CreateIntIndexBuffer (int offset, int count, byte[] baseIndices=null, bool is32Bits=true)
 Create an int typed index buffer. More...
 
static bool IsIndexed (IList< MeshDrawData > meshDrawDatas)
 Check if a index buffer will be needed for this merge group. More...
 
static List< MeshDrawDataGroupDrawData (this IList< MeshDrawData > meshDrawDatas, bool can32BitIndex)
 Group the meshes. More...
 

Detailed Description

Definition at line 14 of file MergeExtensions.cs.

Member Function Documentation

static List<List<MeshDrawData> > SiliconStudio.Paradox.Extensions.MergeExtensions.CreateDeclarationMergeGroup ( IList< MeshDrawData meshDrawDatas)
static

Group meshes that can be merged because they have the same vertex declaration.

Parameters
meshDrawDatasThe list of meshes.
Returns
A list of grouped meshes.

Definition at line 159 of file MergeExtensions.cs.

static byte [] SiliconStudio.Paradox.Extensions.MergeExtensions.CreateIntIndexBuffer ( int  offset,
int  count,
byte[]  baseIndices = null,
bool  is32Bits = true 
)
static

Create an int typed index buffer.

Parameters
offsetThe offset to apply to the indices.
countThe number of indices.
baseIndicesA possible base index buffer
is32BitsStating if baseIndices is filled with 32 bits int
Returns
A new index buffer.

Definition at line 287 of file MergeExtensions.cs.

References DirectX.count.

static List<List<MeshDrawData> > SiliconStudio.Paradox.Extensions.MergeExtensions.CreateOptimizedMergeGroups ( IList< MeshDrawData meshDrawDatas,
bool  can32BitIndex 
)
static

Create group of MeshDrawData that will be merged.

Parameters
meshDrawDatasList of MehsDrawData to merge.
can32BitIndexA flag stating if 32 bit index buffers are allowed.
Returns
A List of groups to merge internally.

Definition at line 197 of file MergeExtensions.cs.

static byte [] SiliconStudio.Paradox.Extensions.MergeExtensions.CreateShortIndexBuffer ( int  offset,
int  count,
byte[]  baseIndices = null,
bool  is32Bit = true 
)
static

Create an short typed index buffer.

Parameters
offsetThe offset to apply to the indices.
countThe number of indices.
baseIndicesA possible base index buffer
is32BitStating if baseIndices is filled with 32 bits int
Returns
A new index buffer.

Definition at line 252 of file MergeExtensions.cs.

References DirectX.count.

static List<MeshDrawData> SiliconStudio.Paradox.Extensions.MergeExtensions.GroupDrawData ( this IList< MeshDrawData meshDrawDatas,
bool  can32BitIndex 
)
static

Group the meshes.

Parameters
meshDrawDatasThe list of meshes to group.
can32BitIndexA flag stating if 32 bit index buffers are allowed
Returns
The list of merged meshes.

Definition at line 330 of file MergeExtensions.cs.

static bool SiliconStudio.Paradox.Extensions.MergeExtensions.IsIndexed ( IList< MeshDrawData meshDrawDatas)
static

Check if a index buffer will be needed for this merge group.

Parameters
meshDrawDatasThe list of MeshDrawdata to merge.
Returns
True if an index is needed, false otherwise.

Definition at line 319 of file MergeExtensions.cs.

static unsafe MeshDrawData SiliconStudio.Paradox.Extensions.MergeExtensions.MergeDrawData ( IList< MeshDrawData meshDrawDatas,
bool  can32BitIndex 
)
static

Transform a vertex buffer positions, normals, tangents and bitangents using the given matrix.

Parameters
meshDrawDatasThe mesh draw datas.
can32BitIndexA flag stating if 32 bit index buffers.

Definition at line 21 of file MergeExtensions.cs.

References SiliconStudio.Paradox.Graphics.Data.IndexBufferBindingData.Count, SiliconStudio.Paradox.Effects.Data.MeshDrawData.IndexBuffer, and SiliconStudio.Paradox.Graphics.Data.IndexBufferBindingData.Is32Bit.


The documentation for this class was generated from the following file: