public Vectex(float x, float y, float z, float w, float u, float v, float r, float g, float b, float _rhw) { this.pos = new Vector3(x, y, z, w); this.uvs = new TexturePosition(u, v); this.color = new Color(r, g, b); this.rhw = _rhw; }
public static TexturePosition operator *(float a, TexturePosition b) { TexturePosition c = new TexturePosition(); c.u = a * b.u; c.v = a * b.v; return(c); }
public static TexturePosition operator *(TexturePosition a, float b) { TexturePosition c = new TexturePosition(); c.u = a.u * b; c.v = a.v * b; return(c); }
public static TexturePosition operator *(TexturePosition a, TexturePosition b) { TexturePosition c = new TexturePosition(); c.u = a.u * b.u; c.v = a.v * b.v; return(c); }
public void InitRhw() { float _rhw = (float)1 / this.pos.w; this.rhw = _rhw; this.color *= _rhw; this.lightcolor *= rhw; this.uvs *= _rhw; }