curves

package
v0.35.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cubic added in v0.18.0

func Cubic(t, p0, p1, p2, p3 float64) float64

func CubicBezierCurve2DSampler added in v0.18.0

func CubicBezierCurve2DSampler(p0, p1, p2, p3 vector2.Float64) sample.FloatToVec2

func CubicBezierCurve3DSampler added in v0.18.0

func CubicBezierCurve3DSampler(p0, p1, p2, p3 vector3.Float64) sample.FloatToVec3

func PowerIn

func PowerIn(power int) sample.FloatToFloat

func PowerInOut

func PowerInOut(power int) sample.FloatToFloat

func PowerOut

func PowerOut(power int) sample.FloatToFloat

Types

type CatmullRomCurve added in v0.18.0

type CatmullRomCurve struct {
	// contains filtered or unexported fields
}

func (*CatmullRomCurve) Distance added in v0.18.0

func (crc *CatmullRomCurve) Distance(distance float64) vector3.Float64

func (*CatmullRomCurve) Length added in v0.18.0

func (crc *CatmullRomCurve) Length() float64

func (CatmullRomCurve) Time added in v0.18.0

func (crc CatmullRomCurve) Time(t float64) vector3.Float64

type CatmullRomCurveParameters added in v0.18.0

type CatmullRomCurveParameters struct {
	P0, P1, P2, P3 vector3.Float64
	Alpha          float64
	Epsilon        float64
}

func (CatmullRomCurveParameters) Curve added in v0.18.0

type CatmullRomSpline added in v0.18.0

type CatmullRomSpline struct {
	// contains filtered or unexported fields
}

func (*CatmullRomSpline) At added in v0.18.0

func (crc *CatmullRomSpline) At(distance float64) vector3.Float64

func (*CatmullRomSpline) Length added in v0.18.0

func (crc *CatmullRomSpline) Length() float64

func (*CatmullRomSpline) Tangent added in v0.32.0

func (crc *CatmullRomSpline) Tangent(distance float64) vector3.Float64

type CatmullRomSplineNode added in v0.18.0

type CatmullRomSplineNode struct {
	Points nodes.Output[[]vector3.Float64] `description:"points that form the curve"`
	Alpha  nodes.Output[float64]           `description:"0.5 for the centripetal spline, 0.0 for the uniform spline, 1.0 for the chordal spline"`
	Closed nodes.Output[bool]              `description:"whether or not to close the curve to form a loop"`
}

func (CatmullRomSplineNode) Out added in v0.32.0

type CatmullRomSplineParameters added in v0.18.0

type CatmullRomSplineParameters struct {
	Points  []vector3.Float64
	Alpha   float64
	Epsilon float64
	Closed  bool
}

func (CatmullRomSplineParameters) Spline added in v0.18.0

type CubicCurve

type CubicCurve struct {
	P0, P1, P2, P3 vector3.Float64
}

func (CubicCurve) At added in v0.18.0

func (crc CubicCurve) At(t float64) vector3.Float64

type Curve added in v0.18.0

type Curve interface {
	At(t float64) vector3.Float64
}

type LengthNode added in v0.18.0

type LengthNode struct {
	Spline nodes.Output[Spline]
}

func (LengthNode) Out added in v0.32.0

func (ln LengthNode) Out(out *nodes.StructOutput[float64])

type PositionNode added in v0.32.0

type PositionNode struct {
	Spline   nodes.Output[Spline]
	Distance nodes.Output[float64] `description:"distance along the spline where the point lies"`
}

func (PositionNode) Position added in v0.32.0

func (tn PositionNode) Position(out *nodes.StructOutput[vector3.Float64])

type PositionsForArrayNode added in v0.32.0

type PositionsForArrayNode struct {
	Spline    nodes.Output[Spline]
	Distances nodes.Output[[]float64] `description:"distances along the spline where the points lie"`
}

func (PositionsForArrayNode) Position added in v0.32.0

type Spline added in v0.18.0

type Spline interface {
	Length() float64
	At(distance float64) vector3.Float64
	Tangent(distance float64) vector3.Float64
}

type TangentNode added in v0.32.0

type TangentNode struct {
	Spline   nodes.Output[Spline]
	Distance nodes.Output[float64] `description:"distance the point is along the spline where we take the tangent"`
}

func (TangentNode) Tangent added in v0.32.0

func (tn TangentNode) Tangent(out *nodes.StructOutput[vector3.Float64])

type TangentsForArrayNode added in v0.32.0

type TangentsForArrayNode struct {
	Spline nodes.Output[Spline]
	Times  nodes.Output[[]float64] `description:"distances the points are along the spline where we take the tangents"`
}

func (TangentsForArrayNode) Tangents added in v0.32.0

func (tn TangentsForArrayNode) Tangents(out *nodes.StructOutput[[]vector3.Float64])

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL