Ignore:
Timestamp:
Jul 10, 2012, 2:40:58 PM (7 years ago)
Author:
sam
Message:

easymesh: set the capsule's main axis to Y, not Z.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/easymesh/easymesh.cpp

    r1619 r1621  
    368368
    369369    /* Fill in the icosahedron vertices, rotating them so that there
    370      * is a vertex at [0 0 1] and [0 0 -1] after normalisation. */
     370     * is a vertex at [0 1 0] and [0 -1 0] after normalisation. */
    371371    float phi = 0.5f + 0.5f * sqrt(5.f);
    372372    mat3 mat = mat3::rotate(asin(1.f / sqrt(2.f + phi)) * (180.f / M_PI),
    373                             vec3(1.f, 0.f, 0.f));
     373                            vec3(0.f, 0.f, 1.f));
    374374    for (int i = 0; i < 4; i++)
    375375    {
     
    419419            {
    420420                for (int k = 0; k < 4; k++)
    421                     p[k].z += (p[k].z > 0.f) ? 0.5f * h : -0.5f * h;
     421                    p[k].y += (p[k].y > 0.f) ? 0.5f * h : -0.5f * h;
    422422            }
    423423
Note: See TracChangeset for help on using the changeset viewer.