Ejemplo n.º 1
0
        public GizmoPolygon2DBorder(GizmoPlaneSlider2D planeSlider, GizmoHandle targetHandle, PolygonShape2D targetPolygon)
        {
            _planeSlider = planeSlider;

            _targetHandle  = targetHandle;
            _targetPolygon = targetPolygon;

            _borderPolygonIndex          = _targetHandle.Add2DShape(_borderPolygon);
            _borderPolygon.PtContainMode = Shape2DPtContainMode.OnBorder;

            _thickBorderPolygonIndex          = _targetHandle.Add2DShape(_thickBorderPolygon);
            _thickBorderPolygon.PtContainMode = Shape2DPtContainMode.OnBorder;
            _thickBorderPolygon.BorderRenderDesc.BorderType = Shape2DBorderType.Thick;
            _thickBorderPolygon.BorderRenderDesc.Direction  = Shape2DBorderDirection.Outward;

            _controllerData.Border                  = this;
            _controllerData.PlaneSlider             = _planeSlider;
            _controllerData.BorderPolygon           = _borderPolygon;
            _controllerData.BorderPolygonIndex      = _borderPolygonIndex;
            _controllerData.ThickBorderPolygon      = _thickBorderPolygon;
            _controllerData.ThickBorderPolygonIndex = _thickBorderPolygonIndex;
            _controllerData.Gizmo         = targetHandle.Gizmo;
            _controllerData.TargetHandle  = targetHandle;
            _controllerData.TargetPolygon = _targetPolygon;

            _controllers[(int)GizmoPolygon2DBorderType.Thin]  = new GizmoThinPolygon2DBorderController(_controllerData);
            _controllers[(int)GizmoPolygon2DBorderType.Thick] = new GizmoThickPolygon2DBorderController(_controllerData);

            _targetHandle.Gizmo.PreUpdateBegin += OnGizmoPreUpdateBegin;
        }
Ejemplo n.º 2
0
        public SceneGizmoCamPrjSwitchLabel(SceneGizmo sceneGizmo)
        {
            _sceneGizmo = sceneGizmo;
            _handle     = _sceneGizmo.Gizmo.CreateHandle(GizmoHandleId.SceneGizmoCamPrjSwitchLabel);
            _handle.Add2DShape(_labelQuad);

            sceneGizmo.Gizmo.PreUpdateBegin  += OnGizmoPreUpdateBegin;
            sceneGizmo.Gizmo.PreHandlePicked += OnGizmoHandlePicked;
        }
        public GizmoCircle2DBorder(GizmoPlaneSlider2D planeSlider, GizmoHandle targetHandle, CircleShape2D targetCircle)
        {
            _planeSlider = planeSlider;

            _targetHandle = targetHandle;
            _targetCircle = targetCircle;

            _borderCircleIndex          = _targetHandle.Add2DShape(_borderCircle);
            _borderCircle.PtContainMode = Shape2DPtContainMode.OnBorder;

            _controllerData.Border            = this;
            _controllerData.PlaneSlider       = _planeSlider;
            _controllerData.BorderCircle      = _borderCircle;
            _controllerData.BorderCircleIndex = _borderCircleIndex;
            _controllerData.Gizmo             = targetHandle.Gizmo;
            _controllerData.TargetHandle      = targetHandle;
            _controllerData.TargetCircle      = _targetCircle;

            _controllers[(int)GizmoCircle2DBorderType.Thin] = new GizmoThinCircle2DBorderController(_controllerData);

            _targetHandle.Gizmo.PreUpdateBegin += OnGizmoPreUpdateBegin;
        }