瀏覽代碼

easymesh: fix an data corruption with scaling along a single axis.

legacy
Sam Hocevar sam 12 年之前
父節點
當前提交
e22e905dec
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. +3
    -3
      src/easymesh/easymesh-parser.y
  2. +3
    -3
      src/generated/easymesh-parser.cpp

+ 3
- 3
src/easymesh/easymesh-parser.y 查看文件

@@ -127,9 +127,9 @@ transform_command:
| T_TAPERX args3 { mc.m_mesh.TaperX($2.f0, $2.f1, $2.f2); }
| T_TAPERY args3 { mc.m_mesh.TaperY($2.f0, $2.f1, $2.f2); }
| T_TAPERZ args3 { mc.m_mesh.TaperZ($2.f0, $2.f1, $2.f2); }
| T_SCALEX args1 { mc.m_mesh.Scale(vec3($2.f0, 0, 0)); }
| T_SCALEY args1 { mc.m_mesh.Scale(vec3(0, $2.f0, 0)); }
| T_SCALEZ args1 { mc.m_mesh.Scale(vec3(0, 0, $2.f0)); }
| T_SCALEX args1 { mc.m_mesh.Scale(vec3($2.f0, 1.0, 1.0)); }
| T_SCALEY args1 { mc.m_mesh.Scale(vec3(1.0, $2.f0, 1.0)); }
| T_SCALEZ args1 { mc.m_mesh.Scale(vec3(1.0, 1.0, $2.f0)); }
| T_SCALE args3 { mc.m_mesh.Scale(vec3($2.f0, $2.f1, $2.f2)); }
| T_MIRRORX { mc.m_mesh.MirrorX(); }
| T_MIRRORY { mc.m_mesh.MirrorY(); }


+ 3
- 3
src/generated/easymesh-parser.cpp 查看文件

@@ -590,21 +590,21 @@ namespace lol {

/* Line 690 of lalr1.cc */
#line 130 "easymesh/easymesh-parser.y"
{ mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); }
{ mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 1.0, 1.0)); }
break;

case 30:

/* Line 690 of lalr1.cc */
#line 131 "easymesh/easymesh-parser.y"
{ mc.m_mesh.Scale(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); }
{ mc.m_mesh.Scale(vec3(1.0, (yysemantic_stack_[(2) - (2)].args).f0, 1.0)); }
break;

case 31:

/* Line 690 of lalr1.cc */
#line 132 "easymesh/easymesh-parser.y"
{ mc.m_mesh.Scale(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); }
{ mc.m_mesh.Scale(vec3(1.0, 1.0, (yysemantic_stack_[(2) - (2)].args).f0)); }
break;

case 32:


Loading…
取消
儲存