/// <summary> Transforms a point through the Matrix, but excluding translation! This is great /// for transforming vectors that are -directions- rather than points in space. Use this to /// transform normals and directions. The same as multiplying (x,y,z,0) with the Matrix.</summary> /// <param name="direction">The direction to transform.</param> /// <returns>The direction transformed by the Matrix.</returns> public Vec3 TransformDirection(Vec3 direction) => NativeAPI.matrix_mul_direction(this, direction);
/// <summary>Shorthand to transform a ray though the Matrix! This /// properly transforms the position with the point transform method, /// and the direction with the direction transform method. Does not /// normalize, nor does it preserve a normalized direction if the /// Matrix contains scale data.</summary> /// <param name="aRay">A ray you wish to transform from one space to /// another.</param> /// <returns>The transformed ray!</returns> public Ray TransformRay(Ray aRay) => new Ray( NativeAPI.matrix_mul_point(this, aRay.position), NativeAPI.matrix_mul_direction(this, aRay.direction));