Path3D

@Serializable
class Path3D(val segments: List<Segment3D>, val closed: Boolean) : Path<Vector3> (source)

Constructors

Link copied to clipboard
constructor(segments: List<Segment3D>, closed: Boolean)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open fun adaptivePositions(distanceTolerance: Double = 0.5): List<Vector3>

Recursively subdivides linear Segment2Ds to approximate Bézier curves.

Link copied to clipboard
open fun adaptivePositionsWithT(distanceTolerance: Double = 0.5): List<Pair<Vector3, Double>>
Link copied to clipboard
open fun direction(ut: Double): Vector3
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open fun equidistantPositions(pointCount: Int, distanceTolerance: Double = 0.5): List<Vector3>

Returns specified amount of points of equal distance from each other.

Link copied to clipboard
open fun equidistantPositionsWithT(pointCount: Int, distanceTolerance: Double = 0.5): List<Pair<Vector3, Double>>
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun map(closed: Boolean = this.closed, mapper: (Segment3D) -> Segment3D): Path3D
Link copied to clipboard
fun on(point: Vector3, error: Double = 5.0): Double?

Checks if a give point lies on the contour

Link copied to clipboard
operator fun plus(other: Path3D): Path3D
Link copied to clipboard
open fun pointAtLength(length: Double, distanceTolerance: Double = 0.5): Vector3

Calculates the point at a given distance along this ShapeContour.

Link copied to clipboard
open fun position(ut: Double): Vector3

Returns a point on the path of the ShapeContour.

Link copied to clipboard

Project a point on the contour

Link copied to clipboard
fun sampleEquidistant(pointCount: Int, distanceTolerance: Double = 0.5): Path3D

Sample the shape contour into line segments

Link copied to clipboard
fun sampleLinear(distanceTolerance: Double = 0.5): Path3D

Adaptively sample the contour into line segments while still approximating the original contour

Link copied to clipboard
open fun segment(ut: Double): Pair<Int, Double>

Returns segment number and segment offset in a ShapeContour for the given ut.

Link copied to clipboard
open override fun sub(t0: Double, t1: Double): Path3D

Sample a sub contour

Link copied to clipboard
open fun tForLength(length: Double): Double

Estimates the t value for a given length.

Link copied to clipboard
fun transform(transform: Matrix44): Path3D

Properties

Link copied to clipboard
open override val closed: Boolean
Link copied to clipboard
open override val empty: Boolean
Link copied to clipboard
Link copied to clipboard
open override val infinity: Vector3
Link copied to clipboard
@Transient
open val length: Double
Link copied to clipboard
Link copied to clipboard
open override val segments: List<Segment3D>