Ignore:
Timestamp:
Dec 19, 2012, 9:49:58 PM (7 years ago)
Author:
sam
Message:

easymesh: motherfucking planetary gears demo.

Location:
trunk/src/easymesh
Files:
2 edited

Legend:

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

    r2151 r2152  
    3838    /* Can't use uin32_t here for some reason */
    3939    unsigned u32val;
    40     struct { float f0, f1, f2, f3, f4, f5, f6, f7; } args;
     40    struct { float f0, f1, f2, f3, f4, f5, f6, f7, f8, f9; } args;
    4141}
    4242
     
    6161
    6262%type <fval> number
    63 %type <args> args1 args2 args3 args4 args5 args6 args7 args8
     63%type <args> args1 args2 args3 args4 args5 args6 args7 args8 args9 args10
    6464
    6565%{
     
    158158  | T_TRIANGLE args2       { mc.m_mesh.AppendSimpleTriangle($2.f0, (int)$2.f1); }
    159159  | T_QUAD args2           { mc.m_mesh.AppendSimpleQuad($2.f0, (int)$2.f1); }
    160   | T_COG args8            { mc.m_mesh.AppendCog((int)$2.f0, $2.f1,
    161                                  $2.f2 / 2, $2.f3 / 2, $2.f2, $2.f3, $2.f4,
    162                                  $2.f5, $2.f6, (int)$2.f7); }
     160  | T_COG args10           { mc.m_mesh.AppendCog((int)$2.f0, $2.f1,
     161                                 $2.f2, $2.f3, $2.f4, $2.f5, $2.f6,
     162                                 $2.f7, $2.f8, (int)$2.f9); }
    163163    ;
    164164
     
    171171args7: args6 number { $$ = $1; $$.f6 = $2; } ;
    172172args8: args7 number { $$ = $1; $$.f7 = $2; } ;
     173args9: args8 number { $$ = $1; $$.f8 = $2; } ;
     174args10: args9 number { $$ = $1; $$.f9 = $2; } ;
    173175
    174176number:
  • trunk/src/easymesh/easymesh.cpp

    r2151 r2152  
    792792    /* FIXME: enforce this some other way */
    793793    if (r12 < 0)
    794     {
    795         r10 *= 2.5;
    796         r20 *= 2.5;
    797794        h = -h;
    798     }
    799795
    800796    mat3 rotmat = mat3::rotate(180.0f / nbsides, 0.f, 1.f, 0.f);
Note: See TracChangeset for help on using the changeset viewer.