From 6cb616689535c340b0b4f441c12ef8eb1ee42cb0 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 22 Dec 2018 10:58:06 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9vector=E8=AE=BF=E9=97=AE=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/graphics/je_mesh.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libjin/graphics/je_mesh.cpp') diff --git a/src/libjin/graphics/je_mesh.cpp b/src/libjin/graphics/je_mesh.cpp index b96a4ff..d220bcb 100644 --- a/src/libjin/graphics/je_mesh.cpp +++ b/src/libjin/graphics/je_mesh.cpp @@ -24,8 +24,8 @@ namespace JinEngine void Mesh::pushVertex(float x, float y, float u, float v, Color color) { Vertex vert; - vert.xy.x = x; vert.xy.y = y; - vert.uv.u = u; vert.uv.v = v; + vert.xy.x() = x; vert.xy.y() = y; + vert.uv.u() = u; vert.uv.v() = v; vert.color = color; pushVertex(vert); } @@ -37,14 +37,14 @@ namespace JinEngine if (mVertices.size() == 2) { const Vertex& v0 = mVertices[0]; - mBound.l = min(v0.xy.x, vert.xy.x); - mBound.r = max(v0.xy.x, vert.xy.x); - mBound.t = min(v0.xy.y, vert.xy.y); - mBound.b = max(v0.xy.y, vert.xy.y); + mBound.l = min(v0.xy.x(), vert.xy.x()); + mBound.r = max(v0.xy.x(), vert.xy.x()); + mBound.t = min(v0.xy.y(), vert.xy.y()); + mBound.b = max(v0.xy.y(), vert.xy.y()); } else { - float x = vert.xy.x, y = vert.xy.y; + float x = vert.xy.x(), y = vert.xy.y(); mBound.l = x < mBound.l ? x : mBound.l; mBound.r = x > mBound.r ? x : mBound.r; mBound.t = y < mBound.t ? y : mBound.t; -- cgit v1.1-26-g67d0