Documentation
¶
Index ¶
- func Clampd(a, t1, t2 float64) float64
- func ClampdFunc(t1, t2 float64) func(float64)
- func Clampf(a, t1, t2 float32) float32
- func ClampfFunc(t1, t2 float32) func(float32)
- func FloatEqual(a, b float64) bool
- func FloatEqual32(a, b float32) bool
- func FloatEqual32Func(epsilon float32) func(float32, float32) bool
- func FloatEqualFunc(epsilon float64) func(float64, float64) bool
- func FloatEqualThreshold(a, b, epsilon float64) bool
- func FloatEqualThreshold32(a, b, epsilon float32) bool
- func IsClampedd(a, t1, t2 float64) bool
- func IsClampedf(a, t1, t2 float32) bool
- func SetMaxd(a, b *float64)
- func SetMaxf(a, b *float32)
- func SetMind(a, b *float64)
- func SetMinf(a, b *float32)
- type Mat2d
- func (m1 Mat2d) Add(m2 Mat2d) Mat2d
- func (m1 Mat2d) ApproxEqual(m2 Mat2d) bool
- func (m1 Mat2d) ApproxEqualThreshold(m2 Mat2d, threshold float64) bool
- func (m1 Mat2d) ApproxFuncEqual(m2 Mat2d, eq func(float64, float64) bool) bool
- func (m Mat2d) Det() float64
- func (m Mat2d) Inv() Mat2d
- func (m1 Mat2d) Mul(c float64) Mat2d
- func (m1 Mat2d) Mul2(m2 Mat2d) Mat2d
- func (m1 Mat2d) Mul2x1(m2 Vec2d) Vec2d
- func (m1 Mat2d) Mul2x3(m2 Mat2x3d) Mat2x3d
- func (m1 Mat2d) Mul2x4(m2 Mat2x4d) Mat2x4d
- func (m1 Mat2d) Sub(m2 Mat2d) Mat2d
- func (m1 Mat2d) Transpose() Mat2d
- type Mat2f
- func (m1 Mat2f) Add(m2 Mat2f) Mat2f
- func (m1 Mat2f) ApproxEqual(m2 Mat2f) bool
- func (m1 Mat2f) ApproxEqualThreshold(m2 Mat2f, threshold float32) bool
- func (m1 Mat2f) ApproxFuncEqual(m2 Mat2f, eq func(float32, float32) bool) bool
- func (m Mat2f) Det() float32
- func (m Mat2f) Inv() Mat2f
- func (m1 Mat2f) Mul(c float32) Mat2f
- func (m1 Mat2f) Mul2(m2 Mat2f) Mat2f
- func (m1 Mat2f) Mul2x1(m2 Vec2f) Vec2f
- func (m1 Mat2f) Mul2x3(m2 Mat2x3f) Mat2x3f
- func (m1 Mat2f) Mul2x4(m2 Mat2x4f) Mat2x4f
- func (m1 Mat2f) Sub(m2 Mat2f) Mat2f
- func (m1 Mat2f) Transpose() Mat2f
- type Mat2x3d
- func (m1 Mat2x3d) Add(m2 Mat2x3d) Mat2x3d
- func (m1 Mat2x3d) ApproxEqual(m2 Mat2x3d) bool
- func (m1 Mat2x3d) ApproxEqualThreshold(m2 Mat2x3d, threshold float64) bool
- func (m1 Mat2x3d) ApproxFuncEqual(m2 Mat2x3d, eq func(float64, float64) bool) bool
- func (m1 Mat2x3d) Mul(c float64) Mat2x3d
- func (m1 Mat2x3d) Mul3(m2 Mat3d) Mat2x3d
- func (m1 Mat2x3d) Mul3x1(m2 Vec3d) Vec2d
- func (m1 Mat2x3d) Mul3x2(m2 Mat3x2d) Mat2d
- func (m1 Mat2x3d) Mul3x4(m2 Mat3x4d) Mat2x4d
- func (m1 Mat2x3d) Sub(m2 Mat2x3d) Mat2x3d
- func (m1 Mat2x3d) Transpose() Mat3x2d
- type Mat2x3f
- func (m1 Mat2x3f) Add(m2 Mat2x3f) Mat2x3f
- func (m1 Mat2x3f) ApproxEqual(m2 Mat2x3f) bool
- func (m1 Mat2x3f) ApproxEqualThreshold(m2 Mat2x3f, threshold float32) bool
- func (m1 Mat2x3f) ApproxFuncEqual(m2 Mat2x3f, eq func(float32, float32) bool) bool
- func (m1 Mat2x3f) Mul(c float32) Mat2x3f
- func (m1 Mat2x3f) Mul3(m2 Mat3f) Mat2x3f
- func (m1 Mat2x3f) Mul3x1(m2 Vec3f) Vec2f
- func (m1 Mat2x3f) Mul3x2(m2 Mat3x2f) Mat2f
- func (m1 Mat2x3f) Mul3x4(m2 Mat3x4f) Mat2x4f
- func (m1 Mat2x3f) Sub(m2 Mat2x3f) Mat2x3f
- func (m1 Mat2x3f) Transpose() Mat3x2f
- type Mat2x4d
- func (m1 Mat2x4d) Add(m2 Mat2x4d) Mat2x4d
- func (m1 Mat2x4d) ApproxEqual(m2 Mat2x4d) bool
- func (m1 Mat2x4d) ApproxEqualThreshold(m2 Mat2x4d, threshold float64) bool
- func (m1 Mat2x4d) ApproxFuncEqual(m2 Mat2x4d, eq func(float64, float64) bool) bool
- func (m1 Mat2x4d) Mul(c float64) Mat2x4d
- func (m1 Mat2x4d) Mul4(m2 Mat4d) Mat2x4d
- func (m1 Mat2x4d) Mul4x1(m2 Vec4d) Vec2d
- func (m1 Mat2x4d) Mul4x2(m2 Mat4x2d) Mat2d
- func (m1 Mat2x4d) Mul4x3(m2 Mat4x3d) Mat2x3d
- func (m1 Mat2x4d) Sub(m2 Mat2x4d) Mat2x4d
- func (m1 Mat2x4d) Transpose() Mat4x2d
- type Mat2x4f
- func (m1 Mat2x4f) Add(m2 Mat2x4f) Mat2x4f
- func (m1 Mat2x4f) ApproxEqual(m2 Mat2x4f) bool
- func (m1 Mat2x4f) ApproxEqualThreshold(m2 Mat2x4f, threshold float32) bool
- func (m1 Mat2x4f) ApproxFuncEqual(m2 Mat2x4f, eq func(float32, float32) bool) bool
- func (m1 Mat2x4f) Mul(c float32) Mat2x4f
- func (m1 Mat2x4f) Mul4(m2 Mat4f) Mat2x4f
- func (m1 Mat2x4f) Mul4x1(m2 Vec4f) Vec2f
- func (m1 Mat2x4f) Mul4x2(m2 Mat4x2f) Mat2f
- func (m1 Mat2x4f) Mul4x3(m2 Mat4x3f) Mat2x3f
- func (m1 Mat2x4f) Sub(m2 Mat2x4f) Mat2x4f
- func (m1 Mat2x4f) Transpose() Mat4x2f
- type Mat3d
- func HomogRotate2Dd(angle float64) Mat3d
- func Ident3d() Mat3d
- func Rotate3DXd(angle float64) Mat3d
- func Rotate3DYd(angle float64) Mat3d
- func Rotate3DZd(angle float64) Mat3d
- func Scale2Dd(scaleX, scaleY float64) Mat3d
- func ShearX2Dd(shear float64) Mat3d
- func ShearY2Dd(shear float64) Mat3d
- func Translate2Dd(Tx, Ty float64) Mat3d
- func (m1 Mat3d) Add(m2 Mat3d) Mat3d
- func (m1 Mat3d) ApproxEqual(m2 Mat3d) bool
- func (m1 Mat3d) ApproxEqualThreshold(m2 Mat3d, threshold float64) bool
- func (m1 Mat3d) ApproxFuncEqual(m2 Mat3d, eq func(float64, float64) bool) bool
- func (m Mat3d) Det() float64
- func (m Mat3d) Inv() Mat3d
- func (m1 Mat3d) Mul(c float64) Mat3d
- func (m1 Mat3d) Mul3(m2 Mat3d) Mat3d
- func (m1 Mat3d) Mul3x1(m2 Vec3d) Vec3d
- func (m1 Mat3d) Mul3x2(m2 Mat3x2d) Mat3x2d
- func (m1 Mat3d) Mul3x4(m2 Mat3x4d) Mat3x4d
- func (m1 Mat3d) Sub(m2 Mat3d) Mat3d
- func (m1 Mat3d) Transpose() Mat3d
- type Mat3f
- func HomogRotate2D(angle float32) Mat3f
- func Ident3f() Mat3f
- func Rotate3DX(angle float32) Mat3f
- func Rotate3DY(angle float32) Mat3f
- func Rotate3DZ(angle float32) Mat3f
- func Scale2D(scaleX, scaleY float32) Mat3f
- func ShearX2D(shear float32) Mat3f
- func ShearY2D(shear float32) Mat3f
- func Translate2D(Tx, Ty float32) Mat3f
- func (m1 Mat3f) Add(m2 Mat3f) Mat3f
- func (m1 Mat3f) ApproxEqual(m2 Mat3f) bool
- func (m1 Mat3f) ApproxEqualThreshold(m2 Mat3f, threshold float32) bool
- func (m1 Mat3f) ApproxFuncEqual(m2 Mat3f, eq func(float32, float32) bool) bool
- func (m Mat3f) Det() float32
- func (m Mat3f) Inv() Mat3f
- func (m1 Mat3f) Mul(c float32) Mat3f
- func (m1 Mat3f) Mul3(m2 Mat3f) Mat3f
- func (m1 Mat3f) Mul3x1(m2 Vec3f) Vec3f
- func (m1 Mat3f) Mul3x2(m2 Mat3x2f) Mat3x2f
- func (m1 Mat3f) Mul3x4(m2 Mat3x4f) Mat3x4f
- func (m1 Mat3f) Sub(m2 Mat3f) Mat3f
- func (m1 Mat3f) Transpose() Mat3f
- type Mat3x2d
- func (m1 Mat3x2d) Add(m2 Mat3x2d) Mat3x2d
- func (m1 Mat3x2d) ApproxEqual(m2 Mat3x2d) bool
- func (m1 Mat3x2d) ApproxEqualThreshold(m2 Mat3x2d, threshold float64) bool
- func (m1 Mat3x2d) ApproxFuncEqual(m2 Mat3x2d, eq func(float64, float64) bool) bool
- func (m1 Mat3x2d) Mul(c float64) Mat3x2d
- func (m1 Mat3x2d) Mul2(m2 Mat2d) Mat3x2d
- func (m1 Mat3x2d) Mul2x1(m2 Vec2d) Vec3d
- func (m1 Mat3x2d) Mul2x3(m2 Mat2x3d) Mat3d
- func (m1 Mat3x2d) Mul2x4(m2 Mat2x4d) Mat3x4d
- func (m1 Mat3x2d) Sub(m2 Mat3x2d) Mat3x2d
- func (m1 Mat3x2d) Transpose() Mat2x3d
- type Mat3x2f
- func (m1 Mat3x2f) Add(m2 Mat3x2f) Mat3x2f
- func (m1 Mat3x2f) ApproxEqual(m2 Mat3x2f) bool
- func (m1 Mat3x2f) ApproxEqualThreshold(m2 Mat3x2f, threshold float32) bool
- func (m1 Mat3x2f) ApproxFuncEqual(m2 Mat3x2f, eq func(float32, float32) bool) bool
- func (m1 Mat3x2f) Mul(c float32) Mat3x2f
- func (m1 Mat3x2f) Mul2(m2 Mat2f) Mat3x2f
- func (m1 Mat3x2f) Mul2x1(m2 Vec2f) Vec3f
- func (m1 Mat3x2f) Mul2x3(m2 Mat2x3f) Mat3f
- func (m1 Mat3x2f) Mul2x4(m2 Mat2x4f) Mat3x4f
- func (m1 Mat3x2f) Sub(m2 Mat3x2f) Mat3x2f
- func (m1 Mat3x2f) Transpose() Mat2x3f
- type Mat3x4d
- func (m1 Mat3x4d) Add(m2 Mat3x4d) Mat3x4d
- func (m1 Mat3x4d) ApproxEqual(m2 Mat3x4d) bool
- func (m1 Mat3x4d) ApproxEqualThreshold(m2 Mat3x4d, threshold float64) bool
- func (m1 Mat3x4d) ApproxFuncEqual(m2 Mat3x4d, eq func(float64, float64) bool) bool
- func (m1 Mat3x4d) Mul(c float64) Mat3x4d
- func (m1 Mat3x4d) Mul4(m2 Mat4d) Mat3x4d
- func (m1 Mat3x4d) Mul4x1(m2 Vec4d) Vec3d
- func (m1 Mat3x4d) Mul4x2(m2 Mat4x2d) Mat3x2d
- func (m1 Mat3x4d) Mul4x3(m2 Mat4x3d) Mat3d
- func (m1 Mat3x4d) Sub(m2 Mat3x4d) Mat3x4d
- func (m1 Mat3x4d) Transpose() Mat4x3d
- type Mat3x4f
- func (m1 Mat3x4f) Add(m2 Mat3x4f) Mat3x4f
- func (m1 Mat3x4f) ApproxEqual(m2 Mat3x4f) bool
- func (m1 Mat3x4f) ApproxEqualThreshold(m2 Mat3x4f, threshold float32) bool
- func (m1 Mat3x4f) ApproxFuncEqual(m2 Mat3x4f, eq func(float32, float32) bool) bool
- func (m1 Mat3x4f) Mul(c float32) Mat3x4f
- func (m1 Mat3x4f) Mul4(m2 Mat4f) Mat3x4f
- func (m1 Mat3x4f) Mul4x1(m2 Vec4f) Vec3f
- func (m1 Mat3x4f) Mul4x2(m2 Mat4x2f) Mat3x2f
- func (m1 Mat3x4f) Mul4x3(m2 Mat4x3f) Mat3f
- func (m1 Mat3x4f) Sub(m2 Mat3x4f) Mat3x4f
- func (m1 Mat3x4f) Transpose() Mat4x3f
- type Mat4d
- func Frustumd(left, right, bottom, top, near, far float64) Mat4d
- func HomogRotate3DXd(angle float64) Mat4d
- func HomogRotate3DYd(angle float64) Mat4d
- func HomogRotate3DZd(angle float64) Mat4d
- func HomogRotate3Dd(angle float64, axis Vec3d) Mat4d
- func Ident4d() Mat4d
- func LookAtVd(eye, center, up Vec3d) Mat4d
- func LookAtd(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ float64) Mat4d
- func Ortho2Dd(left, right, top, bottom float64) Mat4d
- func Orthod(left, right, bottom, top, near, far float64) Mat4d
- func Perspectived(fovy, aspect, near, far float64) Mat4d
- func Scale3Dd(scaleX, scaleY, scaleZ float64) Mat4d
- func ShearX3Dd(shearY, shearZ float64) Mat4d
- func ShearY3Dd(shearX, shearZ float64) Mat4d
- func ShearZ3Dd(shearX, shearY float64) Mat4d
- func Translate3Dd(Tx, Ty, Tz float64) Mat4d
- func (m1 Mat4d) Add(m2 Mat4d) Mat4d
- func (m1 Mat4d) ApproxEqual(m2 Mat4d) bool
- func (m1 Mat4d) ApproxEqualThreshold(m2 Mat4d, threshold float64) bool
- func (m1 Mat4d) ApproxFuncEqual(m2 Mat4d, eq func(float64, float64) bool) bool
- func (m Mat4d) Det() float64
- func (m Mat4d) Inv() Mat4d
- func (m1 Mat4d) Mul(c float64) Mat4d
- func (m1 Mat4d) Mul4(m2 Mat4d) Mat4d
- func (m1 Mat4d) Mul4x1(m2 Vec4d) Vec4d
- func (m1 Mat4d) Mul4x2(m2 Mat4x2d) Mat4x2d
- func (m1 Mat4d) Mul4x3(m2 Mat4x3d) Mat4x3d
- func (m1 Mat4d) Sub(m2 Mat4d) Mat4d
- func (m1 Mat4d) Transpose() Mat4d
- type Mat4f
- func Frustum(left, right, bottom, top, near, far float32) Mat4f
- func HomogRotate3D(angle float32, axis Vec3f) Mat4f
- func HomogRotate3DX(angle float32) Mat4f
- func HomogRotate3DY(angle float32) Mat4f
- func HomogRotate3DZ(angle float32) Mat4f
- func Ident4f() Mat4f
- func LookAt(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ float32) Mat4f
- func LookAtV(eye, center, up Vec3f) Mat4f
- func Ortho(left, right, bottom, top, near, far float32) Mat4f
- func Ortho2D(left, right, top, bottom float32) Mat4f
- func Perspective(fovy, aspect, near, far float32) Mat4f
- func Scale3D(scaleX, scaleY, scaleZ float32) Mat4f
- func ShearX3D(shearY, shearZ float32) Mat4f
- func ShearY3D(shearX, shearZ float32) Mat4f
- func ShearZ3D(shearX, shearY float32) Mat4f
- func Translate3D(Tx, Ty, Tz float32) Mat4f
- func (m1 Mat4f) Add(m2 Mat4f) Mat4f
- func (m1 Mat4f) ApproxEqual(m2 Mat4f) bool
- func (m1 Mat4f) ApproxEqualThreshold(m2 Mat4f, threshold float32) bool
- func (m1 Mat4f) ApproxFuncEqual(m2 Mat4f, eq func(float32, float32) bool) bool
- func (m Mat4f) Det() float32
- func (m Mat4f) Inv() Mat4f
- func (m1 Mat4f) Mul(c float32) Mat4f
- func (m1 Mat4f) Mul4(m2 Mat4f) Mat4f
- func (m1 Mat4f) Mul4x1(m2 Vec4f) Vec4f
- func (m1 Mat4f) Mul4x2(m2 Mat4x2f) Mat4x2f
- func (m1 Mat4f) Mul4x3(m2 Mat4x3f) Mat4x3f
- func (m1 Mat4f) Sub(m2 Mat4f) Mat4f
- func (m1 Mat4f) Transpose() Mat4f
- type Mat4x2d
- func (m1 Mat4x2d) Add(m2 Mat4x2d) Mat4x2d
- func (m1 Mat4x2d) ApproxEqual(m2 Mat4x2d) bool
- func (m1 Mat4x2d) ApproxEqualThreshold(m2 Mat4x2d, threshold float64) bool
- func (m1 Mat4x2d) ApproxFuncEqual(m2 Mat4x2d, eq func(float64, float64) bool) bool
- func (m1 Mat4x2d) Mul(c float64) Mat4x2d
- func (m1 Mat4x2d) Mul2(m2 Mat2d) Mat4x2d
- func (m1 Mat4x2d) Mul2x1(m2 Vec2d) Vec4d
- func (m1 Mat4x2d) Mul2x3(m2 Mat2x3d) Mat4x3d
- func (m1 Mat4x2d) Mul2x4(m2 Mat2x4d) Mat4d
- func (m1 Mat4x2d) Sub(m2 Mat4x2d) Mat4x2d
- func (m1 Mat4x2d) Transpose() Mat2x4d
- type Mat4x2f
- func (m1 Mat4x2f) Add(m2 Mat4x2f) Mat4x2f
- func (m1 Mat4x2f) ApproxEqual(m2 Mat4x2f) bool
- func (m1 Mat4x2f) ApproxEqualThreshold(m2 Mat4x2f, threshold float32) bool
- func (m1 Mat4x2f) ApproxFuncEqual(m2 Mat4x2f, eq func(float32, float32) bool) bool
- func (m1 Mat4x2f) Mul(c float32) Mat4x2f
- func (m1 Mat4x2f) Mul2(m2 Mat2f) Mat4x2f
- func (m1 Mat4x2f) Mul2x1(m2 Vec2f) Vec4f
- func (m1 Mat4x2f) Mul2x3(m2 Mat2x3f) Mat4x3f
- func (m1 Mat4x2f) Mul2x4(m2 Mat2x4f) Mat4f
- func (m1 Mat4x2f) Sub(m2 Mat4x2f) Mat4x2f
- func (m1 Mat4x2f) Transpose() Mat2x4f
- type Mat4x3d
- func (m1 Mat4x3d) Add(m2 Mat4x3d) Mat4x3d
- func (m1 Mat4x3d) ApproxEqual(m2 Mat4x3d) bool
- func (m1 Mat4x3d) ApproxEqualThreshold(m2 Mat4x3d, threshold float64) bool
- func (m1 Mat4x3d) ApproxFuncEqual(m2 Mat4x3d, eq func(float64, float64) bool) bool
- func (m1 Mat4x3d) Mul(c float64) Mat4x3d
- func (m1 Mat4x3d) Mul3(m2 Mat3d) Mat4x3d
- func (m1 Mat4x3d) Mul3x1(m2 Vec3d) Vec4d
- func (m1 Mat4x3d) Mul3x2(m2 Mat3x2d) Mat4x2d
- func (m1 Mat4x3d) Mul3x4(m2 Mat3x4d) Mat4d
- func (m1 Mat4x3d) Sub(m2 Mat4x3d) Mat4x3d
- func (m1 Mat4x3d) Transpose() Mat3x4d
- type Mat4x3f
- func (m1 Mat4x3f) Add(m2 Mat4x3f) Mat4x3f
- func (m1 Mat4x3f) ApproxEqual(m2 Mat4x3f) bool
- func (m1 Mat4x3f) ApproxEqualThreshold(m2 Mat4x3f, threshold float32) bool
- func (m1 Mat4x3f) ApproxFuncEqual(m2 Mat4x3f, eq func(float32, float32) bool) bool
- func (m1 Mat4x3f) Mul(c float32) Mat4x3f
- func (m1 Mat4x3f) Mul3(m2 Mat3f) Mat4x3f
- func (m1 Mat4x3f) Mul3x1(m2 Vec3f) Vec4f
- func (m1 Mat4x3f) Mul3x2(m2 Mat3x2f) Mat4x2f
- func (m1 Mat4x3f) Mul3x4(m2 Mat3x4f) Mat4f
- func (m1 Mat4x3f) Sub(m2 Mat4x3f) Mat4x3f
- func (m1 Mat4x3f) Transpose() Mat3x4f
- type Quatd
- func (q1 Quatd) Add(q2 Quatd) Quatd
- func (q1 Quatd) Conjugate() Quatd
- func (q1 Quatd) Dot(q2 Quatd) float64
- func (q1 Quatd) Inverse() Quatd
- func (q1 Quatd) Len() float64
- func (q1 Quatd) Mat4() Mat4d
- func (q1 Quatd) Mul(q2 Quatd) Quatd
- func (q1 Quatd) Normalize() Quatd
- func (q1 Quatd) Rotate(v Vec3d) Vec3d
- func (q1 Quatd) Scale(c float64) Quatd
- func (q1 Quatd) Sub(q2 Quatd) Quatd
- func (q Quatd) X() float64
- func (q Quatd) Y() float64
- func (q Quatd) Z() float64
- type Quatf
- func (q1 Quatf) Add(q2 Quatf) Quatf
- func (q1 Quatf) Conjugate() Quatf
- func (q1 Quatf) Dot(q2 Quatf) float32
- func (q1 Quatf) Inverse() Quatf
- func (q1 Quatf) Len() float32
- func (q1 Quatf) Mat4() Mat4f
- func (q1 Quatf) Mul(q2 Quatf) Quatf
- func (q1 Quatf) Normalize() Quatf
- func (q1 Quatf) Rotate(v Vec3f) Vec3f
- func (q1 Quatf) Scale(c float32) Quatf
- func (q1 Quatf) Sub(q2 Quatf) Quatf
- func (q Quatf) X() float32
- func (q Quatf) Y() float32
- func (q Quatf) Z() float32
- type Vec2d
- func (v1 Vec2d) Add(v2 Vec2d) Vec2d
- func (v1 Vec2d) ApproxEqual(v2 Vec2d) bool
- func (v1 Vec2d) ApproxEqualTheshold(v2 Vec2d, threshold float64) bool
- func (v1 Vec2d) ApproxFuncEqual(v2 Vec2d, eq func(float64, float64) bool) bool
- func (v1 Vec2d) Dot(v2 Vec2d) float64
- func (v1 Vec2d) Len() float64
- func (v1 Vec2d) Mul(c float64) Vec2d
- func (v1 Vec2d) Normalize() Vec2d
- func (v1 Vec2d) Sub(v2 Vec2d) Vec2d
- type Vec2f
- func (v1 Vec2f) Add(v2 Vec2f) Vec2f
- func (v1 Vec2f) ApproxEqual(v2 Vec2f) bool
- func (v1 Vec2f) ApproxEqualTheshold(v2 Vec2f, threshold float32) bool
- func (v1 Vec2f) ApproxFuncEqual(v2 Vec2f, eq func(float32, float32) bool) bool
- func (v1 Vec2f) Dot(v2 Vec2f) float32
- func (v1 Vec2f) Len() float32
- func (v1 Vec2f) Mul(c float32) Vec2f
- func (v1 Vec2f) Normalize() Vec2f
- func (v1 Vec2f) Sub(v2 Vec2f) Vec2f
- type Vec3d
- func (v1 Vec3d) Add(v2 Vec3d) Vec3d
- func (v1 Vec3d) ApproxEqual(v2 Vec3d) bool
- func (v1 Vec3d) ApproxEqualTheshold(v2 Vec3d, threshold float64) bool
- func (v1 Vec3d) ApproxFuncEqual(v2 Vec3d, eq func(float64, float64) bool) bool
- func (v1 Vec3d) Cross(v2 Vec3d) Vec3d
- func (v1 Vec3d) Dot(v2 Vec3d) float64
- func (v1 Vec3d) Len() float64
- func (v1 Vec3d) Mul(c float64) Vec3d
- func (v1 Vec3d) Normalize() Vec3d
- func (v1 Vec3d) Sub(v2 Vec3d) Vec3d
- type Vec3f
- func (v1 Vec3f) Add(v2 Vec3f) Vec3f
- func (v1 Vec3f) ApproxEqual(v2 Vec3f) bool
- func (v1 Vec3f) ApproxEqualTheshold(v2 Vec3f, threshold float32) bool
- func (v1 Vec3f) ApproxFuncEqual(v2 Vec3f, eq func(float32, float32) bool) bool
- func (v1 Vec3f) Cross(v2 Vec3f) Vec3f
- func (v1 Vec3f) Dot(v2 Vec3f) float32
- func (v1 Vec3f) Len() float32
- func (v1 Vec3f) Mul(c float32) Vec3f
- func (v1 Vec3f) Normalize() Vec3f
- func (v1 Vec3f) Sub(v2 Vec3f) Vec3f
- type Vec4d
- func (v1 Vec4d) Add(v2 Vec4d) Vec4d
- func (v1 Vec4d) ApproxEqual(v2 Vec4d) bool
- func (v1 Vec4d) ApproxEqualTheshold(v2 Vec4d, threshold float64) bool
- func (v1 Vec4d) ApproxFuncEqual(v2 Vec4d, eq func(float64, float64) bool) bool
- func (v1 Vec4d) Dot(v2 Vec4d) float64
- func (v1 Vec4d) Len() float64
- func (v1 Vec4d) Mul(c float64) Vec4d
- func (v1 Vec4d) Normalize() Vec4d
- func (v1 Vec4d) Sub(v2 Vec4d) Vec4d
- type Vec4f
- func (v1 Vec4f) Add(v2 Vec4f) Vec4f
- func (v1 Vec4f) ApproxEqual(v2 Vec4f) bool
- func (v1 Vec4f) ApproxEqualTheshold(v2 Vec4f, threshold float32) bool
- func (v1 Vec4f) ApproxFuncEqual(v2 Vec4f, eq func(float32, float32) bool) bool
- func (v1 Vec4f) Dot(v2 Vec4f) float32
- func (v1 Vec4f) Len() float32
- func (v1 Vec4f) Mul(c float32) Vec4f
- func (v1 Vec4f) Normalize() Vec4f
- func (v1 Vec4f) Sub(v2 Vec4f) Vec4f
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClampdFunc ¶
func ClampfFunc ¶
func FloatEqual ¶
FloatEqual is a safe utility function to compare floats. It's Taken from http://floating-point-gui.de/errors/comparison/
It is slightly altered to not call Abs when not needed. Keep in mind that it expects float32s to be converted to float64s before being passed in, because they have to be converted for Abs anyway
func FloatEqual32 ¶
func FloatEqualThreshold ¶
FloatEqualThreshold is a utility function to compare floats. It's Taken from http://floating-point-gui.de/errors/comparison/
It is slightly altered to not call Abs when not needed. Keep in mind that it expects float32s to be converted to float64s before being passed in, because they have to be converted for Abs anyway
This differs from FloatEqual in that it lets you pass in your comparison threshold, so that you can adjust the comparison value to your specific needs
func FloatEqualThreshold32 ¶
func IsClampedd ¶
func IsClampedf ¶
Types ¶
type Mat2d ¶
type Mat2d [4]float64
func Rotate2Dd ¶
Rotate2D returns a rotation Matrix about a angle in 2-D space. Specifically about the origin. It is a 2x2 matrix, if you need a 3x3 for Homogeneous math (e.g. composition with a Translation matrix) see HomogRotate2D
func (Mat2d) ApproxEqual ¶
func (Mat2d) ApproxEqualThreshold ¶
func (Mat2d) ApproxFuncEqual ¶
type Mat2f ¶
type Mat2f [4]float32
func Rotate2D ¶
Rotate2D returns a rotation Matrix about a angle in 2-D space. Specifically about the origin. It is a 2x2 matrix, if you need a 3x3 for Homogeneous math (e.g. composition with a Translation matrix) see HomogRotate2D
func (Mat2f) ApproxEqual ¶
func (Mat2f) ApproxEqualThreshold ¶
func (Mat2f) ApproxFuncEqual ¶
type Mat2x3d ¶
type Mat2x3d [6]float64
func (Mat2x3d) ApproxEqual ¶
func (Mat2x3d) ApproxEqualThreshold ¶
func (Mat2x3d) ApproxFuncEqual ¶
type Mat2x3f ¶
type Mat2x3f [6]float32
func (Mat2x3f) ApproxEqual ¶
func (Mat2x3f) ApproxEqualThreshold ¶
func (Mat2x3f) ApproxFuncEqual ¶
type Mat2x4d ¶
type Mat2x4d [8]float64
func (Mat2x4d) ApproxEqual ¶
func (Mat2x4d) ApproxEqualThreshold ¶
func (Mat2x4d) ApproxFuncEqual ¶
type Mat2x4f ¶
type Mat2x4f [8]float32
func (Mat2x4f) ApproxEqual ¶
func (Mat2x4f) ApproxEqualThreshold ¶
func (Mat2x4f) ApproxFuncEqual ¶
type Mat3d ¶
type Mat3d [9]float64
func HomogRotate2Dd ¶
Same as Rotate2D, except homogeneous (3x3 with the extra row/col being all zeroes with a one in the bottom right)
func Rotate3DXd ¶
Rotate3DX returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the X-axis
Where c is cos(angle) and s is sin(angle)
[1 0 0] [0 c -s] [0 s c ]
func Rotate3DYd ¶
Rotate3DY returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the Y-axis
Where c is cos(angle) and s is sin(angle)
[c 0 s] [0 1 0] [s 0 c ]
func Rotate3DZd ¶
Rotate3DZ returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the Z-axis
Where c is cos(angle) and s is sin(angle)
[c -s 0] [s c 0] [0 0 1 ]
func Scale2Dd ¶
Scale2D creates a homogeneous 2D scaling matrix [[ scaleX, 0 , 0 ]] [[ 0 , scaleY, 0 ]] [[ 0 , 0 , 1 ]]
func Translate2Dd ¶
Translate2D returns a homogeneous (3x3 for 2D-space) Translation matrix that moves a point by Tx units in the x-direction and Ty units in the y-direction
[[1, 0, Tx]] [[0, 1, Ty]] [[0, 0, 1 ]]
func (Mat3d) ApproxEqual ¶
func (Mat3d) ApproxEqualThreshold ¶
func (Mat3d) ApproxFuncEqual ¶
type Mat3f ¶
type Mat3f [9]float32
func HomogRotate2D ¶
Same as Rotate2D, except homogeneous (3x3 with the extra row/col being all zeroes with a one in the bottom right)
func Rotate3DX ¶
Rotate3DX returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the X-axis
Where c is cos(angle) and s is sin(angle)
[1 0 0] [0 c -s] [0 s c ]
func Rotate3DY ¶
Rotate3DY returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the Y-axis
Where c is cos(angle) and s is sin(angle)
[c 0 s] [0 1 0] [s 0 c ]
func Rotate3DZ ¶
Rotate3DZ returns a 3x3 (non-homogeneous) Matrix that rotates by angle about the Z-axis
Where c is cos(angle) and s is sin(angle)
[c -s 0] [s c 0] [0 0 1 ]
func Scale2D ¶
Scale2D creates a homogeneous 2D scaling matrix [[ scaleX, 0 , 0 ]] [[ 0 , scaleY, 0 ]] [[ 0 , 0 , 1 ]]
func Translate2D ¶
Translate2D returns a homogeneous (3x3 for 2D-space) Translation matrix that moves a point by Tx units in the x-direction and Ty units in the y-direction
[[1, 0, Tx]] [[0, 1, Ty]] [[0, 0, 1 ]]
func (Mat3f) ApproxEqual ¶
func (Mat3f) ApproxEqualThreshold ¶
func (Mat3f) ApproxFuncEqual ¶
type Mat3x2d ¶
type Mat3x2d [6]float64
func (Mat3x2d) ApproxEqual ¶
func (Mat3x2d) ApproxEqualThreshold ¶
func (Mat3x2d) ApproxFuncEqual ¶
type Mat3x2f ¶
type Mat3x2f [6]float32
func (Mat3x2f) ApproxEqual ¶
func (Mat3x2f) ApproxEqualThreshold ¶
func (Mat3x2f) ApproxFuncEqual ¶
type Mat3x4d ¶
type Mat3x4d [12]float64
func (Mat3x4d) ApproxEqual ¶
func (Mat3x4d) ApproxEqualThreshold ¶
func (Mat3x4d) ApproxFuncEqual ¶
type Mat3x4f ¶
type Mat3x4f [12]float32
func (Mat3x4f) ApproxEqual ¶
func (Mat3x4f) ApproxEqualThreshold ¶
func (Mat3x4f) ApproxFuncEqual ¶
type Mat4d ¶
type Mat4d [16]float64
func HomogRotate3DXd ¶
Same as Rotate3DX, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right)
func HomogRotate3DYd ¶
Same as Rotate3DY, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right)
func HomogRotate3DZd ¶
Same as Rotate3DZ, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right)
func HomogRotate3Dd ¶
HomogRotate3D creates a 3D rotation Matrix that rotates by (radian) angle about some arbitrary axis given by a Vector. It produces a homogeneous matrix (4x4)
Where c is cos(angle) and s is sin(angle), and x, y, and z are the first, second, and third elements of the axis vector (respectively):
[[ x^2(c-1)+c, xy(c-1)-zs, xz(c-1)+ys, 0 ]] [[ xy(c-1)+zs, y^2(c-1)+c, yz(c-1)-xs, 0 ]] [[ xz(c-1)-ys, yz(c-1)+xs, z^2(c-1)+c, 0 ]] [[ 0 , 0 , 0 , 1 ]]
func Perspectived ¶
func Scale3Dd ¶
Scale3D creates a homogeneous 3D scaling matrix [[ scaleX, 0 , 0 , 0 ]] [[ 0 , scaleY, 0 , 0 ]] [[ 0 , 0 , scaleZ, 0 ]] [[ 0 , 0 , 0 , 1 ]]
func Translate3Dd ¶
Translate3D returns a homogeneous (4x4 for 3D-space) Translation matrix that moves a point by Tx units in the x-direction, Ty units in the y-direction, and Tz units in the z-direction
[[1, 0, 0, Tx]] [[0, 1, 0, Ty]] [[0, 0, 1, Tz]] [[0, 0, 0, 1 ]]
func (Mat4d) ApproxEqual ¶
func (Mat4d) ApproxEqualThreshold ¶
func (Mat4d) ApproxFuncEqual ¶
type Mat4f ¶
type Mat4f [16]float32
func HomogRotate3D ¶
HomogRotate3D creates a 3D rotation Matrix that rotates by (radian) angle about some arbitrary axis given by a Vector. It produces a homogeneous matrix (4x4)
Where c is cos(angle) and s is sin(angle), and x, y, and z are the first, second, and third elements of the axis vector (respectively):
[[ x^2(c-1)+c, xy(c-1)-zs, xz(c-1)+ys, 0 ]] [[ xy(c-1)+zs, y^2(c-1)+c, yz(c-1)-xs, 0 ]] [[ xz(c-1)-ys, yz(c-1)+xs, z^2(c-1)+c, 0 ]] [[ 0 , 0 , 0 , 1 ]]
func HomogRotate3DX ¶
Same as Rotate3DX, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right)
func HomogRotate3DY ¶
Same as Rotate3DY, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right)
func HomogRotate3DZ ¶
Same as Rotate3DZ, except homogeneous (4x4 with the extra row/col being all zeroes with a one in the bottom right)
func Perspective ¶
func Scale3D ¶
Scale3D creates a homogeneous 3D scaling matrix [[ scaleX, 0 , 0 , 0 ]] [[ 0 , scaleY, 0 , 0 ]] [[ 0 , 0 , scaleZ, 0 ]] [[ 0 , 0 , 0 , 1 ]]
func Translate3D ¶
Translate3D returns a homogeneous (4x4 for 3D-space) Translation matrix that moves a point by Tx units in the x-direction, Ty units in the y-direction, and Tz units in the z-direction
[[1, 0, 0, Tx]] [[0, 1, 0, Ty]] [[0, 0, 1, Tz]] [[0, 0, 0, 1 ]]
func (Mat4f) ApproxEqual ¶
func (Mat4f) ApproxEqualThreshold ¶
func (Mat4f) ApproxFuncEqual ¶
type Mat4x2d ¶
type Mat4x2d [8]float64
func (Mat4x2d) ApproxEqual ¶
func (Mat4x2d) ApproxEqualThreshold ¶
func (Mat4x2d) ApproxFuncEqual ¶
type Mat4x2f ¶
type Mat4x2f [8]float32
func (Mat4x2f) ApproxEqual ¶
func (Mat4x2f) ApproxEqualThreshold ¶
func (Mat4x2f) ApproxFuncEqual ¶
type Mat4x3d ¶
type Mat4x3d [12]float64
func (Mat4x3d) ApproxEqual ¶
func (Mat4x3d) ApproxEqualThreshold ¶
func (Mat4x3d) ApproxFuncEqual ¶
type Mat4x3f ¶
type Mat4x3f [12]float32
func (Mat4x3f) ApproxEqual ¶
func (Mat4x3f) ApproxEqualThreshold ¶
func (Mat4x3f) ApproxFuncEqual ¶
type Quatd ¶
func QuatIdentd ¶
func QuatIdentd() Quatd
func QuatNlerpd ¶
func QuatRotated ¶
func QuatSlerpd ¶
type Quatf ¶
func QuatIdentf ¶
func QuatIdentf() Quatf
func QuatNlerpf ¶
func QuatRotatef ¶
func QuatSlerpf ¶
type Vec2d ¶
type Vec2d [2]float64
func (Vec2d) ApproxEqual ¶
func (Vec2d) ApproxEqualTheshold ¶
func (Vec2d) ApproxFuncEqual ¶
type Vec2f ¶
type Vec2f [2]float32
func (Vec2f) ApproxEqual ¶
func (Vec2f) ApproxEqualTheshold ¶
func (Vec2f) ApproxFuncEqual ¶
type Vec3d ¶
type Vec3d [3]float64
func Projectd ¶
func Projectd(obj Vec3d, modelview, projection Mat4d, initialX, initialY, width, height int) (win Vec3d)
Transform a set of coordinates from object space (in obj) to window coordinates (with depth)
Window coordinates are continuous, not discrete (well, as continuous as an IEEE Floating Point can be), so you won't get exact pixel locations without rounding or similar
func UnProjectd ¶
func UnProjectd(win Vec3d, modelview, projection Mat4d, initialX, initialY, width, height int) (obj Vec3d, err error)
Transform a set of window coordinates to object space. If your MVP (projection.Mul(modelview) matrix is not invertible, this will return an error
Note that the projection may not be perfect if you use strict pixel locations rather than the exact values given by Projectf. (It's still unlikely to be perfect due to precision errors, but it will be closer)
func (Vec3d) ApproxEqual ¶
func (Vec3d) ApproxEqualTheshold ¶
func (Vec3d) ApproxFuncEqual ¶
type Vec3f ¶
type Vec3f [3]float32
func Projectf ¶
func Projectf(obj Vec3f, modelview, projection Mat4f, initialX, initialY, width, height int) (win Vec3f)
Transform a set of coordinates from object space (in obj) to window coordinates (with depth)
Window coordinates are continuous, not discrete (well, as continuous as an IEEE Floating Point can be), so you won't get exact pixel locations without rounding or similar
func UnProjectf ¶
func UnProjectf(win Vec3f, modelview, projection Mat4f, initialX, initialY, width, height int) (obj Vec3f, err error)
Transform a set of window coordinates to object space. If your MVP (projection.Mul(modelview) matrix is not invertible, this will return an error
Note that the projection may not be perfect if you use strict pixel locations rather than the exact values given by Projectf. (It's still unlikely to be perfect due to precision errors, but it will be closer)
func (Vec3f) ApproxEqual ¶
func (Vec3f) ApproxEqualTheshold ¶
func (Vec3f) ApproxFuncEqual ¶
type Vec4d ¶
type Vec4d [4]float64
func (Vec4d) ApproxEqual ¶
func (Vec4d) ApproxEqualTheshold ¶
func (Vec4d) ApproxFuncEqual ¶
type Vec4f ¶
type Vec4f [4]float32
func (Vec4f) ApproxEqual ¶
func (Vec4f) ApproxEqualTheshold ¶
func (Vec4f) ApproxFuncEqual ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
opengl-tutorial/tutorial01
command
|
|
|
opengl-tutorial/tutorial02
command
|
|
|
opengl-tutorial/tutorial03
command
|
|
|
opengl-tutorial/tutorial04
command
|
|
|
opengl-tutorial/tutorial05
command
|
|
|
opengl-tutorial/tutorial06
command
|
|
|
opengl-tutorial/tutorial07
command
|
|
|
opengl-tutorial/tutorial08
command
|
|
|
opengl-tutorial/tutorial09
command
|
|