hermit

package
v0.0.0-...-aafc44e Latest Latest
Warning

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

Go to latest
Published: May 9, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package hermit3 contains functions for 3D cubic hermit splines. See: http://en.wikipedia.org/wiki/Cubic_Hermite_spline

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Length

func Length(pointA, tangentA, pointB, tangentB *vec3.T, t float64) float64

Length returns the length of a hermit spline from pointA to t (0,1).

func Point

func Point(pointA, tangentA, pointB, tangentB *vec3.T, t float64) vec3.T

Point returns a point on a hermit spline at t (0,1).

func Tangent

func Tangent(pointA, tangentA, pointB, tangentB *vec3.T, t float64) vec3.T

Tangent returns a tangent on a hermit spline at t (0,1).

Types

type PointTangent

type PointTangent struct {
	Point   vec3.T
	Tangent vec3.T
}

PointTangent contains a point and a tangent at that point. This is a helper sub-struct for T.

type T

type T struct {
	A PointTangent
	B PointTangent
}

T holds the data to define a hermit spline.

func Parse

func Parse(s string) (r T, err error)

Parse parses T from a string. See also String()

func (*T) Length

func (herm *T) Length(t float64) float64

Length returns the length of a hermit spline from A.Point to t (0,1).

func (*T) Point

func (herm *T) Point(t float64) vec3.T

Point returns a point on a hermit spline at t (0,1).

func (*T) String

func (herm *T) String() string

String formats T as string. See also Parse().

func (*T) Tangent

func (herm *T) Tangent(t float64) vec3.T

Tangent returns a tangent on a hermit spline at t (0,1).

Jump to

Keyboard shortcuts

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