本文整理匯總了C#中TgcViewer.Utils.TgcSceneLoader.TgcMesh.changeDiffuseMaps方法的典型用法代碼示例。如果您正苦於以下問題:C# TgcMesh.changeDiffuseMaps方法的具體用法?C# TgcMesh.changeDiffuseMaps怎麽用?C# TgcMesh.changeDiffuseMaps使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TgcViewer.Utils.TgcSceneLoader.TgcMesh
的用法示例。
在下文中一共展示了TgcMesh.changeDiffuseMaps方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Chispa
public Chispa()
{
TgcSceneLoader loader = new TgcSceneLoader();
mesh = loader.loadSceneFromFile(sphere).Meshes[0];
mesh.changeDiffuseMaps(new TgcTexture[] { TgcTexture.createTexture(d3dDevice, Shared.mediaPath + "\\otros\\giallo.png") });
mesh.Scale = new Vector3(0.08f, 0.08f, 0.08f);
}
示例2: init
public override void init()
{
Device d3dDevice = GuiController.Instance.D3dDevice;
string sphere = GuiController.Instance.ExamplesMediaDir + "ModelosTgc\\Sphere\\Sphere-TgcScene.xml";
TgcSceneLoader loader = new TgcSceneLoader();
//Cargar modelos para el sol, la tierra y la luna. Son esfereas a las cuales le cambiamos la textura
sun = loader.loadSceneFromFile(sphere).Meshes[0];
sun.changeDiffuseMaps(new TgcTexture[] { TgcTexture.createTexture(d3dDevice, GuiController.Instance.ExamplesDir + "Transformations\\SistemaSolar\\SunTexture.jpg") });
earth = loader.loadSceneFromFile(sphere).Meshes[0];
earth.changeDiffuseMaps(new TgcTexture[] { TgcTexture.createTexture(d3dDevice, GuiController.Instance.ExamplesDir + "Transformations\\SistemaSolar\\EarthTexture.jpg") });
moon = loader.loadSceneFromFile(sphere).Meshes[0];
moon.changeDiffuseMaps(new TgcTexture[] { TgcTexture.createTexture(d3dDevice, GuiController.Instance.ExamplesDir + "Transformations\\SistemaSolar\\MoonTexture.jpg") });
//Deshabilitamos el manejo automático de Transformaciones de TgcMesh, para poder manipularlas en forma customizada
sun.AutoTransformEnable = false;
earth.AutoTransformEnable = false;
moon.AutoTransformEnable = false;
//Color de fondo
GuiController.Instance.BackgroundColor = Color.Black;
//Camara en primera persona
GuiController.Instance.FpsCamera.Enable = true;
GuiController.Instance.FpsCamera.setCamera(new Vector3(705.2938f, 305.347f, -888.1567f), new Vector3(183.6915f, 19.6596f, -84.2204f));
}
示例3: crearEsferaExplosion
public void crearEsferaExplosion()
{
TgcSceneLoader loaderExplosion = new TgcSceneLoader();
esferaExplosion = loaderExplosion.loadSceneFromFile(GuiController.Instance.AlumnoEjemplosMediaDir + "\\Sphere\\Sphere-TgcScene.xml").Meshes[0];
esferaExplosion.changeDiffuseMaps(new TgcTexture[] { TgcTexture.createTexture(d3dDevice, GuiController.Instance.AlumnoEjemplosMediaDir + "\\explosion.jpg") });
}