[orx-shapes] Implement GeometricPrimitive2D and GeometricPrimitive3D interfaces in BezierPatch and BezierPatch3D

This commit is contained in:
Edwin Jakobs
2025-08-26 21:52:13 +02:00
parent 3f0058f94a
commit 4e8267ceeb
2 changed files with 4 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package org.openrndr.extra.shapes.bezierpatches
import org.openrndr.color.AlgebraicColor
import org.openrndr.color.ColorRGBa
import org.openrndr.color.ConvertibleToColorRGBa
import org.openrndr.math.GeometricPrimitive2D
import org.openrndr.math.Matrix44
import org.openrndr.math.Vector2
import org.openrndr.shape.Rectangle
@@ -225,7 +226,7 @@ open class BezierPatchBase<C>(
}
class BezierPatch(points: List<List<Vector2>>, colors: List<List<ColorRGBa>> = emptyList()) :
BezierPatchBase<ColorRGBa>(points, colors)
BezierPatchBase<ColorRGBa>(points, colors), GeometricPrimitive2D
/**
* Create a cubic bezier patch from 4 segments. The control points of the segments are used in row-wise fashion

View File

@@ -3,6 +3,7 @@ package org.openrndr.extra.shapes.bezierpatches
import org.openrndr.color.AlgebraicColor
import org.openrndr.color.ColorRGBa
import org.openrndr.color.ConvertibleToColorRGBa
import org.openrndr.math.GeometricPrimitive3D
import org.openrndr.math.Matrix44
import org.openrndr.math.Vector3
import org.openrndr.shape.Path3D
@@ -229,7 +230,7 @@ open class BezierPatch3DBase<C>(
}
class BezierPatch3D(points: List<List<Vector3>>, colors: List<List<ColorRGBa>> = emptyList()) :
BezierPatch3DBase<ColorRGBa>(points, colors)
BezierPatch3DBase<ColorRGBa>(points, colors), GeometricPrimitive3D
/**
* Create a cubic bezier patch from 4 segments. The control points of the segments are used in row-wise fashion