openrndr / org.openrndr.shape / Path3D

Path3D

class Path3D (source)

Constructors

<init>

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

Properties

closed

val closed: Boolean

exploded

val exploded: List<Path3D>

length

val length: Double

reversed

val reversed: Path3D

segments

val segments: List<Segment3D>

Functions

adaptivePositions

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

equals

fun equals(other: Any?): Boolean

equidistantPositions

fun equidistantPositions(pointCount: Int): List<Vector3>

hashCode

fun hashCode(): Int

map

fun map(closed: Boolean = this.closed, mapper: (Segment3D) -> Segment3D): Path3D

on

Checks if a give point lies on the contour

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

plus

operator fun plus(other: Path3D): Path3D

position

fun position(ut: Double): Vector3

project

Project a point on the contour

fun project(point: Vector3): PathProjection3D

sampleEquidistant

Sample the shape contour into line segments

fun sampleEquidistant(pointCount: Int): Path3D

sampleLinear

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

fun sampleLinear(distanceTolerance: Double = 0.5): Path3D

sub

Sample a sub contour

fun sub(u0: Double, u1: Double): Path3D

transform

fun transform(transform: Matrix44): Path3D

Companion Object Functions

fromPoints

fun fromPoints(points: List<Vector3>, closed: Boolean): Path3D