# Path3D

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

## Constructors

constructor(segments: List<Segment3D>, closed: Boolean)

object Companion

## Functions

open fun adaptivePositions(distanceTolerance: Double = 0.5): List<Vector3>

Recursively subdivides linear Segment2Ds to approximate Bézier curves.

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

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

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

Checks if a give point lies on the contour

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

Calculates the point at a given distance along this ShapeContour.

open fun position(ut: Double): Vector3

Returns a point on the path of the ShapeContour.

Project a point on the contour

fun sampleEquidistant(pointCount: Int, distanceTolerance: Double = 0.5): Path3D

Sample the shape contour into line segments

fun sampleLinear(distanceTolerance: Double = 0.5): Path3D

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

open fun segment(ut: Double): Pair<Int, Double>

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

open override fun sub(t0: Double, t1: Double): Path3D

Sample a sub contour

open fun tForLength(length: Double): Double

Estimates the t value for a given length.

fun transform(transform: Matrix44): Path3D