MCPcopy
hub / github.com/mrdoob/three.js / setRotationFromMatrix

Method setRotationFromMatrix

src/core/Object3D.js:503–509  ·  view source on GitHub ↗

* Sets the given rotation represented as rotation matrix to the 3D object. * * @param {Matrix4} m - Although a 4x4 matrix is expected, the upper 3x3 portion must be * a pure rotation matrix (i.e, unscaled).

( m )

Source from the content-addressed store, hash-verified

501 * a pure rotation matrix (i.e, unscaled).
502 */
503 setRotationFromMatrix( m ) {
504
505 // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)
506
507 this.quaternion.setFromRotationMatrix( m );
508
509 }
510
511 /**
512 * Sets the given rotation represented as a Quaternion to the 3D object.

Callers 1

Object3D.tests.jsFile · 0.80

Calls 1

setFromRotationMatrixMethod · 0.45

Tested by

no test coverage detected