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

Method UpdateMatrix

core/node.go:819–827  ·  view source on GitHub ↗

UpdateMatrix updates (if necessary) the local transform matrix of this node based on its position, quaternion, and scale.

()

Source from the content-addressed store, hash-verified

817// UpdateMatrix updates (if necessary) the local transform matrix
818// of this node based on its position, quaternion, and scale.
819func (n *Node) UpdateMatrix() bool {
820
821 if !n.matNeedsUpdate && !n.rotNeedsUpdate {
822 return false
823 }
824 n.matrix.Compose(&n.position, &n.quaternion, &n.scale)
825 n.matNeedsUpdate = false
826 return true
827}
828
829// UpdateMatrixWorld updates this node world transform matrix and of all its children
830func (n *Node) UpdateMatrixWorld() {

Callers 1

UpdateMatrixWorldMethod · 0.95

Calls 1

ComposeMethod · 0.80

Tested by

no test coverage detected