public override void LoadContent() { var mesh = ContentManager.Load<Mesh>("audi.ASE"); //mesh.Position.X = -30; mesh.World = Matrix.CreateScale(new Vector(10f, 10f, 10f)); Scene.AddNode(mesh); _lightSprite = ContentManager.Load<Sprite>("sun.png"); Scene.AddNode(_lightSprite); var sprite = ContentManager.Load<Sprite>("recycle.png"); sprite.Position = new Vector(-10,0,0); //Scene.AddNode(sprite); Display.BackgroundColor = Color.FromArgb(0xff, 0, 0, 0); var cylinder = ContentManager.CreateCylinder(10f, 20f, 8, 1); light = new OmniLight(); light.Range = 3.0f; light.Position.X = 0; light.Position.Y = 0; light.Position.Z = -30; light.ColorDiffuse = Color.FromArgb(0xff, 0x1f, 0x1f, 0x6f); light.ColorSpecular = Color.FromArgb(0xff, 0xff, 0xff, 0xff); light.ColorAmbient = Color.FromArgb(0xff, 0, 0x5f, 0); Scene.AddNode(light); }
private void Game_Initialize(Game game) { game.ContentManager.AssetsRoot = "Samples/Programatic/Materials/Assets"; var light = new OmniLight { Ambient = Colors.Black, Diffuse = Colors.Black, Specular = Colors.White, Position = new Coordinate(0, 400, 0) }; game.Scene.AddNode(light); game.Camera.Position.Set(0,80,-150); game.Camera.Target.Set(0,10,0); }
public override void OnInitialize() { ContentManager.AssetsRoot = "Samples/Programatic/Teapot/Assets"; var light = new OmniLight(); light.Diffuse = Color.FromArgb(0xff, 255, 121, 32); light.Specular = Color.FromArgb(0xff, 0xff, 0xff, 0xff); light.Ambient = Color.FromArgb(0xff, 0x7f, 0x3f, 0x10); light.Position.X = -100; light.Position.Y = 0; light.Position.Z = 0; Scene.AddNode(light); Camera.Position.X = 0; Camera.Position.Y = 20; Camera.Position.Z = -100; Camera.Target.Y = 0; base.OnInitialize(); }
public override void LoadContent() { var mesh = ContentManager.Load<Mesh>("pumpkin.ASE"); Scene.AddNode(mesh); //mesh.World = Matrix.CreateScale(new Vector(10f, 10f, 10f)); _lightSprite = ContentManager.Load<Sprite>("sun.png"); //Scene.AddNode(_lightSprite); Display.BackgroundColor = Color.FromArgb(0xff, 0, 0, 0); light = new OmniLight(); light.Range = 2.0f; light.Position.X = 0; light.Position.Y = 0; light.Position.Z = -30; light.ColorDiffuse = Color.FromArgb(0xff, 255, 121, 32); light.ColorSpecular = Color.FromArgb(0xff, 0xff, 0xff, 0xff); light.ColorAmbient = Color.FromArgb(0xff, 0x7f, 0x3f, 0x10); Scene.AddNode(light); }