Exemple #1
0
        public void SetAxisColor(int axisIndex, Color color)
        {
            GetSglSliderLookAndFeel(axisIndex, AxisSign.Positive).Color = color;
            GetSglSliderLookAndFeel(axisIndex, AxisSign.Positive).CapLookAndFeel.Color = color;
            GetSglSliderLookAndFeel(axisIndex, AxisSign.Negative).Color = color;
            GetSglSliderLookAndFeel(axisIndex, AxisSign.Negative).CapLookAndFeel.Color = color;

            GizmoPlaneSlider3DLookAndFeel dblLookAndFeel = null;

            if (axisIndex == 0)
            {
                dblLookAndFeel = GetDblSliderLookAndFeel(PlaneId.YZ);
                _scaleGuideLookAndFeel.XAxisColor = color;
            }
            else
            if (axisIndex == 1)
            {
                dblLookAndFeel = GetDblSliderLookAndFeel(PlaneId.ZX);
                _scaleGuideLookAndFeel.YAxisColor = color;
            }
            else
            if (axisIndex == 2)
            {
                dblLookAndFeel = GetDblSliderLookAndFeel(PlaneId.XY);
                _scaleGuideLookAndFeel.ZAxisColor = color;
            }

            dblLookAndFeel.Color       = ColorEx.KeepAllButAlpha(color, dblLookAndFeel.Color.a);
            dblLookAndFeel.BorderColor = color;
        }
        public RotationGizmoLookAndFeel3D()
        {
            for (int sliderIndex = 0; sliderIndex < _axesLookAndFeel.Length; ++sliderIndex)
            {
                _axesLookAndFeel[sliderIndex]           = new GizmoPlaneSlider3DLookAndFeel();
                _axesLookAndFeel[sliderIndex].PlaneType = GizmoPlane3DType.Circle;
            }

            SetAxisVisible(0, true);
            SetAxisVisible(1, true);
            SetAxisVisible(2, true);

            _midCapLookAndFeel.CapType          = GizmoCap3DType.Sphere;
            _camLookSliderLookAndFeel.PlaneType = GizmoPlane2DType.Polygon;

            Color midCapColor = new Color(0.3f, 0.3f, 0.3f, 0.12f);

            SetMidCapColor(midCapColor);
            SetHoveredMidCapColor(midCapColor);
            SetMidCapBorderVisible(true);
            SetMidCapBorderColor(Color.white);
            SetRadius(6.5f);

            SetAxisBorderColor(0, RTSystemValues.XAxisColor);
            SetAxisBorderColor(1, RTSystemValues.YAxisColor);
            SetAxisBorderColor(2, RTSystemValues.ZAxisColor);
            SetHoveredColor(RTSystemValues.HoveredAxisColor);
            SetCamLookSliderPolyBorderThickness(4.0f);
            SetCamLookSliderBorderColor(Color.white);
            SetCamLookSliderHoveredBorderColor(RTSystemValues.HoveredAxisColor);
            SetNumAxisTorusWireAxialSlices(2);
        }
Exemple #3
0
        public ScaleGizmoLookAndFeel3D()
        {
            for (int axisIndex = 0; axisIndex < _sglSlidersLookAndFeel.Length; ++axisIndex)
            {
                _sglSlidersLookAndFeel[axisIndex] = new GizmoLineSlider3DLookAndFeel();
            }

            for (int axisIndex = 0; axisIndex < _dblSlidersLookAndFeel.Length; ++axisIndex)
            {
                _dblSlidersLookAndFeel[axisIndex]           = new GizmoPlaneSlider3DLookAndFeel();
                _dblSlidersLookAndFeel[axisIndex].PlaneType = GizmoPlane3DType.RATriangle;
            }

            SetSliderCapType(GizmoCap3DType.Box);
            SetSliderLength(5.5f);

            SetAxisColor(0, RTSystemValues.XAxisColor);
            SetAxisColor(1, RTSystemValues.YAxisColor);
            SetAxisColor(2, RTSystemValues.ZAxisColor);
            SetHoveredColor(RTSystemValues.HoveredAxisColor);

            SetSliderVisible(0, AxisSign.Positive, true);
            SetSliderCapVisible(0, AxisSign.Positive, true);
            SetSliderVisible(1, AxisSign.Positive, true);
            SetSliderCapVisible(1, AxisSign.Positive, true);
            SetSliderVisible(2, AxisSign.Positive, true);
            SetSliderCapVisible(2, AxisSign.Positive, true);

            SetMidCapColor(RTSystemValues.CenterAxisColor);
            SetMidCapType(GizmoCap3DType.Box);
            SetMidCapBoxWidth(0.9f);
            SetMidCapBoxHeight(0.9f);
            SetMidCapBoxDepth(0.9f);
            SetMidCapSphereRadius(0.65f);

            SetDblSliderFillAlpha(RTSystemValues.AxisAlpha);
            SetDblSliderSize(1.9f);
            SetDblSliderVisible(PlaneId.XY, true);
            SetDblSliderVisible(PlaneId.YZ, true);
            SetDblSliderVisible(PlaneId.ZX, true);
        }