Changeset 1835


Ignore:
Timestamp:
Aug 29, 2012, 11:40:23 PM (7 years ago)
Author:
sam
Message:

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

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/easymesh/easymesh-parser.y

    r1619 r1835  
    128128  | T_TAPERY args3      { mc.m_mesh.TaperY($2.f0, $2.f1, $2.f2); }
    129129  | T_TAPERZ args3      { mc.m_mesh.TaperZ($2.f0, $2.f1, $2.f2); }
    130   | T_SCALEX args1      { mc.m_mesh.Scale(vec3($2.f0, 0, 0)); }
    131   | T_SCALEY args1      { mc.m_mesh.Scale(vec3(0, $2.f0, 0)); }
    132   | T_SCALEZ args1      { mc.m_mesh.Scale(vec3(0, 0, $2.f0)); }
     130  | T_SCALEX args1      { mc.m_mesh.Scale(vec3($2.f0, 1.0, 1.0)); }
     131  | T_SCALEY args1      { mc.m_mesh.Scale(vec3(1.0, $2.f0, 1.0)); }
     132  | T_SCALEZ args1      { mc.m_mesh.Scale(vec3(1.0, 1.0, $2.f0)); }
    133133  | T_SCALE args3       { mc.m_mesh.Scale(vec3($2.f0, $2.f1, $2.f2)); }
    134134  | T_MIRRORX           { mc.m_mesh.MirrorX(); }
  • trunk/src/generated/easymesh-parser.cpp

    r1619 r1835  
    591591/* Line 690 of lalr1.cc  */
    592592#line 130 "easymesh/easymesh-parser.y"
    593     { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 0, 0)); }
     593    { mc.m_mesh.Scale(vec3((yysemantic_stack_[(2) - (2)].args).f0, 1.0, 1.0)); }
    594594    break;
    595595
     
    598598/* Line 690 of lalr1.cc  */
    599599#line 131 "easymesh/easymesh-parser.y"
    600     { mc.m_mesh.Scale(vec3(0, (yysemantic_stack_[(2) - (2)].args).f0, 0)); }
     600    { mc.m_mesh.Scale(vec3(1.0, (yysemantic_stack_[(2) - (2)].args).f0, 1.0)); }
    601601    break;
    602602
     
    605605/* Line 690 of lalr1.cc  */
    606606#line 132 "easymesh/easymesh-parser.y"
    607     { mc.m_mesh.Scale(vec3(0, 0, (yysemantic_stack_[(2) - (2)].args).f0)); }
     607    { mc.m_mesh.Scale(vec3(1.0, 1.0, (yysemantic_stack_[(2) - (2)].args).f0)); }
    608608    break;
    609609
Note: See TracChangeset for help on using the changeset viewer.