basis

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basis

type Basis struct {
	Rows [3][3]float64
}

func FromAxisAndAngle

func FromAxisAndAngle(axis [3]float64, angle float64) Basis

func New

func New() Basis

func (*Basis) Determinant

func (b *Basis) Determinant() float64

func (Basis) GetColumn

func (b Basis) GetColumn(index int) []float64

GetColumn returns the specified column of the basis matrix.

func (Basis) GetMainDiagonal

func (b Basis) GetMainDiagonal() []float64

GetMainDiagonal returns the main diagonal of the basis matrix.

func (*Basis) Invert

func (b *Basis) Invert() error

Invert inverts the Basis matrix.

func (*Basis) Set

func (b *Basis) Set(pXX, pXY, pXZ, pYX, pYY, pYZ, pZX, pZY, pZZ float64)

func (*Basis) SetAxisAngle

func (b *Basis) SetAxisAngle(axis [3]float64, angle float64)

Set the basis matrix to represent a rotation around the given axis by the specified angle.

func (*Basis) SetColumn

func (b *Basis) SetColumn(index int, value [3]float64)

SetColumn sets the specified column of the basis matrix.

func (*Basis) SetColumns

func (b *Basis) SetColumns(x, y, z [3]float64)

SetColumns sets the columns of the basis matrix.

func (Basis) TransposeXform

func (b Basis) TransposeXform(m Basis) Basis

TransposeXform returns the result of transposing and multiplying the provided basis matrix with this basis matrix.

func (Basis) Xform

func (b Basis) Xform(pVector [3]float64) [3]float64

type Vector

type Vector interface {
	Dot(with Vector) float64
}

Jump to

Keyboard shortcuts

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