public override void UpdateTransforms(float zoomFactor) { RightAngTriangle3D raTri = _data.RATriangle; GizmoPlaneSlider3D slider = _data.Slider; Vector2 triSize = slider.GetRealRATriSize(zoomFactor); raTri.RightAngleCorner = slider.Position; raTri.Rotation = slider.Rotation; raTri.XLength = triSize.x; raTri.YLength = triSize.y; raTri.XLengthSign = triSize.x >= 0.0f ? AxisSign.Positive : AxisSign.Negative; raTri.YLengthSign = triSize.y >= 0.0f ? AxisSign.Positive : AxisSign.Negative; _data.RATriangleBorder.OnTriangleShapeChanged(); }
public GizmoRATriangle3DBorder(GizmoPlaneSlider3D planeSlider, GizmoHandle targetHandle, RightAngTriangle3D targetRiangle) { _planeSlider = planeSlider; _targetHandle = targetHandle; _targetTriangle = targetRiangle; _borderTriangleIndex = _targetHandle.Add3DShape(_borderTriangle); _borderTriangle.RaycastMode = Shape3DRaycastMode.Wire; _controllerData.Border = this; _controllerData.PlaneSlider = _planeSlider; _controllerData.Gizmo = _targetHandle.Gizmo; _controllerData.TargetHandle = _targetHandle; _controllerData.TargetTriangle = _targetTriangle; _controllerData.BorderTriangle = _borderTriangle; _controllerData.BorderTriangleIndex = _borderTriangleIndex; _controllers[(int)GizmoQuad3DBorderType.Thin] = new GizmoThinRATriangle3DBorderController(_controllerData); _targetHandle.Gizmo.PreUpdateBegin += OnGizmoPreUpdateBegin; }