public void UpdateTransform(SceneViewport sceneViewport) { var screenPosition = sceneViewport.WorldToScreenPosition(_worldPosition); _gizmoPath.SetValue(Canvas.LeftProperty, screenPosition.X); _gizmoPath.SetValue(Canvas.TopProperty, screenPosition.Y); UpdateGeometry(); }
public void UpdateTransform(SceneViewport sceneViewport) { var originScreen = sceneViewport.WorldToScreenPosition(Vector2.Zero); var originCanvas = new Vector(originScreen.X, originScreen.Y); _lineX.X1 = 0; _lineX.X2 = sceneViewport.ActualWidth; _lineX.Y1 = _lineX.Y2 = originCanvas.Y; _lineY.Y1 = 0; _lineY.Y2 = sceneViewport.ActualHeight; _lineY.X1 = _lineY.X2 = originCanvas.X; }