public FillingTriangle(DragablePoint p1, DragablePoint p2, DragablePoint p3, Random generator) { Points.Add(p1); Points.Add(p2); Points.Add(p3); Kd = generator.NextDouble(); Ks = generator.NextDouble(); M = generator.Next(1, 100); }
private void Image_MouseUp(object sender, MouseButtonEventArgs e) { if (!isDragging) { return; } isDragging = false; point = null; //vm.UpdateBitmap(); }
private void Image_MouseDown(object sender, MouseButtonEventArgs e) { if (isDragging) { return; } var pos = e.GetPosition(sender as Image); foreach (var p in vm.Points) { if (p.IsHit(pos.X, pos.Y, 8)) { isDragging = true; point = p; return; } } }