struct PF::Bezier::Cubic(T)

Included Modules

Defined in:

bezier/cubic.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module PF::Bezier::Aproximations

length(steps : UInt32 = 10) length

Constructor Detail

def self.new(p0 : Vector2(T), p1 : Vector2(T), p2 : Vector2(T), p3 : Vector2(T)) #

[View source]

Class Method Detail

def self.derivative(t : Float64, p0 : Number, p1 : Number, p2 : Number, p3 : Number) #

[View source]
def self.extremeties(p0 : Number, p1 : Number, p2 : Number, p3 : Number) #

[View source]
def self.point(t : Float64, p0 : Number, p1 : Number, p2 : Number, p3 : Number) #

[View source]
def self.second_derivative(t : Float64, p0 : Number, p1 : Number, p2 : Number, p3 : Number) #

[View source]

Instance Method Detail

def at(t : Float64) #

Get the point at percentage t < 0 < 1 of the curve


[View source]
def extremeties #

Get the points at the extremeties of this curve


[View source]
def normal(t : Float64) #

Get the normal to a point at t < 0 < 1 on the spline


[View source]
def p0 : Vector2(T) #

[View source]
def p0=(p0 : Vector2(T)) #

[View source]
def p1 : Vector2(T) #

[View source]
def p1=(p1 : Vector2(T)) #

[View source]
def p2 : Vector2(T) #

[View source]
def p2=(p2 : Vector2(T)) #

[View source]
def p3 : Vector2(T) #

[View source]
def p3=(p3 : Vector2(T)) #

[View source]
def points #

[View source]
def tangent(t : Float64) #

Get the tangent to a point at t < 0 < 1 on the spline


[View source]