/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); Model model_car = Content.Load<Model>("car"); SceneGraph.Entity car = new SceneGraph.Entity("car", model_car); SceneGraph.Node node = new SceneGraph.Node(car); sceneGraph = new SceneGraph.SceneGraph(node); //sceneGraph.Camera.World = Matrix.CreateFromYawPitchRoll(0, -90, 90); sceneGraph.Camera.View = Matrix.CreateLookAt(new Vector3(0, 2, 5), Vector3.Zero, Vector3.Up); sceneGraph.Camera.Projection = Matrix.CreatePerspectiveFieldOfView(1, GraphicsDevice.Viewport.AspectRatio, 1, 100); car.move(.2f, -.8f, -2); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); Model model_car = Content.Load <Model>("car"); SceneGraph.Entity car = new SceneGraph.Entity("car", model_car); SceneGraph.Node node = new SceneGraph.Node(car); sceneGraph = new SceneGraph.SceneGraph(node); //sceneGraph.Camera.World = Matrix.CreateFromYawPitchRoll(0, -90, 90); sceneGraph.Camera.View = Matrix.CreateLookAt(new Vector3(0, 2, 5), Vector3.Zero, Vector3.Up); sceneGraph.Camera.Projection = Matrix.CreatePerspectiveFieldOfView(1, GraphicsDevice.Viewport.AspectRatio, 1, 100); car.move(.2f, -.8f, -2); }