Exemple #1
0
 /// <summary>	
 /// Retrieves either an attribute table for a mesh, or the number of entries stored in an attribute table for a mesh.	
 /// </summary>	
 /// <remarks>	
 /// An attribute table is used to identify areas of the mesh that need to be drawn with different textures, render states, materials, and so on. In addition, the application can use the attribute table to hide portions of a mesh by not drawing a given attribute identifier when drawing the frame. 	
 /// </remarks>	
 /// <returns>Returns an array of <see cref="MeshAttributeRange"/> structures, representing the entries in the mesh's attribute table. </returns>
 /// <unmanaged>HRESULT ID3DX10Mesh::GetAttributeTable([Out, Buffer, Optional] D3DX10_ATTRIBUTE_RANGE* pAttribTable,[None] int* pAttribTableSize)</unmanaged>
 public MeshAttributeRange[] GetAttributeTable()
 {            
     int sizeAttributeTable = 0;
     GetAttributeTable(null, ref sizeAttributeTable);
     var temp = new MeshAttributeRange[sizeAttributeTable];
     GetAttributeTable(temp, ref sizeAttributeTable);
     return temp;
 }
Exemple #2
0
 /// <summary>
 /// Sets the attribute table for a mesh and the number of entries stored in the table.	
 /// </summary>	
 /// <remarks>	
 /// If an application keeps track of the information in an attribute table, and rearranges the table as a result of changes to attributes or faces, this method allows the application to update the attribute tables instead of calling ID3DX10Mesh::Optimize again. 	
 /// </remarks>	
 /// <param name="data">an array of <see cref="MeshAttributeRange"/> structures, representing the entries in the mesh attribute table. </param>
 /// <returns>The return value is one of the values listed in {{Direct3D 10 Return Codes}}. </returns>
 /// <unmanaged>HRESULT ID3DX10Mesh::SetAttributeTable([In, Buffer] const D3DX10_ATTRIBUTE_RANGE* pAttribTable,[None] int cAttribTableSize)</unmanaged>
 public void SetAttributeTable(MeshAttributeRange[] data)
 {
     SetAttributeTable(data, data.Length);
 }