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

Method setFromMatrix4

src/math/Matrix3.js:173–187  ·  view source on GitHub ↗

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

( m )

Source from the content-addressed store, hash-verified

171 * @return {Matrix3} A reference to this matrix.
172 */
173 setFromMatrix4( m ) {
174
175 const me = m.elements;
176
177 this.set(
178
179 me[ 0 ], me[ 4 ], me[ 8 ],
180 me[ 1 ], me[ 5 ], me[ 9 ],
181 me[ 2 ], me[ 6 ], me[ 10 ]
182
183 );
184
185 return this;
186
187 }
188
189 /**
190 * Post-multiplies this matrix by the given 3x3 matrix.

Callers 5

getNormalMatrixMethod · 0.95
Matrix3.tests.jsFile · 0.80
addToRenderListFunction · 0.80
refreshUniformsCommonFunction · 0.80
applyMatrix4Method · 0.80

Calls 1

setMethod · 0.95

Tested by

no test coverage detected