openrndr / org.openrndr.shape / Segment3D

Segment3D

class Segment3D (source)

Constructors

<init>

Linear segment constructor

Segment3D(start: Vector3, end: Vector3)

Quadratic bezier segment constructor

Segment3D(start: Vector3, c0: Vector3, end: Vector3)

Cubic bezier segment constructor

Segment3D(start: Vector3, c0: Vector3, c1: Vector3, end: Vector3)Segment3D(start: Vector3, control: Array<Vector3>, end: Vector3)

Properties

control

control points, zero-length iff the segment is linear

val control: Array<Vector3>

cubic

Cubic version of segment

val cubic: Segment3D

end

val end: Vector3

length

val length: Double

linear

val linear: Boolean

reverse

val reverse: Segment3D

start

val start: Vector3

Functions

copy

fun copy(start: Vector3 = this.start, control: Array<Vector3> = this.control, end: Vector3 = this.end): Segment3D

derivative

fun derivative(t: Double): Vector3

direction

fun direction(): Vector3
fun direction(t: Double): Vector3

equals

fun equals(other: Any?): Boolean

extrema

fun extrema(): List<Double>

extremaPoints

fun extremaPoints(): List<Vector3>

hashCode

fun hashCode(): Int

lut

fun lut(size: Int = 100): List<Vector3>

on

fun on(point: Vector3, error: Double = 5.0): Double?

position

fun position(ut: Double): Vector3

project

fun project(point: Vector3): SegmentProjection3D

sampleAdaptive

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

sampleAdaptiveNormals

fun sampleAdaptiveNormals(distanceTolerance: Double = 0.5): Pair<List<Vector3>, List<Vector3>>

split

Split the contour

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

sub

fun sub(t0: Double, t1: Double): Segment3D

toString

fun toString(): String

transform

fun transform(transform: Matrix44): Segment3D