Introduce float3 type.

This commit is contained in:
Paul Chote
2016-04-04 16:07:08 -04:00
parent aac4820ac7
commit a8dda39a72
7 changed files with 93 additions and 2 deletions

View File

@@ -95,6 +95,7 @@ namespace OpenRA
void SetBool(string name, bool value);
void SetVec(string name, float x);
void SetVec(string name, float x, float y);
void SetVec(string name, float x, float y, float z);
void SetVec(string name, float[] vec, int length);
void SetTexture(string param, ITexture texture);
void SetMatrix(string param, float[] mtx);

View File

@@ -18,8 +18,8 @@ namespace OpenRA.Graphics
{
public readonly float X, Y, Z, U, V, P, C;
public Vertex(float2 xy, float u, float v, float p, float c)
: this(xy.X, xy.Y, 0, u, v, p, c) { }
public Vertex(float3 xyz, float u, float v, float p, float c)
: this(xyz.X, xyz.Y, xyz.Z, u, v, p, c) { }
public Vertex(float[] xyz, float u, float v, float p, float c)
: this(xyz[0], xyz[1], xyz[2], u, v, p, c) { }