[orx-shapes] add RectifiedPath3D.path override
This commit is contained in:
@@ -11,7 +11,7 @@ import org.openrndr.shape.ShapeContour
|
||||
* RectifiedContour provides an approximately uniform parameterization for [ShapeContour]
|
||||
*/
|
||||
abstract class RectifiedPath<T : EuclideanVector<T>>(
|
||||
val path: Path<T>,
|
||||
open val path: Path<T>,
|
||||
distanceTolerance: Double = 0.5,
|
||||
lengthScale: Double = 1.0
|
||||
) {
|
||||
|
||||
@@ -7,8 +7,9 @@ import kotlin.math.floor
|
||||
class RectifiedPath3D(contour: Path3D, distanceTolerance: Double = 0.5, lengthScale: Double = 1.0) :
|
||||
RectifiedPath<Vector3>(contour, distanceTolerance, lengthScale) {
|
||||
|
||||
override val path: Path3D = super.path as Path3D
|
||||
|
||||
override fun sub(t0: Double, t1: Double): Path3D {
|
||||
path as Path3D
|
||||
if (path.empty) {
|
||||
return Path3D(emptyList(), false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user