/// <summary> /// Handles hit testing on mouse down. /// </summary> /// <param name="pt">The hit point.</param> /// <param name="originalInputEventArgs"> /// The original input event for future use (which mouse button pressed?) /// </param> private void MouseDownHitTest(Point pt, PointerRoutedEventArgs originalInputEventArgs = null) { if (!enableMouseButtonHitTest) { return; } var hits = this.FindHits(pt); if (hits.Count > 0) { this.currentHit = hits.FirstOrDefault(x => x.IsValid); if (this.currentHit != null) { (this.currentHit.ModelHit as Element3D)?.RaiseMouseDownEvent(this.currentHit, pt, this); } } else { currentHit = null; } this.OnMouse3DDown?.Invoke(this, new MouseDown3DEventArgs(currentHit, pt, this)); }
public MouseMove3DEventArgs(HitTestResult hitTestResult, Point position, Viewport3DX viewport = null) : base(hitTestResult, position, viewport) { }
public Mouse3DEventArgs(HitTestResult hitTestResult, Point position, Viewport3DX viewport = null) { this.HitTestResult = hitTestResult; this.Position = position; this.Viewport = viewport; }
internal void RaiseMouseMoveEvent(HitTestResult hitTestResult, Point p, Viewport3DX viewport = null) { OnMouse3DMove?.Invoke(this, new MouseMove3DEventArgs(hitTestResult, p, viewport)); }
public MouseMove3DEventArgs(HitTestResult hitTestResult, Point position, Viewport3DX viewport = null, PointerRoutedEventArgs originalInputEventArgs = null) : base(hitTestResult, position, viewport, originalInputEventArgs) { }
internal void RaiseMouseMoveEvent(HitTestResult hitTestResult, Point p, Viewport3DX viewport = null, PointerRoutedEventArgs originalInputEventArgs = null) { OnMouse3DMove?.Invoke(this, new MouseMove3DEventArgs(hitTestResult, p, viewport, originalInputEventArgs)); }