* Multiplies this vector with the given 3x3 matrix. * * @param {Matrix3} m - The 3x3 matrix. * @return {Vector3} A reference to this vector.
( m )
| 415 | * @return {Vector3} A reference to this vector. |
| 416 | */ |
| 417 | applyMatrix3( m ) { |
| 418 | |
| 419 | const x = this.x, y = this.y, z = this.z; |
| 420 | const e = m.elements; |
| 421 | |
| 422 | this.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ] * z; |
| 423 | this.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ] * z; |
| 424 | this.z = e[ 2 ] * x + e[ 5 ] * y + e[ 8 ] * z; |
| 425 | |
| 426 | return this; |
| 427 | |
| 428 | } |
| 429 | |
| 430 | /** |
| 431 | * Multiplies this vector by the given normal matrix and normalizes |
no outgoing calls
no test coverage detected