Variables

read onlynumSegments:Int

The number of CubicPathSegment instances in the path.

read onlysegments:Vector<IPathSegment>

The IPathSegment instances which make up this path.

Methods

addSegment(segment:IPathSegment):Void

Adds a CubicPathSegment to the end of the path

Parameters:

null

segment

dispose():Void

Disposes the path and all the segments

@:value({ target : null })getPointOnCurve(t:Float, ?target:Vector3D):Vector3D

Gets a point on the curve

Parameters:

t

The phase for which to get the point. A number between 0 and 1.

target

An optional parameter to store the calculation, to avoid creating a new Vector3D object

Returns:

The point on the curve for the given phase

getPointsOnCurvePerSegment(numSegments:Int):Vector<Vector<Vector3D>>

Discretizes the segment into a set of sample points.

Parameters:

numSegments

The amount of segments to split the sampling in. The amount of points returned is numSegments + 1

getSegmentAt(index:Int):IPathSegment

Returns the CubicPathSegment at the specified index

Parameters:

index

The index of the segment

Returns:

A CubicPathSegment instance

@:value({ join : false })removeSegment(index:Int, join:Bool = false):Void

Removes a segment from the path

Parameters:

index

The index of the CubicPathSegment to be removed

join

Determines if the segments on either side of the removed segment should be adjusted so there is no gap.