Version: v0.0.0-...-aafc44e Latest Latest Go to latest
Published: May 9, 2018 License: MIT

## Documentation ¶

### Overview ¶

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

### 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)`

#### 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`

#### func (*T) Tangent ¶

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

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