private SceneObject CreateSphere() { var model = new SceneObject(); model.AddObject(new Sphere3d(new Point3d(-220, 0, 0), 100f, new Color(100, 0, 255), new Material(5, 10, 5, 10, 0, 10))); model.AddObject(new Sphere3d(new Point3d(0, 50, 130), 50f, new Color(255, 97, 97), new Material(5, 10, 5, 10, 0, 10))); model.AddObject(new Sphere3d(new Point3d(220, 0, 0), 100f, new Color(230, 85, 135), new Material(5, 10, 5, 6, 0, 10))); return(model); }
public void CreateModel(SettingsSphere settings) { var model = new SceneObject(); Sphere3d sphere = new Sphere3d(settings.Center, settings.Radius, settings.Color, settings.Material); model.AddObject(sphere); Scene.AddModel(model); }
public SceneObject CreateSurface() { var model = new SceneObject(); Color color = new Color(55, 200, 155); // Bottom model.AddObject(new Triangle3d( new Point3d(-500, -500, -100), new Point3d(500, -500, -100), new Point3d(500, 500, -100), color, new Material(1, 6, 0, 0, 0, 0))); model.AddObject(new Triangle3d( new Point3d(-500, -500, -100), new Point3d(-500, 500, -100), new Point3d(500, 500, -100), color, new Material(1, 6, 0, 0, 0, 0))); //// Top //model.AddObject(new Triangle3d( // new Point3d(-500, -500, 400), // new Point3d(500, -500, 400), // new Point3d(500, 500, 400), // color, // new Material(1, 6, 0, 0, 0, 0))); //model.AddObject(new Triangle3d( // new Point3d(-500, -500, 400), // new Point3d(-500, 500, 400), // new Point3d(500, 500, 400), // color, // new Material(1, 6, 0, 0, 0, 0))); ////Back //model.AddObject(new Triangle3d( // new Point3d(-500, 500, -100), // new Point3d(500, 500, -100), // new Point3d(-500, 500, 400), // color, // new Material(1, 6, 0, 0, 0, 0))); //model.AddObject(new Triangle3d( // new Point3d(500, 500, -100), // new Point3d(500, 500, 400), // new Point3d(-500, 500, 400), // color, // new Material(1, 6, 0, 0, 0, 0))); ////Left //model.AddObject(new Triangle3d( // new Point3d(-500, 500, -100), // new Point3d(-500, 500, 400), // new Point3d(-500, -500, -100), // color, // new Material(1, 6, 0, 0, 0, 0))); //model.AddObject(new Triangle3d( // new Point3d(-500, 500, 400), // new Point3d(-500, -500, 400), // new Point3d(-500, -500, -100), // color, // new Material(1, 6, 0, 0, 0, 0))); ////Right //model.AddObject(new Triangle3d( // new Point3d(500, 500, -100), // new Point3d(500, 500, 400), // new Point3d(500, -500, -100), // color, // new Material(1, 6, 0, 0, 0, 0))); //model.AddObject(new Triangle3d( // new Point3d(500, 500, 400), // new Point3d(500, -500, 400), // new Point3d(500, -500, -100), // color, // new Material(1, 6, 0, 0, 0, 0))); //// ЗА мной //model.AddObject(new Triangle3d( // new Point3d(-500, -500, -100), // new Point3d(-500, -500, 400), // new Point3d(500, -500, -100), // color, // new Material(1, 6, 0, 0, 0, 0))); //model.AddObject(new Triangle3d( // new Point3d(500, -500, -100), // new Point3d(500, -500, 400), // new Point3d(-500, -500, 400), // color, // new Material(1, 6, 0, 0, 0, 0))); return(model); }