示例#1
0
        protected override void UpdateBounds()
        {
            LeaveBounds = new TrajectoryBound(new StraightTrajectory(Position, Position + NodeMarkupTool.CameraDirection * (Step * Points.Count)), PointSize + 3 * Space);

            foreach (var point in Points)
            {
                var pointPosition = Points.Count > 1 ? Position + NodeMarkupTool.CameraDirection * (Step * (PointsBounds.Count + 1)) : Position;
                var pointBounds   = new Bounds(pointPosition, Vector3.one * PointSize);
                PointsBounds.Add(point, pointBounds);
            }
        }
示例#2
0
        protected override void UpdateBounds()
        {
            R           = Points.Count > 1 ? (OverlaySize + Space) / 2 / Mathf.Sin(180 / Points.Count * Mathf.Deg2Rad) : OverlaySize;
            GroupSize   = Points.Count > 1 ? (R + OverlaySize + Space) * 2 : OverlaySize;
            LeaveBounds = new Bounds(Position, Vector3.one * GroupSize);

            foreach (var point in Points)
            {
                var pointPosition = Points.Count > 1 ? Position + Vector3.forward.TurnDeg(360 / Points.Count * PointsBounds.Count, true) * R : Position;
                var pointBounds   = new Bounds(pointPosition, Vector3.one * OverlaySize);
                PointsBounds.Add(point, pointBounds);
            }
        }
示例#3
0
        protected override void UpdateBounds()
        {
            var r   = Mathf.Max((Step / 2) / Mathf.Sin(180 / Points.Count * Mathf.Deg2Rad), Step);
            var dir = NodeMarkupTool.CameraDirection.Turn90(true);

            CircleLeaveBounds = new Bounds(Position, Vector3.one * (Points.Count > 1 ? (2 * r + PointSize + 3 * Space) : PointSize));
            LineLeaveBounds   = new TrajectoryBound(new StraightTrajectory(Position - dir * r, Position + dir * r), PointSize + 3 * Space);

            foreach (var point in Points)
            {
                var pointPosition = Points.Count > 1 ? Position + dir.TurnDeg(360 / Points.Count * PointsBounds.Count, true) * r : Position;
                var pointBounds   = new Bounds(pointPosition, Vector3.one * PointSize);
                PointsBounds.Add(point, pointBounds);
            }
        }
示例#4
0
        protected override void UpdateBounds()
        {
            var dir = NodeMarkupTool.CameraDirection;

            dir.y = 0;
            dir.Normalize();
            var step   = OverlaySize + Space;
            var bezier = new Bezier3();

            bezier.a    = bezier.c = Position;
            bezier.d    = bezier.b = Position + dir * (step * Points.Count);
            LeaveBounds = new BezierBounds(bezier, OverlaySize + 4 * Space);

            foreach (var point in Points)
            {
                var pointPosition = Points.Count > 1 ? Position + dir * (step * (PointsBounds.Count + 1)) : Position;
                var pointBounds   = new Bounds(pointPosition, Vector3.one * OverlaySize);
                PointsBounds.Add(point, pointBounds);
            }
        }