Documentation ¶
Index ¶
- Constants
- type Mat4
- func (m *Mat4) Identity() *Mat4
- func (m *Mat4) LookAt(position, target, up *Vector3) *Mat4
- func (m *Mat4) Mul(o *Mat4) *Mat4
- func (m *Mat4) Perspective(fov, aspectRatio, near, far float32) *Mat4
- func (m *Mat4) Reset() *Mat4
- func (m *Mat4) Rotate(angle, xAxis, yAxis, zAxis float32) *Mat4
- func (m *Mat4) Rotation(angle, xAxis, yAxis, zAxis float32) *Mat4
- func (m *Mat4) Scale(x, y, z float32) *Mat4
- func (m *Mat4) Scaling(x, y, z float32) *Mat4
- func (m *Mat4) Set(data [16]float32) *Mat4
- func (m *Mat4) String() string
- func (m *Mat4) Translate(x, y, z float32) *Mat4
- func (m *Mat4) Translation(x, y, z float32) *Mat4
- type Vector2
- type Vector3
- func (v *Vector3) Add(x, y, z float32) *Vector3
- func (v *Vector3) AddVector3(other *Vector3) *Vector3
- func (v *Vector3) Cross(other *Vector3) *Vector3
- func (v *Vector3) Distance(other *Vector3) float32
- func (v *Vector3) Div(x, y, z float32) *Vector3
- func (v *Vector3) DivVector3(other *Vector3) *Vector3
- func (v *Vector3) Equals(x, y, z float32) bool
- func (v *Vector3) EqualsVector(other *Vector3) bool
- func (v *Vector3) Len2() float32
- func (v *Vector3) Mul(x, y, z float32) *Vector3
- func (v *Vector3) MulMat4(mat *Mat4) *Vector3
- func (v *Vector3) MulVector3(other *Vector3) *Vector3
- func (v *Vector3) Norm() *Vector3
- func (v *Vector3) Rotate(other *Vector3, degrees float32) *Vector3
- func (v *Vector3) Scale(s float32) *Vector3
- func (v *Vector3) Set(x, y, z float32) *Vector3
- func (v *Vector3) SetVector3(other *Vector3) *Vector3
- func (v *Vector3) String() string
- func (v *Vector3) Sub(x, y, z float32) *Vector3
- func (v *Vector3) SubVector3(other *Vector3) *Vector3
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 (*Mat4) Perspective ¶
func (*Mat4) Translation ¶
type Vector3 ¶
type Vector3 struct {
X, Y, Z float32
}
func (*Vector3) AddVector3 ¶
func (*Vector3) DivVector3 ¶
func (*Vector3) EqualsVector ¶
func (*Vector3) MulMat4 ¶
MulMat4 left-multiplies the vector by the given matrix, assuming the fourth (w) component of the vector is 1.
func (*Vector3) MulVector3 ¶
func (*Vector3) SetVector3 ¶
func (*Vector3) SubVector3 ¶
Click to show internal directories.
Click to hide internal directories.