public static void TestRenderBones() { TestXNAGame main = null; SkinnedModel model = null; ColladaModel col = null; TestXNAGame.Start("TestShowBones", delegate { main = TestXNAGame.Instance; //col = ColladaModel.FromFile( new GameFile( main.RootDirectory + "/Content/Goblin.DAE" ) ); //col = ColladaModel.LoadSimpleCharacterAnim001(); col = ColladaModel.LoadSimpleBones001(); model = SkinnedModelBuilder.LoadSkinnedModel(main, col); //model.WorldMatrix = Matrix.CreateFromYawPitchRoll( -MathHelper.PiOver2, -MathHelper.PiOver2, 0 ); }, delegate { model.UpdateAnimation(main.Elapsed); model.RenderBonesLines(); }); }
public static void TestLoadShader() { TestXNAGame.Start("ColladaShader.TestLoadShader", delegate { ColladaShader shader = new ColladaShader(TestXNAGame.Instance, null); }, delegate { Console.WriteLine("Shader loaded succesfully!"); TestXNAGame.Instance.Exit(); }); }
public static void TestRenderAnimated() { TestXNAGame main = null; SkinnedModel model = null; ColladaModel col = null; TestXNAGame.Start("TestRenderAnimated", delegate { main = TestXNAGame.Instance; //col = ColladaModel.FromFile( new GameFile( main.RootDirectory + "/Content/Goblin.DAE" ) ); //col = ColladaModel.FromFile( new GameFile( main.RootDirectory + "/DebugFiles/VerySimpleBones001(disabled).DAE" ) ); //col = ColladaModel.FromFile( new GameFile( main.RootDirectory + "/Content/TriangleBones002.DAE" ) ); col = ColladaModel.LoadSimpleCharacterAnim001(); //col = ColladaModel.LoadSimpleBones001(); //col = ColladaModel.LoadTriangleBones001(); model = SkinnedModelBuilder.LoadSkinnedModel(main, col); model.WorldMatrix = Matrix.CreateFromYawPitchRoll(-MathHelper.PiOver2, -MathHelper.PiOver2, 0); //model.WorldMatrix = Matrix.Identity; }, delegate { main.GraphicsDevice.RenderState.CullMode = CullMode.None; if (main.Keyboard.IsKeyPressed(Microsoft.Xna.Framework.Input.Keys.R)) { model = SkinnedModelBuilder.LoadSkinnedModel(main, col); model.WorldMatrix = Matrix.Identity; // Matrix.CreateFromYawPitchRoll( -MathHelper.PiOver2, -MathHelper.PiOver2, 0 ); } model.UpdateAnimation(main.Elapsed); model.Render(); model.RenderBonesLines(); }); }