package matrix
Constants
Mat4Row0
iota
Mat4Row1
Mat4Row2
Mat4Row3
Mat4Col0
iota
Mat4Col1
Mat4Col2
Mat4Col3
Mat4x0y0
x0y0
Mat4x1y0
x1y0
Mat4x2y0
x2y0
Mat4x3y0
x3y0
Mat4x0y1
x0y1
Mat4x1y1
x1y1
Mat4x2y1
x2y1
Mat4x3y1
x3y1
Mat4x0y2
x0y2
Mat4x1y2
x1y2
Mat4x2y2
x2y2
Mat4x3y2
x3y2
Mat4x0y3
x0y3
Mat4x1y3
x1y3
Mat4x2y3
x2y3
Mat4x3y3
x3y3
Functions
AbsInt
Approx
func Approx(a, b Float) bool
ApproxTo
func ApproxTo(a, b, tolerance Float) bool
IsInf
func IsInf(x Float, sign int) bool
IsNaN
QuaternionApprox
func QuaternionApprox(a, b Quaternion) bool
Vec2Approx
func Vec2Approx(a, b Vec2) bool
Vec2ApproxTo
func Vec2ApproxTo(a, b Vec2, delta Float) bool
Vec3Approx
func Vec3Approx(a, b Vec3) bool
Vec3ApproxTo
func Vec3ApproxTo(a, b Vec3, delta Float) bool
Vec4Approx
func Vec4Approx(a, b Vec4) bool
Vec4ApproxTo
func Vec4ApproxTo(a, b Vec4, delta Float) bool
Types
Color
Vec4
ColorAqua
ColorAquamarine
func ColorAquamarine() Color
ColorAzure
ColorBeige
ColorBisque
ColorBlack
ColorBlanchedAlmond
func ColorBlanchedAlmond() Color
ColorBlue
ColorBlueViolet
func ColorBlueViolet() Color
ColorBrown
ColorBurlyWood
func ColorBurlyWood() Color
ColorCadetBlue
func ColorCadetBlue() Color
ColorChartreuse
func ColorChartreuse() Color
ColorChocolate
func ColorChocolate() Color
ColorClear
ColorCoral
ColorCornSilk
func ColorCornSilk() Color
ColorCornflowerBlue
func ColorCornflowerBlue() Color
ColorCrimson
func ColorCrimson() Color
ColorCyan
ColorDarkBG
ColorDarkBlue
func ColorDarkBlue() Color
ColorDarkCyan
func ColorDarkCyan() Color
ColorDarkGoldenrod
func ColorDarkGoldenrod() Color
ColorDarkGray
func ColorDarkGray() Color
ColorDarkGreen
func ColorDarkGreen() Color
ColorDarkKhaki
func ColorDarkKhaki() Color
ColorDarkMagenta
func ColorDarkMagenta() Color
ColorDarkModeGrayBG
func ColorDarkModeGrayBG() Color
ColorDarkModeGrayFG
func ColorDarkModeGrayFG() Color
ColorDarkOliveGreen
func ColorDarkOliveGreen() Color
ColorDarkOrange
func ColorDarkOrange() Color
ColorDarkOrchid
func ColorDarkOrchid() Color
ColorDarkRed
func ColorDarkRed() Color
ColorDarkSalmon
func ColorDarkSalmon() Color
ColorDarkSeaGreen
func ColorDarkSeaGreen() Color
ColorDarkSlateBlue
func ColorDarkSlateBlue() Color
ColorDarkSlateGray
func ColorDarkSlateGray() Color
ColorDarkTurquoise
func ColorDarkTurquoise() Color
ColorDarkViolet
func ColorDarkViolet() Color
ColorDeepPink
func ColorDeepPink() Color
ColorDeepSkyBlue
func ColorDeepSkyBlue() Color
ColorDimGray
func ColorDimGray() Color
ColorDodgerBlue
func ColorDodgerBlue() Color
ColorFirebrick
func ColorFirebrick() Color
ColorFloralWhite
func ColorFloralWhite() Color
ColorForestGreen
func ColorForestGreen() Color
ColorFromColor8
func ColorFromColor8(c Color8) Color
ColorFromHexString
func ColorFromHexString(str string) (Color, error)
ColorFromVec3
func ColorFromVec3(v Vec3) Color
ColorFromVec4
func ColorFromVec4(v Vec4) Color
ColorFuchsia
func ColorFuchsia() Color
ColorGainsboro
func ColorGainsboro() Color
ColorGhostWhite
func ColorGhostWhite() Color
ColorGold
ColorGoldenrod
func ColorGoldenrod() Color
ColorGray
ColorGreen
ColorGreenYellow
func ColorGreenYellow() Color
ColorHoneydew
func ColorHoneydew() Color
ColorHotPink
func ColorHotPink() Color
ColorIndianRed
func ColorIndianRed() Color
ColorIndigo
ColorIvory
ColorKhaki
ColorLavender
func ColorLavender() Color
ColorLavenderBlush
func ColorLavenderBlush() Color
ColorLawnGreen
func ColorLawnGreen() Color
ColorLemonChiffon
func ColorLemonChiffon() Color
ColorLightBlue
func ColorLightBlue() Color
ColorLightCoral
func ColorLightCoral() Color
ColorLightCyan
func ColorLightCyan() Color
ColorLightGoldenrodYellow
func ColorLightGoldenrodYellow() Color
ColorLightGreen
func ColorLightGreen() Color
ColorLightGrey
func ColorLightGrey() Color
ColorLightPink
func ColorLightPink() Color
ColorLightSalmon
func ColorLightSalmon() Color
ColorLightSeaGreen
func ColorLightSeaGreen() Color
ColorLightSkyBlue
func ColorLightSkyBlue() Color
ColorLightSlateGray
func ColorLightSlateGray() Color
ColorLightSteelBlue
func ColorLightSteelBlue() Color
ColorLightYellow
func ColorLightYellow() Color
ColorLime
ColorLimeGreen
func ColorLimeGreen() Color
ColorLinen
ColorMagenta
func ColorMagenta() Color
ColorMaroon
ColorMediumAquamarine
func ColorMediumAquamarine() Color
ColorMediumBlue
func ColorMediumBlue() Color
ColorMediumOrchid
func ColorMediumOrchid() Color
ColorMediumPurple
func ColorMediumPurple() Color
ColorMediumSeaGreen
func ColorMediumSeaGreen() Color
ColorMediumSlateBlue
func ColorMediumSlateBlue() Color
ColorMediumSpringGreen
func ColorMediumSpringGreen() Color
ColorMediumTurquoise
func ColorMediumTurquoise() Color
ColorMediumVioletRed
func ColorMediumVioletRed() Color
ColorMidnightBlue
func ColorMidnightBlue() Color
ColorMintCream
func ColorMintCream() Color
ColorMistyRose
func ColorMistyRose() Color
ColorMix
func ColorMix(lhs, rhs Color, amount Float) Color
ColorMoccasin
func ColorMoccasin() Color
ColorNavajoWhite
func ColorNavajoWhite() Color
ColorNavy
ColorOldLace
func ColorOldLace() Color
ColorOlive
ColorOliveDrab
func ColorOliveDrab() Color
ColorOrange
ColorOrangeRed
func ColorOrangeRed() Color
ColorOrchid
ColorPaleGoldenrod
func ColorPaleGoldenrod() Color
ColorPaleGreen
func ColorPaleGreen() Color
ColorPaleTurquoise
func ColorPaleTurquoise() Color
ColorPaleVioletred
func ColorPaleVioletred() Color
ColorPapayaWhip
func ColorPapayaWhip() Color
ColorPeachPuff
func ColorPeachPuff() Color
ColorPeru
ColorPink
ColorPlum
ColorPowderBlue
func ColorPowderBlue() Color
ColorPurple
ColorRGBAInt
func ColorRGBAInt(r, g, b, a int) Color
ColorRGBInt
func ColorRGBInt(r, g, b int) Color
ColorRed
ColorRosyBrown
func ColorRosyBrown() Color
ColorRoyalBlue
func ColorRoyalBlue() Color
ColorSaddleBrown
func ColorSaddleBrown() Color
ColorSalmon
ColorSandyBrown
func ColorSandyBrown() Color
ColorSeaGreen
func ColorSeaGreen() Color
ColorSeashell
func ColorSeashell() Color
ColorSienna
ColorSilver
ColorSky
ColorSkyBlue
func ColorSkyBlue() Color
ColorSlateBlue
func ColorSlateBlue() Color
ColorSlateGray
func ColorSlateGray() Color
ColorSlateGrey
func ColorSlateGrey() Color
ColorSnow
ColorSpringGreen
func ColorSpringGreen() Color
ColorSteelBlue
func ColorSteelBlue() Color
ColorTan
ColorTeal
ColorThistle
func ColorThistle() Color
ColorTomato
ColorTransparent
func ColorTransparent() Color
ColorTurquoise
func ColorTurquoise() Color
ColorViolet
ColorWheat
ColorWhite
ColorWhiteSmoke
func ColorWhiteSmoke() Color
ColorYellow
ColorYellowGreen
func ColorYellowGreen() Color
ColorZero
NewColor
func NewColor(r, g, b, a Float) Color
Color.A
Color.AsColor8
func (c Color) AsColor8() Color8
Color.B
Color.Equals
func (lhs Color) Equals(rhs Color) bool
Color.G
Color.Hex
func (c Color) Hex() string
Color.IsZero
func (c Color) IsZero() bool
Color.MultiplyAssign
func (c *Color) MultiplyAssign(other Color)
Color.PA
func (c *Color) PA() *Float
Color.PB
func (c *Color) PB() *Float
Color.PG
func (c *Color) PG() *Float
Color.PR
func (c *Color) PR() *Float
Color.R
Color.RGBA
func (c Color) RGBA() (Float, Float, Float, Float)
Color.ScaleWithoutAlpha
func (c Color) ScaleWithoutAlpha(scale Float) Color
Color.SetA
func (c *Color) SetA(a Float)
Color.SetB
func (c *Color) SetB(b Float)
Color.SetG
func (c *Color) SetG(g Float)
Color.SetR
func (c *Color) SetR(r Float)
Color8
struct
type Color8 struct {
R uint8
G uint8
B uint8
A uint8
}
Color8FromColor
func Color8FromColor(c Color) Color8
Color8FromHexString
func Color8FromHexString(str string) (Color8, error)
NewColor8
func NewColor8(r, g, b, a uint8) Color8
Color8.AsColor
func (c Color8) AsColor() Color
Color8.Equal
func (c Color8) Equal(rhs Color8) bool
Color8.Hex
func (c Color8) Hex() string
Color8.Similar
func (lhs Color8) Similar(rhs Color8, tolerance uint8) bool
ColorComponent
int
type ColorComponent = int
const (
R ColorComponent = iota
G
B
A
)
Float
float32
Abs
Acos
Asin
Atan
Atan2
func Atan2(y Float, x Float) Float
Ceil
Clamp
func Clamp(current, minimum, maximum Float) Float
Cos
Deg2Rad
func Deg2Rad(degree Float) Float
Floor
func Floor(x Float) Float
Inf
Log2
Max
func Max(a Float, b Float) Float
Min
func Min(a Float, b Float) Float
Mod
func Mod(x Float, y Float) Float
Pow
func Pow(x Float, y Float) Float
Rad2Deg
func Rad2Deg(radian Float) Float
Round
func Round(x Float) Float
Sin
Sqrt
Tan
Vec2Dot
func Vec2Dot(v, other Vec2) Float
Vec3Dot
func Vec3Dot(v, other Vec3) Float
Vec4Dot
func Vec4Dot(a, b Vec4) Float
Mat3
[9]Float
Mat3FromMat4
func Mat3FromMat4(m Mat4) Mat3
Mat3Identity
Mat3Zero
NewMat3
Mat3.ColumnVector
func (m Mat3) ColumnVector(col int) Vec3
Mat3.Multiply
func (m Mat3) Multiply(rhs Mat3) Mat3
Mat3.MultiplyAssign
func (m *Mat3) MultiplyAssign(rhs Mat3)
Mat3.MultiplyVec3
func (m Mat3) MultiplyVec3(v Vec3) Vec3
Mat3.Reset
Mat3.RowVector
func (m Mat3) RowVector(row int) Vec3
Mat3.ToMat4
func (m Mat3) ToMat4() Mat4
Mat3.Transpose
func (m Mat3) Transpose() Mat3
Mat4
[16]Float
Mat4FromSlice
func Mat4FromSlice(a []Float) Mat4
Mat4Identity
Mat4LookAt
func Mat4LookAt(eye, center, up Vec3) Mat4
Mat4Multiply
func Mat4Multiply(a, b Mat4) Mat4
Mat4Zero
NewMat4
Mat4.AddAssign
func (m *Mat4) AddAssign(rhs Mat4)
Mat4.At
func (m Mat4) At(rowIndex, colIndex int) Float
Mat4.ColumnVector
func (m Mat4) ColumnVector(col int) Vec4
Mat4.Forward
func (m Mat4) Forward() Vec3
Mat4.Inverse
Mat4.Invert
func (m Mat4) Invert() Mat4
Mat4.Mat4ProjToVulkan
func (m Mat4) Mat4ProjToVulkan() Mat4
Mat4.Mat4Project
func (m Mat4) Mat4Project(pos Vec3, viewport Vec4) Vec3
Mat4.Mat4UnProject
func (m Mat4) Mat4UnProject(pos Vec3, viewport Vec4) Vec3
Mat4.MultiplyAssign
func (a *Mat4) MultiplyAssign(b Mat4)
Mat4.NegateAssign
func (m *Mat4) NegateAssign()
Mat4.Orthographic
func (m *Mat4) Orthographic(left, right, bottom, top, near, far Float)
Mat4.Perspective
func (m *Mat4) Perspective(fovy, aspect, nearVal, farVal Float)
Mat4.Position
func (m Mat4) Position() Vec3
Mat4.Reset
Mat4.Right
func (m Mat4) Right() Vec3
Mat4.Rotate
func (m *Mat4) Rotate(rotate Vec3)
Mat4.RotateAngles
func (m *Mat4) RotateAngles(axis Vec3, angle Float)
Mat4.RotateX
func (m *Mat4) RotateX(angles Float)
Mat4.RotateY
func (m *Mat4) RotateY(angles Float)
Mat4.RotateZ
func (m *Mat4) RotateZ(angles Float)
Mat4.RowVector
func (m Mat4) RowVector(row int) Vec4
Mat4.Scale
func (m *Mat4) Scale(scale Vec3)
Mat4.SetTranslation
func (m *Mat4) SetTranslation(translation Vec3)
Mat4.SubtractAssign
func (m *Mat4) SubtractAssign(rhs Mat4)
Mat4.ToQuaternion
func (m Mat4) ToQuaternion() Quaternion
func (m Mat4) TransformPoint(point Vec3) Vec3
Mat4.Translate
func (m *Mat4) Translate(translation Vec3)
Mat4.Transpose
func (m Mat4) Transpose() Mat4
Mat4.TransposeAssign
func (m *Mat4) TransposeAssign()
Mat4.Up
Mat4.Zero
Quaternion
[4]Float
NewQuaternion
func NewQuaternion(w, x, y, z Float) Quaternion
QuatAngleBetween
func QuatAngleBetween(lhs, rhs Vec3) Quaternion
QuaternionAxisAngle
func QuaternionAxisAngle(axis Vec3, angle Float) Quaternion
QuaternionFromArray
func QuaternionFromArray(xyzw [4]Float) Quaternion
QuaternionFromEuler
func QuaternionFromEuler(v Vec3) Quaternion
QuaternionFromMat4
func QuaternionFromMat4(m Mat4) Quaternion
QuaternionFromSlice
func QuaternionFromSlice(xyzw []Float) Quaternion
QuaternionFromVec4
func QuaternionFromVec4(v Vec4) Quaternion
QuaternionFromXYZW
func QuaternionFromXYZW(xyzw [4]Float) Quaternion
QuaternionFromXYZWSlice
func QuaternionFromXYZWSlice(xyzw []Float) Quaternion
QuaternionIdentity
func QuaternionIdentity() Quaternion
QuaternionLerp
func QuaternionLerp(from, to Quaternion, factor Float) Quaternion
QuaternionLookAt
func QuaternionLookAt(from, to Vec3) Quaternion
QuaternionSlerp
func QuaternionSlerp(from, to Quaternion, factor Float) Quaternion
Quaternion.AddAssign
func (q *Quaternion) AddAssign(rhs Quaternion)
Quaternion.Conjugate
func (q *Quaternion) Conjugate()
Quaternion.Inverse
func (q *Quaternion) Inverse()
Quaternion.MultiplyAssign
func (q *Quaternion) MultiplyAssign(rhs Quaternion)
Quaternion.MultiplyVec3
func (q Quaternion) MultiplyVec3(rhs Vec3) Vec3
Quaternion.Normal
func (q Quaternion) Normal() Quaternion
Quaternion.Normalize
func (q *Quaternion) Normalize()
Quaternion.ToEuler
func (q Quaternion) ToEuler() Vec3
Quaternion.ToMat4
func (q Quaternion) ToMat4() Mat4
Quaternion.W
func (q Quaternion) W() Float
Quaternion.X
func (q Quaternion) X() Float
Quaternion.Y
func (q Quaternion) Y() Float
Quaternion.Z
func (q Quaternion) Z() Float
QuaternionComponent
int
type QuaternionComponent = int
const (
Qw QuaternionComponent = iota
Qx
Qy
Qz
)
struct
type Transform struct {
Identifier uint8 // Typically just used for bone index right now
// Has unexported fields.
}
func NewTransform() Transform
func (t *Transform) CalcWorldMatrix() Mat4
func (t *Transform) ContainsPoint(point Vec3) bool
func (t *Transform) ContainsPoint2D(point Vec2) bool
func (t *Transform) Copy(other Transform)
func (t *Transform) Forward() Vec3
func (t *Transform) IsDirty() bool
func (t *Transform) LookAt(point Vec3)
func (t *Transform) Matrix() Mat4
func (t *Transform) Parent() *Transform
func (t *Transform) Position() Vec3
func (t *Transform) ResetDirty()
func (t *Transform) Right() Vec3
func (t *Transform) Rotation() Vec3
func (t *Transform) Scale() Vec3
func (t *Transform) SetChildrenOrdered()
func (t *Transform) SetChildrenUnordered()
func (t *Transform) SetDirty()
func (t *Transform) SetParent(parent *Transform)
func (t *Transform) SetPosition(position Vec3)
func (t *Transform) SetRotation(rotation Vec3)
func (t *Transform) SetScale(scale Vec3)
func (t *Transform) SetWorldPosition(position Vec3)
func (t *Transform) SetWorldRotation(rotation Vec3)
func (t *Transform) SetWorldScale(scale Vec3)
func (t *Transform) StartLive()
func (t *Transform) StopLive()
func (t *Transform) Up() Vec3
func (t *Transform) UpdateMatrix()
func (t *Transform) UpdateWorldMatrix()
func (t *Transform) WorldMatrix() Mat4
func (t *Transform) WorldPosition() Vec3
func (t *Transform) WorldRotation() Vec3
func (t *Transform) WorldScale() Vec3
func (t *Transform) WorldTransform() (Vec3, Vec3, Vec3)
Vec2
[2]Float
NewVec2
func NewVec2(x, y Float) Vec2
Vec2Down
Vec2FromArray
func Vec2FromArray(a [2]Float) Vec2
Vec2FromSlice
func Vec2FromSlice(a []Float) Vec2
Vec2FromString
func Vec2FromString(str string) Vec2
Vec2Half
Vec2Largest
Vec2Left
Vec2Lerp
func Vec2Lerp(from, to Vec2, t Float) Vec2
Vec2Max
func Vec2Max(a, b Vec2) Vec2
Vec2MaxAbs
func Vec2MaxAbs(a, b Vec2) Vec2
Vec2Min
func Vec2Min(a, b Vec2) Vec2
Vec2MinAbs
func Vec2MinAbs(a, b Vec2) Vec2
Vec2One
Vec2Right
Vec2Up
Vec2Zero
Vec2.Abs
Vec2.Add
func (v Vec2) Add(other Vec2) Vec2
Vec2.AddAssign
func (v *Vec2) AddAssign(other Vec2)
Vec2.Angle
func (v Vec2) Angle(other Vec2) Float
Vec2.AsVec2i
func (v Vec2) AsVec2i() Vec2i
Vec2.Distance
func (v Vec2) Distance(other Vec2) Float
Vec2.Divide
func (v Vec2) Divide(other Vec2) Vec2
Vec2.DivideAssign
func (v *Vec2) DivideAssign(other Vec2)
Vec2.Equals
func (v Vec2) Equals(other Vec2) bool
Vec2.Height
func (v Vec2) Height() Float
Vec2.Inverse
Vec2.LargestAxis
func (v Vec2) LargestAxis() Float
Vec2.Length
func (v Vec2) Length() Float
Vec2.Multiply
func (v Vec2) Multiply(other Vec2) Vec2
Vec2.MultiplyAssign
func (v *Vec2) MultiplyAssign(other Vec2)
Vec2.Negative
func (v Vec2) Negative() Vec2
Vec2.Normal
func (v Vec2) Normal() Vec2
Vec2.Normalize
func (v *Vec2) Normalize()
Vec2.PX
func (v *Vec2) PX() *Float
Vec2.PY
func (v *Vec2) PY() *Float
Vec2.Scale
func (v Vec2) Scale(scalar Float) Vec2
Vec2.ScaleAssign
func (v *Vec2) ScaleAssign(scalar Float)
Vec2.SetHeight
func (v *Vec2) SetHeight(y Float)
Vec2.SetWidth
func (v *Vec2) SetWidth(x Float)
Vec2.SetX
func (v *Vec2) SetX(x Float)
Vec2.SetY
func (v *Vec2) SetY(y Float)
Vec2.Shrink
func (v Vec2) Shrink(scalar Float) Vec2
Vec2.ShrinkAssign
func (v *Vec2) ShrinkAssign(scalar Float)
Vec2.String
func (v Vec2) String() string
Vec2.Subtract
func (v Vec2) Subtract(other Vec2) Vec2
Vec2.SubtractAssign
func (v *Vec2) SubtractAssign(other Vec2)
Vec2.Width
func (v Vec2) Width() Float
Vec2.X
Vec2.XY
func (v Vec2) XY() (Float, Float)
Vec2.Y
Vec2i
[2]int32
Vec2i.X
Vec2i.Y
Vec3
[3]Float
Mat4ToScreenSpace
func Mat4ToScreenSpace(pos Vec3, view, projection Mat4, viewport Vec4) Vec3
NewVec3
func NewVec3(x, y, z Float) Vec3
Vec3Backward
Vec3Cross
func Vec3Cross(v, other Vec3) Vec3
Vec3Down
Vec3Forward
Vec3FromArray
func Vec3FromArray(a [3]Float) Vec3
Vec3FromSlice
func Vec3FromSlice(a []Float) Vec3
Vec3FromString
func Vec3FromString(str string) Vec3
Vec3Half
Vec3Inf
func Vec3Inf(sign int) Vec3
Vec3Largest
Vec3Left
Vec3Lerp
func Vec3Lerp(from, to Vec3, t Float) Vec3
Vec3Max
func Vec3Max(v ...Vec3) Vec3
Vec3MaxAbs
func Vec3MaxAbs(v ...Vec3) Vec3
Vec3Min
func Vec3Min(v ...Vec3) Vec3
Vec3MinAbs
func Vec3MinAbs(v ...Vec3) Vec3
Vec3One
Vec3Right
Vec3Up
Vec3Zero
Vec3.Abs
Vec3.Add
func (v Vec3) Add(other Vec3) Vec3
Vec3.AddAssign
func (v *Vec3) AddAssign(other Vec3)
Vec3.Angle
func (v Vec3) Angle(other Vec3) Float
Vec3.AsAligned16
func (v Vec3) AsAligned16() [4]Float
Vec3.AsVec2
func (v Vec3) AsVec2() Vec2
Vec3.AsVec3i
func (v Vec3) AsVec3i() Vec3i
Vec3.AsVec4
func (v Vec3) AsVec4() Vec4
Vec3.Distance
func (v Vec3) Distance(other Vec3) Float
Vec3.Divide
func (v Vec3) Divide(other Vec3) Vec3
Vec3.DivideAssign
func (v *Vec3) DivideAssign(other Vec3)
Vec3.Equals
func (v Vec3) Equals(other Vec3) bool
Vec3.Inverse
Vec3.Length
func (v Vec3) Length() Float
Vec3.LongestAxis
func (v Vec3) LongestAxis() int
Vec3.LongestAxisValue
func (v Vec3) LongestAxisValue() Float
Vec3.Multiply
func (v Vec3) Multiply(other Vec3) Vec3
Vec3.MultiplyAssign
func (v *Vec3) MultiplyAssign(other Vec3)
Vec3.MultiplyMat3
func (v Vec3) MultiplyMat3(rhs Mat3) Vec3
Vec3.Negative
func (v Vec3) Negative() Vec3
Vec3.Normal
func (v Vec3) Normal() Vec3
Vec3.Normalize
func (v *Vec3) Normalize()
Vec3.Orthogonal
func (v Vec3) Orthogonal() Vec3
Vec3.PX
func (v *Vec3) PX() *Float
Vec3.PY
func (v *Vec3) PY() *Float
Vec3.PZ
func (v *Vec3) PZ() *Float
Vec3.Scale
func (v Vec3) Scale(scalar Float) Vec3
Vec3.ScaleAssign
func (v *Vec3) ScaleAssign(scalar Float)
Vec3.SetX
func (v *Vec3) SetX(x Float)
Vec3.SetY
func (v *Vec3) SetY(y Float)
Vec3.SetZ
func (v *Vec3) SetZ(z Float)
Vec3.Shrink
func (v Vec3) Shrink(scalar Float) Vec3
Vec3.ShrinkAssign
func (v *Vec3) ShrinkAssign(scalar Float)
Vec3.SquareDistance
func (v Vec3) SquareDistance(b Vec3) Float
Vec3.String
func (v Vec3) String() string
Vec3.Subtract
func (v Vec3) Subtract(other Vec3) Vec3
Vec3.SubtractAssign
func (v *Vec3) SubtractAssign(other Vec3)
Vec3.X
Vec3.XYZ
func (v Vec3) XYZ() (Float, Float, Float)
Vec3.Y
Vec3.Z
Vec3i
[3]int32
Vec3i.X
Vec3i.Y
Vec3i.Z
Vec4
[4]Float
Mat4MultiplyVec4
func Mat4MultiplyVec4(a Mat4, b Vec4) Vec4
NewVec4
func NewVec4(x, y, z, w Float) Vec4
Vec4Area
func Vec4Area(xa, ya, xb, yb Float) Vec4
Vec4FromArray
func Vec4FromArray(a [4]Float) Vec4
Vec4FromSlice
func Vec4FromSlice(a []Float) Vec4
Vec4FromString
func Vec4FromString(str string) Vec4
Vec4Half
Vec4Largest
Vec4Lerp
func Vec4Lerp(from, to Vec4, t Float) Vec4
Vec4Max
func Vec4Max(a, b Vec4) Vec4
Vec4MaxAbs
func Vec4MaxAbs(a, b Vec4) Vec4
Vec4Min
func Vec4Min(a, b Vec4) Vec4
Vec4MinAbs
func Vec4MinAbs(a, b Vec4) Vec4
Vec4MultiplyMat4
func Vec4MultiplyMat4(v Vec4, m Mat4) Vec4
Vec4One
Vec4Zero
Vec4.Abs
Vec4.Add
func (v Vec4) Add(other Vec4) Vec4
Vec4.AddAssign
func (v *Vec4) AddAssign(other Vec4)
Vec4.Angle
func (v Vec4) Angle(other Vec4) Float
Vec4.AreaContains
func (v Vec4) AreaContains(x, y Float) bool
Vec4.AsVec3
func (v Vec4) AsVec3() Vec3
Vec4.AsVec4i
func (v Vec4) AsVec4i() Vec4i
Vec4.Bottom
func (v Vec4) Bottom() Float
Vec4.BoxContains
func (v Vec4) BoxContains(x, y Float) bool
Vec4.Distance
func (v Vec4) Distance(other Vec4) Float
Vec4.Divide
func (v Vec4) Divide(other Vec4) Vec4
Vec4.DivideAssign
func (v *Vec4) DivideAssign(other Vec4)
Vec4.Equals
func (v Vec4) Equals(other Vec4) bool
Vec4.Height
func (v Vec4) Height() Float
Vec4.Inverse
Vec4.LargestAxis
func (v Vec4) LargestAxis() Float
Vec4.Left
func (v Vec4) Left() Float
Vec4.Length
func (v Vec4) Length() Float
Vec4.Multiply
func (v Vec4) Multiply(other Vec4) Vec4
Vec4.MultiplyAssign
func (v *Vec4) MultiplyAssign(other Vec4)
Vec4.Negative
func (v Vec4) Negative() Vec4
Vec4.Normal
func (v Vec4) Normal() Vec4
Vec4.Normalize
func (v *Vec4) Normalize()
Vec4.PW
func (v *Vec4) PW() *Float
Vec4.PX
func (v *Vec4) PX() *Float
Vec4.PY
func (v *Vec4) PY() *Float
Vec4.PZ
func (v *Vec4) PZ() *Float
Vec4.Right
func (v Vec4) Right() Float
Vec4.Scale
func (v Vec4) Scale(scalar Float) Vec4
Vec4.ScaleAssign
func (v *Vec4) ScaleAssign(scalar Float)
Vec4.ScreenAreaContains
func (v Vec4) ScreenAreaContains(x, y Float) bool
Vec4.SetBottom
func (v *Vec4) SetBottom(w Float)
Vec4.SetHeight
func (v *Vec4) SetHeight(w Float)
Vec4.SetLeft
func (v *Vec4) SetLeft(x Float)
Vec4.SetRight
func (v *Vec4) SetRight(z Float)
Vec4.SetTop
func (v *Vec4) SetTop(y Float)
Vec4.SetW
func (v *Vec4) SetW(w Float)
Vec4.SetWidth
func (v *Vec4) SetWidth(z Float)
Vec4.SetX
func (v *Vec4) SetX(x Float)
Vec4.SetY
func (v *Vec4) SetY(y Float)
Vec4.SetZ
func (v *Vec4) SetZ(z Float)
Vec4.Shrink
func (v Vec4) Shrink(scalar Float) Vec4
Vec4.ShrinkAssign
func (v *Vec4) ShrinkAssign(scalar Float)
Vec4.String
func (v Vec4) String() string
Vec4.Subtract
func (v Vec4) Subtract(other Vec4) Vec4
Vec4.SubtractAssign
func (v *Vec4) SubtractAssign(other Vec4)
Vec4.Top
func (v Vec4) Top() Float
Vec4.W
Vec4.Width
func (v Vec4) Width() Float
Vec4.X
Vec4.XYZW
func (v Vec4) XYZW() (Float, Float, Float, Float)
Vec4.Y
Vec4.Z
Vec4i
[4]int32
Vec4i.W
Vec4i.X
Vec4i.Y
Vec4i.Z
VectorComponent
int
type VectorComponent = int
const (
Vx VectorComponent = iota
Vy
Vz
Vw
)