protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); S.init(graphics, Content); S.Proj = Matrix.CreatePerspectiveFieldOfView(1, S.gd.Viewport.AspectRatio, 0.1f, 1000f); Dictionary <string, BVHContent> bla = BVHPlayer.bvhDic; attackDirCylinder = new NCylinder( 0.3f, 0.01f, 5, 6, Color.Red); S.player = new BVHPlayer(new BVHContent( File.ReadAllText(filename), null, MainForm.saveRootMovement)); S.player.Bvh.Skeleton.calc_cylinder_matrices(S.player.Bvh); S.player.animate = false; axis = new Axis(S.gd, 500, S.View, S.Proj); gc = new GroundedClip( Vector3.UnitY * 180, 0.2f, S.player, false, 0.17f); Game1.Draw3DEvent += gc.Draw; Game1.UpdateEvent += gc.Update; S.camera = new Camera3D(gc); }
public BVHActionPlayer(BVHAction defaultAction, Color color) { this.CurrentAction = this.DefaultAction = defaultAction; cylinder = new NCylinder(0.21f, 0.08f, 1, 6, color); bvh = S.bvhDic[CurrentAction.Bvhfile]; change_bvh(bvh, true); }
public BVHPlayer(BVHContent bvh, Color color) { cylinder = new NCylinder(0.21f, 0.08f, 1, 6, color); change_bvh(bvh, true); }