Changeset 1719


Ignore:
Timestamp:
Aug 12, 2012, 4:41:16 PM (11 years ago)
Author:
sam
Message:

easymesh: fix the non-uniform sphere scaling and enforce odd numbers
of capsule divisions.

File:
1 edited

Legend:

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

    r1621 r1719  
    367367    Array<vec3> vertices;
    368368
     369    /* FIXME: we don't know how to handle even-divided capsules, so we
     370     * force the count to be odd. */
     371    if (h)
     372        ndivisions |= 1;
     373
    369374    /* Fill in the icosahedron vertices, rotating them so that there
    370375     * is a vertex at [0 1 0] and [0 -1 0] after normalisation. */
     
    454459void EasyMesh::AppendSphere(int ndivisions, vec3 const &size)
    455460{
    456     AppendCapsule(ndivisions, 0.f, size.x);
     461    OpenBrace();
     462    AppendCapsule(ndivisions, 0.f, 1.f);
     463    Scale(size);
     464    CloseBrace();
    457465}
    458466
Note: See TracChangeset for help on using the changeset viewer.