Changeset 1621


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

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

Location:
trunk
Files:
2 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
  • trunk/test/PhysicObject.h

    r1613 r1621  
    7575                int CapsLimit = MeshRand.Count();
    7676
    77                 MeshRand << "[sc#add scb#add asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";
    78                 MeshRand << "[sc#dad scb#dad asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";
    79                 MeshRand << "[sc#dda scb#dda asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";
    80                 MeshRand << "[sc#daa scb#daa asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";
    81                 MeshRand << "[sc#ada scb#ada asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";
    82                 MeshRand << "[sc#aad scb#aad asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";
     77                MeshRand << "[sc#add scb#add acap3 2 1]";
     78                MeshRand << "[sc#dad scb#dad acap3 2 1]";
     79                MeshRand << "[sc#dda scb#dda acap3 2 1]";
     80                MeshRand << "[sc#daa scb#daa acap3 2 1]";
     81                MeshRand << "[sc#ada scb#ada acap3 2 1]";
     82                MeshRand << "[sc#aad scb#aad acap3 2 1]";
    8383
    8484                int RandValue = (int)(lol::RandF() * (MeshRand.Count() - 1));
Note: See TracChangeset for help on using the changeset viewer.