Segment3D

class Segment3D

Constructors

Link copied to clipboard
fun Segment3D(start: Vector3, end: Vector3)

Linear segment constructor

Link copied to clipboard
fun Segment3D(    start: Vector3,     c0: Vector3,     end: Vector3)

Quadratic bezier segment constructor

Link copied to clipboard
fun Segment3D(    start: Vector3,     c0: Vector3,     c1: Vector3,     end: Vector3)

Cubic bezier segment constructor

Link copied to clipboard
fun Segment3D(    start: Vector3,     control: Array<Vector3>,     end: Vector3)

Functions

Link copied to clipboard
fun adaptivePositions(distanceTolerance: Double = 0.5): List<Vector3>
Link copied to clipboard
fun adaptivePositionsWithT(distanceTolerance: Double = 0.5): List<Pair<Vector3, Double>>
Link copied to clipboard
fun copy(    start: Vector3 = this.start,     control: Array<Vector3> = this.control,     end: Vector3 = this.end): Segment3D
Link copied to clipboard
fun derivative(t: Double): Vector3
Link copied to clipboard
fun direction(): Vector3
fun direction(t: Double): Vector3
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun equidistantPositions(pointCount: Int, distanceTolerance: Double = 0.5): List<Vector3>

Samples specified amount of points on the Segment3D.

Link copied to clipboard
fun equidistantPositionsWithT(pointCount: Int, distanceTolerance: Double = 0.5): List<Pair<Vector3, Double>>
Link copied to clipboard
fun extrema(): List<Double>
Link copied to clipboard
fun extremaPoints(): List<Vector3>
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun lut(size: Int = 100): List<Vector3>
Link copied to clipboard
fun on(point: Vector3, error: Double = 5.0): Double?
Link copied to clipboard
fun position(ut: Double): Vector3
Link copied to clipboard
fun project(point: Vector3): SegmentProjection3D
Link copied to clipboard
fun split(t: Double): Array<Segment3D>

Split the contour

Link copied to clipboard
fun sub(t0: Double, t1: Double): Segment3D
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun transform(transform: Matrix44): Segment3D

Properties

Link copied to clipboard
val control: Array<Vector3>

control points, zero-length iff the segment is linear

Link copied to clipboard
val cubic: Segment3D

Cubic version of segment

Link copied to clipboard
val end: Vector3
Link copied to clipboard
val length: Double
Link copied to clipboard
val linear: Boolean
Link copied to clipboard
val reverse: Segment3D
Link copied to clipboard
val start: Vector3

Sources

Link copied to clipboard