예제 #1
0
파일: BoneGizmo.cs 프로젝트: thomasvt/pose
        public void UpdateTransform(SceneViewport sceneViewport)
        {
            var screenPosition = sceneViewport.WorldToScreenPosition(_worldPosition);

            _gizmoPath.SetValue(Canvas.LeftProperty, screenPosition.X);
            _gizmoPath.SetValue(Canvas.TopProperty, screenPosition.Y);

            UpdateGeometry();
        }
예제 #2
0
파일: AxesGizmo.cs 프로젝트: thomasvt/pose
        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;
        }