/// <summary>Transforms a point through the Matrix! This is basically just multiplying /// a vector (x,y,z,1) with the Matrix.</summary> /// <param name="point">The point to transform.</param> /// <returns>The point transformed by the Matrix.</returns> public Vec3 TransformPoint(Vec3 point) => NativeAPI.matrix_mul_point(this, point);
public static Vec3 operator *(Matrix a, Vec3 b) => NativeAPI.matrix_mul_point(a, b);
/// <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));