MCPcopy
hub / github.com/g3n/engine / ApplyMatrix3

Method ApplyMatrix3

math32/vector3.go:453–462  ·  view source on GitHub ↗

ApplyMatrix3 multiplies the specified 3x3 matrix by this vector. Returns the pointer to this updated vector.

(m *Matrix3)

Source from the content-addressed store, hash-verified

451// ApplyMatrix3 multiplies the specified 3x3 matrix by this vector.
452// Returns the pointer to this updated vector.
453func (v *Vector3) ApplyMatrix3(m *Matrix3) *Vector3 {
454
455 x := v.X
456 y := v.Y
457 z := v.Z
458 v.X = m[0]*x + m[3]*y + m[6]*z
459 v.Y = m[1]*x + m[4]*y + m[7]*z
460 v.Z = m[2]*x + m[5]*y + m[8]*z
461 return v
462}
463
464// ApplyMatrix4 multiplies the specified 4x4 matrix by this vector.
465// Returns the pointer to this updated vector.

Callers 7

ApplyToVector3ArrayMethod · 0.95
UpdateMethod · 0.95
ApplyMatrixMethod · 0.80
ComputeGiMfMethod · 0.80
ComputeGiMGtMethod · 0.80
SolveMethod · 0.80
ApplyImpulseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected