private void MoveModel(MoveStruct moveKoefs) { foreach (Polygon pol in polygons) { foreach (PointInt v in pol.GetPointInts()) { Moving.MovePoint(ref v.x, ref v.y, ref v.z, moveKoefs); } } }
public Scene GetTransformed(RotateStruct turnKoefs, ScaleStruct scaleKoefs, MoveStruct moveKoefs) { Scene s = new Scene(size); foreach (Object obj in scene) { s.AddModel(obj.Transform(turnKoefs, scaleKoefs, moveKoefs)); } return(s); }
private void CreateScene_Click(object sender, EventArgs e) { turnKoefs = new RotateStruct(-90, 0, 0); scaleKoefs = new ScaleStruct(1.25, 1.25, 1.25); moveKoefs = new MoveStruct(canvas.Width / 2, canvas.Height / 2 - 150, 0); scene = new Scene(canvas.Size); CreateCloud(); if (CheckGenGround.Checked) { CreateGround(); } SetSun(); HandleSceneChange(); }
public static void MovePoint(ref int x, ref int y, ref int z, MoveStruct moveKoefs) { x += moveKoefs.dx; y += moveKoefs.dy; z += moveKoefs.dz; }
public override Object Transform(RotateStruct turnKoefs, ScaleStruct scaleKoefs, MoveStruct moveKoefs) { Map newMap = new Map(map); Shape shape = new Shape(newMap, col, dh); shape.TurnModel(turnKoefs); shape.ScaleModel(scaleKoefs); shape.MoveModel(moveKoefs); return(shape); }
public abstract Object Transform(RotateStruct turnKoefs, ScaleStruct scaleKoefs, MoveStruct moveKoefs);