# Segment3D

@Serializable
class Segment3D(val start: Vector3, val control: List<Vector3>, val end: Vector3) : BezierSegment<Vector3> (source)

## Constructors

constructor(start: Vector3, control: List<Vector3>, end: Vector3)

## Functions

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

Recursively subdivides Segment2D to approximate Bézier curve.

open fun adaptivePositionsWithT(distanceTolerance: Double = 0.5): List<Pair<Vector3, Double>>
fun copy(start: Vector3 = this.start, control: List<Vector3> = this.control, end: Vector3 = this.end): Segment3D
open override fun derivative(t: Double): Vector3
open fun direction(): Vector3

Returns the direction T of between the Segment2D anchor points.

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

Samples specified amount of points on the Segment2D.

open fun equidistantPositionsWithT(pointCount: Int, distanceTolerance: Double = 0.5): List<Pair<Vector3, Double>>
open override fun hashCode(): Int
fun lut(size: Int = 100): List<Vector3>
fun on(point: Vector3, error: Double = 5.0): Double?
open fun pointAtLength(length: Double, distanceTolerance: Double): Vector3

Calculates the point at a given distance along this Segment2D.

open override fun position(ut: Double): Vector3

Returns a point on the segment.

open override fun split(t: Double): Array<Segment3D>

Split the contour

open fun sub(t0: Double, t1: Double): BezierSegment<Vector3>

Samples a new Segment2D from the current Segment2D starting at t0 and ending at t1.

open override fun tForLength(length: Double): Double

Estimate t value for a given length

open override fun toString(): String
fun transform(transform: Matrix44): Segment3D

## Properties

open override val control: List<Vector3>
open override val cubic: Segment3D

Cubic version of segment

open override val end: Vector3
open override val length: Double
@Transient
open val linear: Boolean

Indicates whether the Segment2D is linear.