-
Method Summary
double
Gets the length of the path.
Evaluates the path at time t.
eval(double t,
boolean reverse)
Evaluates the path at time t.
Evaluates the path at the specified arc length
Evaluates the path at the specified arc length
Returns a path iterator of the entire path.
Returns a path iterator of the specified sub-path.
Returns a path iterator over the specified sub-path.
boolean
Returns true if this path metrics is empty.
Implementations of PathMetrics should implement their toString
as follows:
Gets path metrics for the reversed path.
-
Method Details
-
arcLength
double arcLength()
Gets the length of the path.
- Returns:
- the length of the path in [0,Double.MAX_VALUE].
-
-
eval
Evaluates the path at time t.
- Parameters:
t - the time in the range [0,1]
- Returns:
- point and tangent at t
-
eval
Evaluates the path at time t.
- Parameters:
t - the time in the range [0,1]
reverse - whether to reverse the path
- Returns:
- point and tangent at t
-
evalAtArcLength
Evaluates the path at the specified arc length
- Parameters:
s - the arc length, the value will be clamped to [0,arcLength()]
- Returns:
- point and tangent at s
-
evalAtArcLength
Evaluates the path at the specified arc length
- Parameters:
s - the arc length, the value will be clamped to [0,arcLength()]
reverse - whether to reverse the path
- Returns:
- point and tangent at s
-
-
-
reverse
Gets path metrics for the reversed path.
- Returns:
- reverse path metrics
-
pathMetricsToString
Implementations of PathMetrics should implement their
toString
as follows:
public toString() {
return PathMetrics.pathMetricsToString(this);
}
- Parameters:
pm - the path metrics implementation
- Returns:
- a string representation
-
isEmpty
boolean isEmpty()
Returns true if this path metrics is empty.
- Returns:
- true if empty