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

Method Compose

math32/matrix4.go:614–620  ·  view source on GitHub ↗

Compose sets this matrix to a transformation matrix for the specified position, rotation specified by the quaternion and scale. Returns pointer to this updated matrix.

(position *Vector3, quaternion *Quaternion, scale *Vector3)

Source from the content-addressed store, hash-verified

612// rotation specified by the quaternion and scale.
613// Returns pointer to this updated matrix.
614func (m *Matrix4) Compose(position *Vector3, quaternion *Quaternion, scale *Vector3) *Matrix4 {
615
616 m.MakeRotationFromQuaternion(quaternion)
617 m.Scale(scale)
618 m.SetPosition(position)
619 return m
620}
621
622// Decompose updates the position vector, quaternion and scale from this transformation matrix.
623// Returns pointer to this unchanged matrix.

Callers 4

RenderSetupMethod · 0.95
RaycastSpriteMethod · 0.95
UpdateMatrixMethod · 0.80
BoundingBoxMethod · 0.80

Calls 3

ScaleMethod · 0.95
SetPositionMethod · 0.95

Tested by

no test coverage detected