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

Method SetFromMatrixPosition

math32/vector3.go:582–588  ·  view source on GitHub ↗

SetFromMatrixPosition set this vector from the translation coordinates in the specified transformation matrix.

(m *Matrix4)

Source from the content-addressed store, hash-verified

580// SetFromMatrixPosition set this vector from the translation coordinates
581// in the specified transformation matrix.
582func (v *Vector3) SetFromMatrixPosition(m *Matrix4) *Vector3 {
583
584 v.X = m[12]
585 v.Y = m[13]
586 v.Z = m[14]
587 return v
588}
589
590// SetFromMatrixColumn set this vector with the column at index of the m matrix.
591// Returns the pointer to this updated vector.

Callers 2

SetFromCameraMethod · 0.95
WorldPositionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected