Skip to content

Commit

Permalink
[orx-shapes] add RectifiedPath3D.path override
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinRNDR committed May 8, 2024
1 parent c4f28d2 commit 4c086d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion orx-shapes/src/commonMain/kotlin/rectify/RectifiedPath.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {
Expand Down
3 changes: 2 additions & 1 deletion orx-shapes/src/commonMain/kotlin/rectify/RectifiedPath3D.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 4c086d9

Please sign in to comment.