private void _glPanel3D_MouseDown(object sender, MouseButtonEventArgs e) { var downP = _glPanel3D.GetPosition(); var retts = _glPanel3D.HitTest(downP); if (!_glPanel3D.Selector.IsVisible) { _glPanel3D.Selector.P1 = downP; _glPanel3D.Selector.P2 = downP; _glPanel3D.Selector.IsVisible = true; } else { _glPanel3D.Selector.IsVisible = false; var rets = _glPanel3D.HitTest(new RectF(_glPanel3D.Selector.P1, _glPanel3D.Selector.P2), _glPanel3D.Selector.P1.X < _glPanel3D.Selector.P2.X ? RectHitTestMode.FullContain : RectHitTestMode.Intersect); } }
private void _glPanel3D_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { var downP = _glPanel3D.GetPosition(); var rets = _glPanel3D.HitTest(downP); if (rets.Count() > 0) { var first = rets.First(); if (first.Mesh.Type == MeshType.Triangle) { var t = (TriangleMesh)first.Mesh; _mesh.DeleteVertex(t.Index1); MeshData = MeshUtil.ConvertTo(_mesh); } } }