glm

package
v0.0.0-...-264f608 Latest Latest
Warning

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

Go to latest
Published: May 14, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ToRadians = math.Pi / 180.0

Variables

This section is empty.

Functions

This section is empty.

Types

type Mat4

type Mat4 struct {
	Data [16]float32
}

func NewMat4

func NewMat4(idt bool) *Mat4

func (*Mat4) Identity

func (m *Mat4) Identity() *Mat4

func (*Mat4) LookAt

func (m *Mat4) LookAt(position, target, up *Vector3) *Mat4

func (*Mat4) Mul

func (m *Mat4) Mul(o *Mat4) *Mat4

func (*Mat4) Perspective

func (m *Mat4) Perspective(fov, aspectRatio, near, far float32) *Mat4

func (*Mat4) Reset

func (m *Mat4) Reset() *Mat4

func (*Mat4) Rotate

func (m *Mat4) Rotate(angle, xAxis, yAxis, zAxis float32) *Mat4

func (*Mat4) Rotation

func (m *Mat4) Rotation(angle, xAxis, yAxis, zAxis float32) *Mat4

func (*Mat4) Scale

func (m *Mat4) Scale(x, y, z float32) *Mat4

func (*Mat4) Scaling

func (m *Mat4) Scaling(x, y, z float32) *Mat4

func (*Mat4) Set

func (m *Mat4) Set(data [16]float32) *Mat4

func (*Mat4) String

func (m *Mat4) String() string

func (*Mat4) Translate

func (m *Mat4) Translate(x, y, z float32) *Mat4

func (*Mat4) Translation

func (m *Mat4) Translation(x, y, z float32) *Mat4

type Vector2

type Vector2 struct {
	X, Y float32
}

type Vector3

type Vector3 struct {
	X, Y, Z float32
}

func (*Vector3) Add

func (v *Vector3) Add(x, y, z float32) *Vector3

func (*Vector3) AddVector3

func (v *Vector3) AddVector3(other *Vector3) *Vector3

func (*Vector3) Cross

func (v *Vector3) Cross(other *Vector3) *Vector3

func (*Vector3) Distance

func (v *Vector3) Distance(other *Vector3) float32

func (*Vector3) Div

func (v *Vector3) Div(x, y, z float32) *Vector3

func (*Vector3) DivVector3

func (v *Vector3) DivVector3(other *Vector3) *Vector3

func (*Vector3) Equals

func (v *Vector3) Equals(x, y, z float32) bool

func (*Vector3) EqualsVector

func (v *Vector3) EqualsVector(other *Vector3) bool

func (*Vector3) Len2

func (v *Vector3) Len2() float32

func (*Vector3) Mul

func (v *Vector3) Mul(x, y, z float32) *Vector3

func (*Vector3) MulMat4

func (v *Vector3) MulMat4(mat *Mat4) *Vector3

MulMat4 left-multiplies the vector by the given matrix, assuming the fourth (w) component of the vector is 1.

func (*Vector3) MulVector3

func (v *Vector3) MulVector3(other *Vector3) *Vector3

func (*Vector3) Norm

func (v *Vector3) Norm() *Vector3

func (*Vector3) Rotate

func (v *Vector3) Rotate(other *Vector3, degrees float32) *Vector3

func (*Vector3) Scale

func (v *Vector3) Scale(s float32) *Vector3

func (*Vector3) Set

func (v *Vector3) Set(x, y, z float32) *Vector3

func (*Vector3) SetVector3

func (v *Vector3) SetVector3(other *Vector3) *Vector3

func (*Vector3) String

func (v *Vector3) String() string

func (*Vector3) Sub

func (v *Vector3) Sub(x, y, z float32) *Vector3

func (*Vector3) SubVector3

func (v *Vector3) SubVector3(other *Vector3) *Vector3

Jump to

Keyboard shortcuts

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