transformDirection method
Transform this direction vector by the given 4x4 matrix.
Implementation
Vector3 transformDirection(Matrix4 m ) {
final x = this.x, y = this.y, z = this.z;
final e = m.elements;
this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z;
this.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z;
this.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z;
return normalize();
}