glm

package
v0.0.0-...-c29c7b8 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DegToRad

func DegToRad[T float](deg T) (rad T)

func RadToDeg

func RadToDeg[T float](rad T) (deg T)

Types

type Mat4

type Mat4[T float] [16]T

func LookAtRH

func LookAtRH[T float](eye, center, up Vec3[T]) Mat4[T]

func Mat4FromAngleZ

func Mat4FromAngleZ[T float](thetaRad T) Mat4[T]

func Mat4FromQuaternion

func Mat4FromQuaternion[T float](quat Quaternion[T]) Mat4[T]

func Mat4FromTranslation

func Mat4FromTranslation[T float](v Vec3[T]) Mat4[T]

func Perspective

func Perspective[T float](fovYRad, aspect, near, far T) Mat4[T]

func PerspectiveRH

func PerspectiveRH[T float](fovYrad, aspectRatio, zNear, zFar T) Mat4[T]

func (Mat4[T]) Mul4

func (lhs Mat4[T]) Mul4(rhs Mat4[T]) Mat4[T]

type Quaternion

type Quaternion[T float] struct {
	V Vec3[T]
	S T
}

func QuaternionFromAxisAngle

func QuaternionFromAxisAngle[T float](axis Vec3[T], angleRad T) Quaternion[T]

func (Quaternion[T]) Mul

func (lhs Quaternion[T]) Mul(rhs Quaternion[T]) Quaternion[T]

type Vec3

type Vec3[T float] [3]T

func (Vec3[T]) Add

func (lhs Vec3[T]) Add(rhs Vec3[T]) Vec3[T]

func (Vec3[T]) Cross

func (lhs Vec3[T]) Cross(rhs Vec3[T]) Vec3[T]

func (Vec3[T]) Dot

func (lhs Vec3[T]) Dot(rhs Vec3[T]) T

func (Vec3[T]) Magnitude

func (lhs Vec3[T]) Magnitude() T

func (Vec3[T]) MulScalar

func (lhs Vec3[T]) MulScalar(s T) Vec3[T]

func (Vec3[T]) Normalize

func (lhs Vec3[T]) Normalize() Vec3[T]

func (Vec3[T]) Sub

func (lhs Vec3[T]) Sub(rhs Vec3[T]) Vec3[T]

Jump to

Keyboard shortcuts

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