* Takes a vector and returns the vector resulting from multiplying. This function is only for 3x3 matrices. * that vector by this matrix from the left. * * This method applies the current 3x3 matrix to a given vector, effectively * transforming the vector using the matrix. The resulting
(multVector, target)
| 1599 | * } |
| 1600 | */ |
| 1601 | multiplyVec3(multVector, target) { |
| 1602 | if (target === undefined) { |
| 1603 | target = multVector.copy(); |
| 1604 | } |
| 1605 | target.x = this.row(0).dot(multVector); |
| 1606 | target.y = this.row(1).dot(multVector); |
| 1607 | target.z = this.row(2).dot(multVector); |
| 1608 | return target; |
| 1609 | } |
| 1610 | |
| 1611 | // ==================== |
| 1612 | // PRIVATE |