Documentation
¶
Index ¶
- type Euler
- type Matrix3
- func (mat Matrix3[T]) Add(other Matrix3[T]) Matrix3[T]
- func (mat Matrix3[T]) Determaint() T
- func (mat Matrix3[T]) Div(v T) Matrix3[T]
- func (mat Matrix3[T]) Dot(other Matrix3[T]) Matrix3[T]
- func (mat Matrix3[T]) DotVec2(vec Vector2[T]) Vector3[T]
- func (mat Matrix3[T]) DotVec3(vec Vector3[T]) Vector3[T]
- func (mat Matrix3[T]) Hadamard(other Matrix3[T]) Matrix3[T]
- func (mat Matrix3[T]) Invert() Matrix3[T]
- func (mat Matrix3[T]) Length() T
- func (mat *Matrix3[T]) MakeIdentity() *Matrix3[T]
- func (mat *Matrix3[T]) MakeRotationAxis(axis Vector3[T], angle T) *Matrix3[T]
- func (mat *Matrix3[T]) MakeRotationX(theta T) *Matrix3[T]
- func (mat *Matrix3[T]) MakeRotationY(theta T) *Matrix3[T]
- func (mat *Matrix3[T]) MakeRotationZ(theta T) *Matrix3[T]
- func (mat *Matrix3[T]) MakeScale(vec Vector3[T]) *Matrix3[T]
- func (mat *Matrix3[T]) MakeShear(xy, xz, yx, yz, zx, zy T) *Matrix3[T]
- func (mat *Matrix3[T]) MakeZero() *Matrix3[T]
- func (mat Matrix3[T]) Mul(v T) Matrix3[T]
- func (mat Matrix3[T]) Normalize() Matrix3[T]
- func (mat *Matrix3[T]) SetElements(n11, n12, n13, n21, n22, n23, n31, n32, n33 T) *Matrix3[T]
- func (mat Matrix3[T]) Square() T
- func (mat Matrix3[T]) Sub(other Matrix3[T]) Matrix3[T]
- func (mat Matrix3[T]) Sum() T
- func (mat Matrix3[T]) Transpose() Matrix3[T]
- type Matrix4
- func (mat Matrix4[T]) Add(other Matrix4[T]) Matrix4[T]
- func (mat *Matrix4[T]) Compose(position Vector3[T], quaternion Vector4[T], scale Vector3[T]) *Matrix4[T]
- func (mat Matrix4[T]) Decompose() (position Vector3[T], quaternion Vector4[T], scale Vector3[T])
- func (mat Matrix4[T]) Determinant() T
- func (mat Matrix4[T]) Div(v T) Matrix4[T]
- func (mat Matrix4[T]) Dot(other Matrix4[T]) Matrix4[T]
- func (mat Matrix4[T]) DotVec2(vec Vector2[T]) Vector3[T]
- func (mat Matrix4[T]) DotVec3(vec Vector3[T]) Vector3[T]
- func (mat Matrix4[T]) DotVec4(vec Vector4[T]) Vector4[T]
- func (mat Matrix4[T]) GetPosition() Vector3[T]
- func (mat Matrix4[T]) GetQuaternion() Vector4[T]
- func (mat Matrix4[T]) Hadamard(other Matrix4[T]) Matrix4[T]
- func (mat Matrix4[T]) Invert() Matrix4[T]
- func (mat Matrix4[T]) Length() T
- func (mat *Matrix4[T]) MakeFromMatrix3(m Matrix3[T]) *Matrix4[T]
- func (mat *Matrix4[T]) MakeIdentity() *Matrix4[T]
- func (mat *Matrix4[T]) MakeOrthographic(left, right, top, bottom, near, far T) *Matrix4[T]
- func (mat *Matrix4[T]) MakePerspective(left, right, top, bottom, near, far T) *Matrix4[T]
- func (mat *Matrix4[T]) MakeRotationAxis(axis Vector3[T], angle T) *Matrix4[T]
- func (mat *Matrix4[T]) MakeRotationX(theta T) *Matrix4[T]
- func (mat *Matrix4[T]) MakeRotationY(theta T) *Matrix4[T]
- func (mat *Matrix4[T]) MakeRotationZ(theta T) *Matrix4[T]
- func (mat *Matrix4[T]) MakeScale(vec Vector3[T]) *Matrix4[T]
- func (mat *Matrix4[T]) MakeShear(xy, xz, yx, yz, zx, zy T) *Matrix4[T]
- func (mat *Matrix4[T]) MakeTranslation(vec Vector3[T]) *Matrix4[T]
- func (mat *Matrix4[T]) MakeZero() *Matrix4[T]
- func (mat Matrix4[T]) Mul(v T) Matrix4[T]
- func (mat Matrix4[T]) Normalize() Matrix4[T]
- func (mat *Matrix4[T]) SetElements(...) *Matrix4[T]
- func (mat *Matrix4[T]) SetPosition(pos Vector3[T]) *Matrix4[T]
- func (mat Matrix4[T]) Square() T
- func (mat Matrix4[T]) Sub(other Matrix4[T]) Matrix4[T]
- func (mat Matrix4[T]) Sum() T
- func (mat Matrix4[T]) Transpose() Matrix4[T]
- type Vector2
- func (vec Vector2[T]) Add(other Vector2[T]) Vector2[T]
- func (vec *Vector2[T]) Copy(other Vector2[T])
- func (vec Vector2[T]) Div(k T) Vector2[T]
- func (vec Vector2[T]) Dot(other Vector2[T]) T
- func (vec Vector2[T]) Hadamard(other Vector2[T]) Vector2[T]
- func (vec Vector2[T]) Length() T
- func (vec Vector2[T]) Mul(k T) Vector2[T]
- func (vec Vector2[T]) Normalize() Vector2[T]
- func (vec *Vector2[T]) Set(x, y T)
- func (vec *Vector2[T]) SetX(x T)
- func (vec *Vector2[T]) SetY(y T)
- func (vec Vector2[T]) Square() T
- func (vec Vector2[T]) Sub(other Vector2[T]) Vector2[T]
- func (vec Vector2[T]) Sum() T
- func (vec Vector2[T]) Vec3() Vector3[T]
- func (vec Vector2[T]) Vec4() Vector4[T]
- func (vec Vector2[T]) X() T
- func (vec Vector2[T]) Y() T
- type Vector3
- func (vec Vector3[T]) Add(other Vector3[T]) Vector3[T]
- func (vec *Vector3[T]) Copy(other Vector3[T])
- func (vec Vector3[T]) Div(k T) Vector3[T]
- func (vec Vector3[T]) Dot(other Vector3[T]) T
- func (vec Vector3[T]) Hadamard(other Vector3[T]) Vector3[T]
- func (vec Vector3[T]) Length() T
- func (vec Vector3[T]) Mul(k T) Vector3[T]
- func (vec Vector3[T]) Normalize() Vector3[T]
- func (vec *Vector3[T]) Set(x, y, z T)
- func (vec *Vector3[T]) SetX(x T)
- func (vec *Vector3[T]) SetY(y T)
- func (vec *Vector3[T]) SetZ(z T)
- func (vec Vector3[T]) Square() T
- func (vec Vector3[T]) Sub(other Vector3[T]) Vector3[T]
- func (vec Vector3[T]) Sum() T
- func (vec Vector3[T]) Vec4() Vector4[T]
- func (vec Vector3[T]) X() T
- func (vec Vector3[T]) Y() T
- func (vec Vector3[T]) Z() T
- type Vector4
- func (vec Vector4[T]) Add(other Vector4[T]) Vector4[T]
- func (vec *Vector4[T]) Copy(other Vector4[T])
- func (vec Vector4[T]) Div(k T) Vector4[T]
- func (vec Vector4[T]) Dot(other Vector4[T]) T
- func (vec Vector4[T]) Hadamard(other Vector4[T]) Vector4[T]
- func (vec Vector4[T]) Length() T
- func (vec Vector4[T]) Mul(k T) Vector4[T]
- func (vec Vector4[T]) Normalize() Vector4[T]
- func (vec *Vector4[T]) Set(x, y, z, w T)
- func (vec *Vector4[T]) SetW(w T)
- func (vec *Vector4[T]) SetX(x T)
- func (vec *Vector4[T]) SetY(y T)
- func (vec *Vector4[T]) SetZ(z T)
- func (vec Vector4[T]) Square() T
- func (vec Vector4[T]) Sub(other Vector4[T]) Vector4[T]
- func (vec Vector4[T]) Sum() T
- func (vec Vector4[T]) Vec3() Vector3[T]
- func (vec Vector4[T]) W() T
- func (vec Vector4[T]) X() T
- func (vec Vector4[T]) Y() T
- func (vec Vector4[T]) Z() T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Euler ¶ added in v0.1.7
type Euler[T constraints.Float] struct { Vector3[T] Order string // XYZ, XZY, YXZ, YZX, ZXY, ZYX }
func (*Euler[T]) SetFromRotationMatrix ¶ added in v0.1.7
type Matrix3 ¶ added in v0.1.7
func (Matrix3[T]) Determaint ¶ added in v0.1.7
func (mat Matrix3[T]) Determaint() T
func (*Matrix3[T]) MakeIdentity ¶ added in v0.1.7
func (*Matrix3[T]) MakeRotationAxis ¶ added in v0.1.7
Based on http://www.gamedev.net/reference/articles/article1199.asp
func (*Matrix3[T]) MakeRotationX ¶ added in v0.1.7
func (*Matrix3[T]) MakeRotationY ¶ added in v0.1.7
func (*Matrix3[T]) MakeRotationZ ¶ added in v0.1.7
func (*Matrix3[T]) SetElements ¶ added in v0.1.7
type Matrix4 ¶ added in v0.1.7
func (Matrix4[T]) Determinant ¶ added in v0.1.7
func (mat Matrix4[T]) Determinant() T
func (Matrix4[T]) GetPosition ¶ added in v0.1.7
func (Matrix4[T]) GetQuaternion ¶ added in v0.1.7
http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm
func (Matrix4[T]) Invert ¶ added in v0.1.7
based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm
func (*Matrix4[T]) MakeFromMatrix3 ¶ added in v0.1.7
func (*Matrix4[T]) MakeIdentity ¶ added in v0.1.7
func (*Matrix4[T]) MakeOrthographic ¶ added in v0.1.7
func (*Matrix4[T]) MakePerspective ¶ added in v0.1.7
func (*Matrix4[T]) MakeRotationAxis ¶ added in v0.1.7
Based on http://www.gamedev.net/reference/articles/article1199.asp
func (*Matrix4[T]) MakeRotationX ¶ added in v0.1.7
func (*Matrix4[T]) MakeRotationY ¶ added in v0.1.7
func (*Matrix4[T]) MakeRotationZ ¶ added in v0.1.7
func (*Matrix4[T]) MakeTranslation ¶ added in v0.1.7
func (*Matrix4[T]) SetElements ¶ added in v0.1.7
func (*Matrix4[T]) SetPosition ¶ added in v0.1.7
Click to show internal directories.
Click to hide internal directories.