MCPcopy Create free account
hub / github.com/mrdoob/three.js / setFromMatrix3

Method setFromMatrix3

src/math/Matrix4.js:214–229  ·  view source on GitHub ↗

* Set the upper 3x3 elements of this matrix to the values of given 3x3 matrix. * * @param {Matrix3} m - The 3x3 matrix. * @return {Matrix4} A reference to this matrix.

( m )

Source from the content-addressed store, hash-verified

212 * @return {Matrix4} A reference to this matrix.
213 */
214 setFromMatrix3( m ) {
215
216 const me = m.elements;
217
218 this.set(
219
220 me[ 0 ], me[ 3 ], me[ 6 ], 0,
221 me[ 1 ], me[ 4 ], me[ 7 ], 0,
222 me[ 2 ], me[ 5 ], me[ 8 ], 0,
223 0, 0, 0, 1
224
225 );
226
227 return this;
228
229 }
230
231 /**
232 * Extracts the basis of this matrix into the three axis vectors provided.

Callers 2

Matrix4.tests.jsFile · 0.80
intersectRayMethod · 0.80

Calls 1

setMethod · 0.95

Tested by

no test coverage detected