예제 #1
0
 /// <summary>Translate. Creates a translation Matrix!</summary>
 /// <param name="x">Move an object on the x axis by this amount.</param>
 /// <param name="y">Move an object on the y axis by this amount.</param>
 /// <param name="z">Move an object on the z axis by this amount.</param>
 /// <returns>A Matrix containing a simple translation!</returns>
 public static Matrix T(float x, float y, float z) => NativeAPI.matrix_trs(new Vec3(x, y, z), Quat.Identity, Vec3.One);
예제 #2
0
 /// <summary>Translate. Creates a translation Matrix!</summary>
 /// <param name="translation">Move an object by this amount.</param>
 /// <returns>A Matrix containing a simple translation!</returns>
 public static Matrix T(Vec3 translation) => NativeAPI.matrix_trs(translation, Quat.Identity, Vec3.One);
예제 #3
0
 /// <summary>Translate, Scale. Creates a transform Matrix using both these components!</summary>
 /// <param name="translation">Move an object by this amount.</param>
 /// <param name="scale">How much larger or smaller this transform makes things. 1 is a good
 /// default, as 0 will shrink it to nothing! This will expand to a scale vector of (size, size, size)</param>
 /// <returns>A Matrix that combines translation and scale information into a single Matrix!</returns>
 public static Matrix TS(Vec3 translation, float scale = 1) => NativeAPI.matrix_trs(translation, Quat.Identity, new Vec3(scale, scale, scale));
예제 #4
0
 /// <summary>Translate, Scale. Creates a transform Matrix using both these components!</summary>
 /// <param name="translation">Move an object by this amount.</param>
 /// <param name="scale">How much larger or smaller this transform makes things. Vec3.One is a good
 /// default, as Vec3.Zero will shrink it to nothing!</param>
 /// <returns>A Matrix that combines translation and scale information into a single Matrix!</returns>
 public static Matrix TS(Vec3 translation, Vec3 scale) => NativeAPI.matrix_trs(translation, Quat.Identity, scale);
예제 #5
0
 /// <summary>Translate, Rotate, Scale. Creates a transform Matrix using all these components!</summary>
 /// <param name="translation">Move an object by this amount.</param>
 /// <param name="rotation">A Quaternion describing the rotation for this transform.</param>
 /// <param name="scale">How much larger or smaller this transform makes things. Vec3.One is a good
 /// default, as Vec3.Zero will shrink it to nothing!</param>
 /// <returns>A Matrix that combines translation, roatation, and scale information into a single Matrix!</returns>
 public static Matrix TRS(Vec3 translation, Quat rotation, Vec3 scale) => NativeAPI.matrix_trs(translation, rotation, scale);
예제 #6
0
 /// <summary>Translate, Rotate, Scale. Creates a transform Matrix using all these components!</summary>
 /// <param name="translation">Move an object by this amount.</param>
 /// <param name="rotation">A Quaternion describing the rotation for this transform.</param>
 /// <param name="scale">How much larger or smaller this transform makes things. 1 is a good
 /// default, as 0 will shrink it to nothing! This will expand to a scale vector of (size, size, size)</param>
 /// <returns>A Matrix that combines translation, roatation, and scale information into a single Matrix!</returns>
 public static Matrix TRS(Vec3 translation, Quat rotation, float scale = 1) => NativeAPI.matrix_trs(translation, rotation, new Vec3(scale, scale, scale));