/// <summary>
/// This method gets several properties of a material in a multipatch.
/// This method must be called on the MCT. Use QueuedTask.Run.
/// </summary>
/// <param name="multipatch">The input multipatch.</param>
/// <param name="patchIndex">The index of the patch (part) from which to get the material properties.</param>
public void GetMaterialProperties(Multipatch multipatch, int patchIndex)
{
if (multipatch.HasMaterials)
{
// Get the material index for the specified patch.
int materialIndex = multipatch.GetPatchMaterialIndex(patchIndex);
System.Windows.Media.Color color = multipatch.GetMaterialColor(materialIndex);
int tranparencyPercent = multipatch.GetMaterialTransparencyPercent(materialIndex);
bool isBackCulled = multipatch.IsMaterialCullBackface(materialIndex);
if (multipatch.IsMaterialTextured(materialIndex))
{
int bpp = multipatch.GetMaterialTextureBytesPerPixel(materialIndex);
int columnCount = multipatch.GetMaterialTextureColumnCount(materialIndex);
int rowCount = multipatch.GetMaterialTextureRowCount(materialIndex);
}
}
}