Documentation ¶
Overview ¶
glm document
glm project glm.go
Index ¶
- Constants
- Variables
- func AngleU2(d0, d1 Vector3) float64
- func AngleU3(v0, v1, v2 Vector3) float64
- func CheckInterpolatorDomain(t float64)
- func InterpSmooth(t float64) float64
- type Attitude
- func (self Attitude) GetTb() TaitBryan
- func (self Attitude) H() float64
- func (self Attitude) Hpr() (float64, float64, float64)
- func (self Attitude) Hprv() Vector3
- func (self Attitude) P() float64
- func (self Attitude) R() float64
- func (self Attitude) Rotation() Matrix4
- func (self Attitude) RotationInv() Matrix4
- func (self Attitude) SetH(h float64) Attitude
- func (self Attitude) SetHpr(h, p, r float64) Attitude
- func (self Attitude) SetHprv(hpr Vector3) Attitude
- func (self Attitude) SetP(p float64) Attitude
- func (self Attitude) SetR(r float64) Attitude
- func (self Attitude) SetX(x float64) Attitude
- func (self Attitude) SetXyz(x, y, z float64) Attitude
- func (self Attitude) SetXyzv(xyz Vector3) Attitude
- func (self Attitude) SetY(y float64) Attitude
- func (self Attitude) SetZ(z float64) Attitude
- func (self Attitude) X() float64
- func (self Attitude) Xyz() (float64, float64, float64)
- func (self Attitude) Xyzv() Vector3
- func (self Attitude) Y() float64
- func (self Attitude) Z() float64
- type Matrix4
- type Quat
- func (q0 Quat) Add(q1 Quat) Quat
- func (q Quat) Conj() Quat
- func (q0 Quat) Dot(q1 Quat) float64
- func (q Quat) Hamilton(p Quat) Quat
- func (q Quat) Matrix() Matrix4
- func (q0 Quat) Mult(q1 Quat) Quat
- func (q Quat) Neg() Quat
- func (q Quat) Rotate3(v Vector3) Vector3
- func (q Quat) Rotate4(v Vector4) Vector4
- func (q Quat) Smult(s float64) Quat
- type TaitBryan
- type Vector2
- type Vector3
- func (self Vector3) Add(other Vector3) Vector3
- func (self Vector3) Cross(other Vector3) Vector3
- func (self Vector3) Dot(other Vector3) float64
- func (self Vector3) Gl() [3]float32
- func (self Vector3) GlFloats() [3]gl.GLfloat
- func (self Vector3) Norm() float64
- func (self Vector3) Norm2() float64
- func (self Vector3) Normed() Vector3
- func (v Vector3) Quat(angle float64) Quat
- func (self Vector3) SetX(x float64) Vector3
- func (self Vector3) SetXyz(x, y, z float64) Vector3
- func (self Vector3) SetY(y float64) Vector3
- func (self Vector3) SetZ(z float64) Vector3
- func (self Vector3) Smult(scalar float64) Vector3
- func (self Vector3) Sub(other Vector3) Vector3
- func (self Vector3) To4(w float64) Vector4
- func (self Vector3) Translation() Matrix4
- func (self Vector3) TranslationInv() Matrix4
- func (self Vector3) X() float64
- func (self Vector3) Xyz() (float64, float64, float64)
- func (self Vector3) Y() float64
- func (self Vector3) Z() float64
- type Vector4
- func (self Vector4) Add(other Vector4) Vector4
- func (self Vector4) Gl() [4]float32
- func (self Vector4) GlFloats() [4]gl.GLfloat
- func (self Vector4) Norm() float64
- func (self Vector4) Norm2() float64
- func (v Vector4) Quat(angle float64) Quat
- func (self Vector4) SetW(w float64) Vector4
- func (self Vector4) SetX(x float64) Vector4
- func (self Vector4) SetXyz(x, y, z float64) Vector4
- func (self Vector4) SetXyzw(x, y, z, w float64) Vector4
- func (self Vector4) SetY(y float64) Vector4
- func (self Vector4) SetZ(z float64) Vector4
- func (self Vector4) Smult(scalar float64) Vector4
- func (self Vector4) Sub(other Vector4) Vector4
- func (self Vector4) To3() Vector3
- func (self Vector4) Translation() Matrix4
- func (self Vector4) TranslationInv() Matrix4
- func (self Vector4) W() float64
- func (self Vector4) X() float64
- func (self Vector4) Xyz() (float64, float64, float64)
- func (self Vector4) Xyzw() (float64, float64, float64, float64)
- func (self Vector4) Y() float64
- func (self Vector4) Z() float64
Constants ¶
View Source
const DEG_TO_RAD = float64(math.Pi) / 180
Variables ¶
View Source
var IDENTITY4 = Matrix4{
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1,
}
View Source
var YUP = IDENTITY4
View Source
var ZUP = Matrix4{
1, 0, 0, 0,
0, 0, -1, 0,
0, 1, 0, 0,
0, 0, 0, 1}
Functions ¶
func CheckInterpolatorDomain ¶
func CheckInterpolatorDomain(t float64)
func InterpSmooth ¶
Function with first and second derivatives =0 at its extremities.
Types ¶
type Attitude ¶
type Attitude struct { Angles Vector3 // contains filtered or unexported fields }
func (Attitude) RotationInv ¶
type Matrix4 ¶
type Matrix4 [16]float64
func OrthographicProj ¶
Orthographic projection.
func PerspectiveProj ¶
Perspective projection.
type TaitBryan ¶
type TaitBryan struct {
// contains filtered or unexported fields
}
func MakeTaitBryan ¶
func (TaitBryan) MakeAttitude ¶
type Vector3 ¶
type Vector3 [3]float64
func FaceNormal2 ¶
Compute the normal to a triangle from two of its sides.
func FaceNormal3 ¶
Compute the normal to a triangle from its three vertices.
func InterpolateTranslation ¶
func (Vector3) Translation ¶
func (Vector3) TranslationInv ¶
Click to show internal directories.
Click to hide internal directories.