本文整理汇总了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") });
}