I am getting null when I cast IAppearance_DG to IMaterial using this code:
Code: Select all
IEntity_DG entity = iStdShape.Box(1, 1, 1); //iStdShape is IStdShape
IAppearance_DG apppearance = iEntity.GetAppearance();
apppearance.SetColor(1.0f, 0, 0);
// Get material to modify specular color
IMaterial material = iAppBox as IMaterial;
Thank you