public GizmoCircle3DBorder(GizmoPlaneSlider3D planeSlider, GizmoHandle targetHandle, CircleShape3D targetCircle)
        {
            _planeSlider = planeSlider;

            _targetHandle = targetHandle;
            _targetCircle = targetCircle;

            _borderCircleIndex        = _targetHandle.Add3DShape(_borderCircle);
            _borderCircle.RaycastMode = Shape3DRaycastMode.Wire;
            _borderTorusIndex         = _targetHandle.Add3DShape(_borderTorus);
            _borderTorus.WireRenderDesc.NumTubeSlices = 0;
            _borderCylTorusIndex = _targetHandle.Add3DShape(_borderCylTorus);

            _controllerData.Border              = this;
            _controllerData.PlaneSlider         = _planeSlider;
            _controllerData.Gizmo               = Gizmo;
            _controllerData.TargetHandle        = _targetHandle;
            _controllerData.TargetCircle        = targetCircle;
            _controllerData.BorderCircle        = _borderCircle;
            _controllerData.BorderTorus         = _borderTorus;
            _controllerData.BorderCylTorus      = _borderCylTorus;
            _controllerData.BorderCircleIndex   = _borderCircleIndex;
            _controllerData.BorderTorusIndex    = _borderTorusIndex;
            _controllerData.BorderCylTorusIndex = _borderCylTorusIndex;

            _controllers[(int)GizmoCircle3DBorderType.Thin]             = new GizmoThinCircle3DBorderController(_controllerData);
            _controllers[(int)GizmoCircle3DBorderType.Torus]            = new GizmoTorusCircle3DBorderController(_controllerData);
            _controllers[(int)GizmoCircle3DBorderType.CylindricalTorus] = new GizmoCylindricalTorusCircle3DBorderController(_controllerData);

            Gizmo.PreUpdateBegin += OnGizmoPreUpdateBegin;
        }
예제 #2
0
        public GizmoQuad3DBorder(GizmoPlaneSlider3D planeSlider, GizmoHandle targetHandle, QuadShape3D targetQuad)
        {
            _planeSlider = planeSlider;

            _targetHandle = targetHandle;
            _targetQuad   = targetQuad;

            _borderQuadIndex        = _targetHandle.Add3DShape(_borderQuad);
            _borderQuad.RaycastMode = Shape3DRaycastMode.Wire;

            _topBoxIndex         = _targetHandle.Add3DShape(_topBox);
            _rightBoxIndex       = _targetHandle.Add3DShape(_rightBox);
            _bottomBoxIndex      = _targetHandle.Add3DShape(_bottomBox);
            _leftBoxIndex        = _targetHandle.Add3DShape(_leftBox);
            _topLeftBoxIndex     = _targetHandle.Add3DShape(_topLeftBox);
            _topRightBoxIndex    = _targetHandle.Add3DShape(_topRightBox);
            _bottomRightBoxIndex = _targetHandle.Add3DShape(_bottomRightBox);
            _bottomLeftBoxIndex  = _targetHandle.Add3DShape(_bottomLeftBox);

            _sortedBoxIndices.Add(_topBoxIndex);
            _sortedBoxIndices.Add(_rightBoxIndex);
            _sortedBoxIndices.Add(_bottomBoxIndex);
            _sortedBoxIndices.Add(_leftBoxIndex);
            _sortedBoxIndices.Add(_topLeftBoxIndex);
            _sortedBoxIndices.Add(_topRightBoxIndex);
            _sortedBoxIndices.Add(_bottomRightBoxIndex);
            _sortedBoxIndices.Add(_bottomLeftBoxIndex);

            _controllerData.Border              = this;
            _controllerData.PlaneSlider         = _planeSlider;
            _controllerData.Gizmo               = Gizmo;
            _controllerData.TargetHandle        = _targetHandle;
            _controllerData.TargetQuad          = _targetQuad;
            _controllerData.BorderQuad          = _borderQuad;
            _controllerData.TopBox              = _topBox;
            _controllerData.RightBox            = _rightBox;
            _controllerData.BottomBox           = _bottomBox;
            _controllerData.LeftBox             = _leftBox;
            _controllerData.TopLeftBox          = _topLeftBox;
            _controllerData.TopRightBox         = _topRightBox;
            _controllerData.BottomRightBox      = _bottomRightBox;
            _controllerData.BottomLeftBox       = _bottomLeftBox;
            _controllerData.BorderQuadIndex     = _borderQuadIndex;
            _controllerData.TopBoxIndex         = _topBoxIndex;
            _controllerData.RightBoxIndex       = _rightBoxIndex;
            _controllerData.BottomBoxIndex      = _bottomBoxIndex;
            _controllerData.LeftBoxIndex        = _leftBoxIndex;
            _controllerData.TopLeftBoxIndex     = _topLeftBoxIndex;
            _controllerData.TopRightBoxIndex    = _topRightBoxIndex;
            _controllerData.BottomRightBoxIndex = _bottomRightBoxIndex;
            _controllerData.BottomLeftBoxIndex  = _bottomLeftBoxIndex;

            _controllers[(int)GizmoQuad3DBorderType.Thin] = new GizmoThinQuad3DBorderController(_controllerData);
            _controllers[(int)GizmoQuad3DBorderType.Box]  = new GizmoBoxQuad3DBorderController(_controllerData);

            Gizmo.PreUpdateBegin += OnGizmoPreUpdateBegin;
        }
        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;
        }