public override void init() { Device d3dDevice = GuiController.Instance.D3dDevice; //Crear loader TgcSkeletalLoader loader = new TgcSkeletalLoader(); //Configurar MeshFactory customizado loader.MeshFactory = new MyCustomMeshFactory(); //Cargar modelo con una animaciĆ³n string pathMesh = GuiController.Instance.ExamplesMediaDir + "SkeletalAnimations\\BasicHuman\\WomanJeans-TgcSkeletalMesh.xml"; string[] animationsPath = new string[] { GuiController.Instance.ExamplesMediaDir + "SkeletalAnimations\\BasicHuman\\Animations\\Push-TgcSkeletalAnim.xml" }; mesh = (MyCustomMesh)loader.loadMeshAndAnimationsFromFile(pathMesh, animationsPath); //Ejecutar animacion mesh.playAnimation("Push"); //Centrar camara rotacional respecto a este mesh GuiController.Instance.RotCamera.targetObject(mesh.BoundingBox); }
public override void init() { Device d3dDevice = GuiController.Instance.D3dDevice; //Crear loader TgcSkeletalLoader loader = new TgcSkeletalLoader(); //Configurar MeshFactory customizado loader.MeshFactory = new MyCustomMeshFactory(); //Cargar modelo con una animaciĆ³n string pathMesh = GuiController.Instance.ExamplesMediaDir + "SkeletalAnimations\\BasicHuman\\WomanJeans-TgcSkeletalMesh.xml"; string[] animationsPath = new string[] { GuiController.Instance.ExamplesMediaDir + "SkeletalAnimations\\BasicHuman\\Animations\\Push-TgcSkeletalAnim.xml" }; mesh = (MyCustomMesh)loader.loadMeshAndAnimationsFromFile(pathMesh, animationsPath); //Ejecutar animacion mesh.playAnimation("Push"); //Centrar camara rotacional respecto a este mesh GuiController.Instance.RotCamera.targetObject(mesh.BoundingBox); }