Example #1
0
 /// <summary> Splits bezier path into array of vertices along the path.</summary>
 ///<param name="maxAngleError">How much can the angle of the path change before a vertex is added. This allows fewer vertices to be generated in straighter sections.</param>
 ///<param name="minVertexDst">Vertices won't be added closer together than this distance, regardless of angle error.</param>
 public VertexPath(BezierPath bezierPath, Transform transform, float maxAngleError = 0.3f,
                   float minVertexDst = 0) :
     this(bezierPath,
          VertexPathUtility.SplitBezierPathByAngleError(bezierPath, maxAngleError, minVertexDst,
                                                        VertexPath.accuracy), transform)
 {
 }
Example #2
0
 /// <summary> Splits bezier path into array of vertices along the path.</summary>
 ///<param name="maxAngleError">How much can the angle of the path change before a vertex is added. This allows fewer vertices to be generated in straighter sections.</param>
 ///<param name="minVertexDst">Vertices won't be added closer together than this distance, regardless of angle error.</param>
 ///<param name="accuracy">Higher value means the change in angle is checked more frequently.</param>
 public VertexPath(BezierPath bezierPath, Transform transform, float vertexSpacing) :
     this(bezierPath, VertexPathUtility.SplitBezierPathEvenly(bezierPath, Mathf.Max(vertexSpacing, minVertexSpacing), VertexPath.accuracy), transform)
 {
 }
Example #3
0
 /// <summary> Splits bezier path into array of vertices along the path.</summary>
 ///<param name="maxAngleError">How much can the angle of the path change before a vertex is added. This allows fewer vertices to be generated in straighter sections.</param>
 ///<param name="minVertexDst">Vertices won't be added closer together than this distance, regardless of angle error.</param>
 ///<param name="accuracy">Higher value means the change in angle is checked more frequently.</param>
 public VertexPath(BezierPath bezierPath, float vertexSpacing) : this(
         bezierPath,
         VertexPathUtility.SplitBezierPathEvenly(bezierPath, Mathf.Max(vertexSpacing, MinVertexSpacing), Accuracy))
 {
 }
Example #4
0
 /// <summary> Splits bezier path into array of vertices along the path.</summary>
 ///<param name="maxAngleError">How much can the angle of the path change before a vertex is added. This allows fewer vertices to be generated in straighter sections.</param>
 ///<param name="minVertexDst">Vertices won't be added closer together than this distance, regardless of angle error.</param>
 public VertexPath(BezierPath bezierPath, float maxAngleError = 0.3f, float minVertexDst = 0) : this(
         bezierPath,
         VertexPathUtility.SplitBezierPathByAngleError(bezierPath, maxAngleError, minVertexDst, Accuracy))
 {
 }