Extensions for Vector4.
More...
|
static float[] | ToFloatArray (this Vector4 vector) |
| Converts a Vector4 into a float array (4 floats for XYZW). More...
|
|
static float[] | ToFloatArray (this Vector4[] vectors) |
| Converts an array of Vector4 into a float array (4 floats per vector). More...
|
|
static float [] TriDevs.TriEngine.Extensions.Vector4Extensions.ToFloatArray |
( |
this Vector4 |
vector | ) |
|
|
static |
Converts a Vector4 into a float array (4 floats for XYZW).
- Parameters
-
vector | The vector to convert. |
- Returns
- A float array representation of the vector.
41 return new[] {vector.X, vector.Y, vector.Z, vector.W};
static float [] TriDevs.TriEngine.Extensions.Vector4Extensions.ToFloatArray |
( |
this Vector4[] |
vectors | ) |
|
|
static |
Converts an array of Vector4 into a float array (4 floats per vector).
- Parameters
-
vectors | The vector array to convert. |
- Returns
- A float array representation of the vectors.
52 var result =
new float[4 * vectors.Length];
54 for (var i = 0; i < vectors.Length; i++)
58 result[index] = vectors[i].X;
59 result[index + 1] = vectors[i].Y;
60 result[index + 2] = vectors[i].Z;
61 result[index + 3] = vectors[i].W;
The documentation for this class was generated from the following file: