Esempio n. 1
0
        public static Vector3 Edge2DHandleOffset(int id, Vector3 from, Vector3 to, Vector3 slideDir1, Vector3 slideDir2, CapFunction capFunction = null, Axes axes = Axes.None, Vector3?snappingSteps = null, bool setCursor = true, bool renderEdge = true)
        {
            var midPoint  = (from + to) * 0.5f;
            var handleDir = Vector3.Cross(slideDir1, slideDir2);

            return(SceneHandles.Edge2DHandleOffset(id, from, to, midPoint, handleDir, slideDir1, slideDir2, 0, capFunction, axes, snappingSteps, setCursor: setCursor, renderEdge: renderEdge));
        }
Esempio n. 2
0
        public static Vector3 Edge2DHandleTangentOffset(int id, Vector3 from, Vector3 to, CapFunction capFunction = null, Vector3?snappingSteps = null, bool setCursor = true, bool renderEdge = true)
        {
            var edgeDelta = from - to;
            var grid      = Grid.ActiveGrid;
            var edgeAxis  = grid.GetClosestAxis(edgeDelta);
            var axes      = grid.GetTangentAxesForAxis(edgeAxis, out Vector3 slideDir1, out Vector3 slideDir2);
            var midPoint  = (from + to) * 0.5f;
            var handleDir = Vector3.Cross(slideDir1, slideDir2);

            return(SceneHandles.Edge2DHandleOffset(id, from, to, midPoint, handleDir, slideDir1, slideDir2, 0, capFunction, axes, snappingSteps, setCursor: setCursor, renderEdge: renderEdge));
        }