public override void OnFill(MeshBuffer m) { Vertex vertex = new Vertex(); Vertex vertex1 = new Vertex(); Vertex vertex2 = new Vertex(); Vertex vertex3 = new Vertex(); vertex.z = 0f; vertex1.z = 0f; vertex2.z = 0f; vertex3.z = 0f; Color color = base.color; float single = color.r; float single1 = single; vertex3.r = single; float single2 = single1; single1 = single2; vertex2.r = single2; float single3 = single1; single1 = single3; vertex1.r = single3; vertex.r = single1; float single4 = color.g; single1 = single4; vertex3.g = single4; float single5 = single1; single1 = single5; vertex2.g = single5; float single6 = single1; single1 = single6; vertex1.g = single6; vertex.g = single1; float single7 = color.b; single1 = single7; vertex3.b = single7; float single8 = single1; single1 = single8; vertex2.b = single8; float single9 = single1; single1 = single9; vertex1.b = single9; vertex.b = single1; float single10 = color.a; single1 = single10; vertex3.a = single10; float single11 = single1; single1 = single11; vertex2.a = single11; float single12 = single1; single1 = single12; vertex1.a = single12; vertex.a = single1; if (this._mirrorX) { if (!this._mirrorY) { vertex.x = 0.5f; vertex.y = 0f; vertex1.x = 0.5f; vertex1.y = -1f; vertex2.x = 0f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = 0f; vertex.u = 1f; vertex.v = 1f; vertex1.u = 1f; vertex1.v = 0f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); vertex.x = 1f; vertex.y = 0f; vertex1.x = 1f; vertex1.y = -1f; vertex2.x = 0.5f; vertex2.y = -1f; vertex3.x = 0.5f; vertex3.y = 0f; vertex.u = 0f; vertex.v = 1f; vertex1.u = 0f; vertex1.v = 0f; vertex2.u = 1f; vertex2.v = 0f; vertex3.u = 1f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); } else { vertex.x = 0.5f; vertex.y = -0.5f; vertex1.x = 0.5f; vertex1.y = -1f; vertex2.x = 0f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = -0.5f; vertex.u = 1f; vertex.v = 1f; vertex1.u = 1f; vertex1.v = 0f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); vertex.x = 0.5f; vertex.y = 0f; vertex1.x = 0.5f; vertex1.y = -0.5f; vertex2.x = 0f; vertex2.y = -0.5f; vertex3.x = 0f; vertex3.y = 0f; vertex.u = 0f; vertex.v = 1f; vertex1.u = 0f; vertex1.v = 0f; vertex2.u = 1f; vertex2.v = 0f; vertex3.u = 1f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); vertex.x = 1f; vertex.y = -0.5f; vertex1.x = 1f; vertex1.y = -1f; vertex2.x = 0.5f; vertex2.y = -1f; vertex3.x = 0.5f; vertex3.y = -0.5f; vertex.u = 1f; vertex.v = 1f; vertex1.u = 1f; vertex1.v = 0f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); vertex.x = 1f; vertex.y = 0f; vertex1.x = 1f; vertex1.y = -0.5f; vertex2.x = 0.5f; vertex2.y = -0.5f; vertex3.x = 0.5f; vertex3.y = 0f; vertex.u = 0f; vertex.v = 1f; vertex1.u = 0f; vertex1.v = 0f; vertex2.u = 1f; vertex2.v = 0f; vertex3.u = 1f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); } } else if (!this._mirrorY) { vertex.x = 1f; vertex.y = 0f; vertex1.x = 1f; vertex1.y = -1f; vertex2.x = 0f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = 0f; vertex.u = 1f; vertex.v = 1f; vertex1.u = 1f; vertex1.v = 0f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); } else { vertex.x = 1f; vertex.y = -0.5f; vertex1.x = 1f; vertex1.y = -1f; vertex2.x = 0f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = -0.5f; vertex.u = 1f; vertex.v = 0f; vertex1.u = 1f; vertex1.v = 1f; vertex2.u = 0f; vertex2.v = 1f; vertex3.u = 0f; vertex3.v = 0f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); vertex.x = 1f; vertex.y = 0f; vertex1.x = 1f; vertex1.y = -0.5f; vertex2.x = 0f; vertex2.y = -0.5f; vertex3.x = 0f; vertex3.y = 0f; vertex.u = 1f; vertex.v = 1f; vertex1.u = 1f; vertex1.v = 0f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); } }
public override void OnFill(MeshBuffer m) { Vertex vertex = new Vertex(); Vertex vertex1 = new Vertex(); Vertex vertex2 = new Vertex(); Vertex vertex3 = new Vertex(); vertex.z = 0f; vertex1.z = 0f; vertex2.z = 0f; vertex3.z = 0f; Color color = base.color; float single = color.r; float single1 = single; vertex3.r = single; float single2 = single1; single1 = single2; vertex2.r = single2; float single3 = single1; single1 = single3; vertex1.r = single3; vertex.r = single1; float single4 = color.g; single1 = single4; vertex3.g = single4; float single5 = single1; single1 = single5; vertex2.g = single5; float single6 = single1; single1 = single6; vertex1.g = single6; vertex.g = single1; float single7 = color.b; single1 = single7; vertex3.b = single7; float single8 = single1; single1 = single8; vertex2.b = single8; float single9 = single1; single1 = single9; vertex1.b = single9; vertex.b = single1; float single10 = color.a; single1 = single10; vertex3.a = single10; float single11 = single1; single1 = single11; vertex2.a = single11; float single12 = single1; single1 = single12; vertex1.a = single12; vertex.a = single1; if (this._mirrorX) { if (!this._mirrorY) { vertex.x = 0.5f; vertex.y = 0f; vertex1.x = 0.5f; vertex1.y = -1f; vertex2.x = 0f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = 0f; vertex.u = 1f; vertex.v = 1f; vertex1.u = 1f; vertex1.v = 0f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); vertex.x = 1f; vertex.y = 0f; vertex1.x = 1f; vertex1.y = -1f; vertex2.x = 0.5f; vertex2.y = -1f; vertex3.x = 0.5f; vertex3.y = 0f; vertex.u = 0f; vertex.v = 1f; vertex1.u = 0f; vertex1.v = 0f; vertex2.u = 1f; vertex2.v = 0f; vertex3.u = 1f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); } else { vertex.x = 0.5f; vertex.y = -0.5f; vertex1.x = 0.5f; vertex1.y = -1f; vertex2.x = 0f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = -0.5f; vertex.u = 1f; vertex.v = 1f; vertex1.u = 1f; vertex1.v = 0f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); vertex.x = 0.5f; vertex.y = 0f; vertex1.x = 0.5f; vertex1.y = -0.5f; vertex2.x = 0f; vertex2.y = -0.5f; vertex3.x = 0f; vertex3.y = 0f; vertex.u = 0f; vertex.v = 1f; vertex1.u = 0f; vertex1.v = 0f; vertex2.u = 1f; vertex2.v = 0f; vertex3.u = 1f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); vertex.x = 1f; vertex.y = -0.5f; vertex1.x = 1f; vertex1.y = -1f; vertex2.x = 0.5f; vertex2.y = -1f; vertex3.x = 0.5f; vertex3.y = -0.5f; vertex.u = 1f; vertex.v = 1f; vertex1.u = 1f; vertex1.v = 0f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); vertex.x = 1f; vertex.y = 0f; vertex1.x = 1f; vertex1.y = -0.5f; vertex2.x = 0.5f; vertex2.y = -0.5f; vertex3.x = 0.5f; vertex3.y = 0f; vertex.u = 0f; vertex.v = 1f; vertex1.u = 0f; vertex1.v = 0f; vertex2.u = 1f; vertex2.v = 0f; vertex3.u = 1f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); } } else if (!this._mirrorY) { vertex.x = 1f; vertex.y = 0f; vertex1.x = 1f; vertex1.y = -1f; vertex2.x = 0f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = 0f; vertex.u = 1f; vertex.v = 1f; vertex1.u = 1f; vertex1.v = 0f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); } else { vertex.x = 1f; vertex.y = -0.5f; vertex1.x = 1f; vertex1.y = -1f; vertex2.x = 0f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = -0.5f; vertex.u = 1f; vertex.v = 0f; vertex1.u = 1f; vertex1.v = 1f; vertex2.u = 0f; vertex2.v = 1f; vertex3.u = 0f; vertex3.v = 0f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); vertex.x = 1f; vertex.y = 0f; vertex1.x = 1f; vertex1.y = -0.5f; vertex2.x = 0f; vertex2.y = -0.5f; vertex3.x = 0f; vertex3.y = 0f; vertex.u = 1f; vertex.v = 1f; vertex1.u = 1f; vertex1.v = 0f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 1f; m.TextureQuad(vertex, vertex1, vertex2, vertex3); } }
public override void OnFill(MeshBuffer m) { Vertex vertex; Vertex vertex2; Vertex vertex3; Vertex vertex4; vertex.z = 0f; vertex2.z = 0f; vertex3.z = 0f; vertex4.z = 0f; Color color = base.color; vertex.r = vertex2.r = vertex3.r = vertex4.r = color.r; vertex.g = vertex2.g = vertex3.g = vertex4.g = color.g; vertex.b = vertex2.b = vertex3.b = vertex4.b = color.b; vertex.a = vertex2.a = vertex3.a = vertex4.a = color.a; if (this._mirrorX) { if (this._mirrorY) { vertex.x = 0.5f; vertex.y = -0.5f; vertex2.x = 0.5f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = -1f; vertex4.x = 0f; vertex4.y = -0.5f; vertex.u = 1f; vertex.v = 1f; vertex2.u = 1f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 0f; vertex4.u = 0f; vertex4.v = 1f; m.TextureQuad(vertex, vertex2, vertex3, vertex4); vertex.x = 0.5f; vertex.y = 0f; vertex2.x = 0.5f; vertex2.y = -0.5f; vertex3.x = 0f; vertex3.y = -0.5f; vertex4.x = 0f; vertex4.y = 0f; vertex.u = 0f; vertex.v = 1f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 1f; vertex3.v = 0f; vertex4.u = 1f; vertex4.v = 1f; m.TextureQuad(vertex, vertex2, vertex3, vertex4); vertex.x = 1f; vertex.y = -0.5f; vertex2.x = 1f; vertex2.y = -1f; vertex3.x = 0.5f; vertex3.y = -1f; vertex4.x = 0.5f; vertex4.y = -0.5f; vertex.u = 1f; vertex.v = 1f; vertex2.u = 1f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 0f; vertex4.u = 0f; vertex4.v = 1f; m.TextureQuad(vertex, vertex2, vertex3, vertex4); vertex.x = 1f; vertex.y = 0f; vertex2.x = 1f; vertex2.y = -0.5f; vertex3.x = 0.5f; vertex3.y = -0.5f; vertex4.x = 0.5f; vertex4.y = 0f; vertex.u = 0f; vertex.v = 1f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 1f; vertex3.v = 0f; vertex4.u = 1f; vertex4.v = 1f; m.TextureQuad(vertex, vertex2, vertex3, vertex4); } else { vertex.x = 0.5f; vertex.y = 0f; vertex2.x = 0.5f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = -1f; vertex4.x = 0f; vertex4.y = 0f; vertex.u = 1f; vertex.v = 1f; vertex2.u = 1f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 0f; vertex4.u = 0f; vertex4.v = 1f; m.TextureQuad(vertex, vertex2, vertex3, vertex4); vertex.x = 1f; vertex.y = 0f; vertex2.x = 1f; vertex2.y = -1f; vertex3.x = 0.5f; vertex3.y = -1f; vertex4.x = 0.5f; vertex4.y = 0f; vertex.u = 0f; vertex.v = 1f; vertex2.u = 0f; vertex2.v = 0f; vertex3.u = 1f; vertex3.v = 0f; vertex4.u = 1f; vertex4.v = 1f; m.TextureQuad(vertex, vertex2, vertex3, vertex4); } } else if (this._mirrorY) { vertex.x = 1f; vertex.y = -0.5f; vertex2.x = 1f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = -1f; vertex4.x = 0f; vertex4.y = -0.5f; vertex.u = 1f; vertex.v = 0f; vertex2.u = 1f; vertex2.v = 1f; vertex3.u = 0f; vertex3.v = 1f; vertex4.u = 0f; vertex4.v = 0f; m.TextureQuad(vertex, vertex2, vertex3, vertex4); vertex.x = 1f; vertex.y = 0f; vertex2.x = 1f; vertex2.y = -0.5f; vertex3.x = 0f; vertex3.y = -0.5f; vertex4.x = 0f; vertex4.y = 0f; vertex.u = 1f; vertex.v = 1f; vertex2.u = 1f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 0f; vertex4.u = 0f; vertex4.v = 1f; m.TextureQuad(vertex, vertex2, vertex3, vertex4); } else { vertex.x = 1f; vertex.y = 0f; vertex2.x = 1f; vertex2.y = -1f; vertex3.x = 0f; vertex3.y = -1f; vertex4.x = 0f; vertex4.y = 0f; vertex.u = 1f; vertex.v = 1f; vertex2.u = 1f; vertex2.v = 0f; vertex3.u = 0f; vertex3.v = 0f; vertex4.u = 0f; vertex4.v = 1f; m.TextureQuad(vertex, vertex2, vertex3, vertex4); } }