예제 #1
0
 /// <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);
예제 #2
0
 public static Vec3 operator *(Matrix a, Vec3 b) => NativeAPI.matrix_mul_point(a, b);
예제 #3
0
파일: Matrix.cs 프로젝트: slitcch/StereoKit
 /// <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));