matrix

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mat4

type Mat4[T num.Real] [16]T

Mat4 is a 4x4 matrix in row major order.

m[4*r + c] is the element in the r'th row and c'th column.

func SetPerspective4

func SetPerspective4[T num.Int | num.Float](
	m *Mat4[T], fieldOfViewYInRadians, aspect, zNear, zFar float64,
) *Mat4[T]

func (*Mat4[T]) Mul

func (m *Mat4[T]) Mul(x Mat4[T]) *Mat4[T]

func (*Mat4[T]) MulScalar

func (m *Mat4[T]) MulScalar(x T) *Mat4[T]

func (Mat4[T]) MulV

func (m Mat4[T]) MulV(x Mat4[T]) Mat4[T]

func (*Mat4[T]) Rotate

func (m *Mat4[T]) Rotate(rad float64, axis Vec3[T]) *Mat4[T]

func (*Mat4[T]) RotateX

func (m *Mat4[T]) RotateX(rad float64) *Mat4[T]

func (*Mat4[T]) RotateY

func (m *Mat4[T]) RotateY(rad float64) *Mat4[T]

func (*Mat4[T]) RotateZ

func (m *Mat4[T]) RotateZ(rad float64) *Mat4[T]

func (*Mat4[T]) SetIdentity

func (m *Mat4[T]) SetIdentity() *Mat4[T]

func (*Mat4[T]) SetRotationX

func (m *Mat4[T]) SetRotationX(rad float64) *Mat4[T]

func (*Mat4[T]) SetRotationY

func (m *Mat4[T]) SetRotationY(rad float64) *Mat4[T]

func (*Mat4[T]) SetRotationZ

func (m *Mat4[T]) SetRotationZ(rad float64) *Mat4[T]

func (*Mat4[T]) Translate

func (m *Mat4[T]) Translate(v Vec3[T]) *Mat4[T]

type Vec3

type Vec3[T num.Number] [3]T

Jump to

Keyboard shortcuts

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