Changeset 451 for trunk/src/formats


Ignore:
Timestamp:
07/30/15 19:47:02 (10 years ago)
Author:
epyon
Message:
  • math library started
Location:
trunk/src/formats
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/formats/assimp_loader.cc

    r432 r451  
    139139                        vec2 s = assimp_st_cast( mesh->mTextureCoords[0][i] );
    140140
    141                         glm::vec3 t_i = glm::normalize( t - n * glm::dot( n, t ) );
     141                        vec3 t_i = glm::normalize( t - n * glm::dot( n, t ) );
    142142                        float det = ( glm::dot( glm::cross( n, t ), b ) );
    143143                        det = ( det < 0.0f ? -1.0f : 1.0f );
     
    440440//      if ( node->mNumScalingKeys > 0 )
    441441//      {
    442 //              nv::vec3 scale_vec0 = assimp_vec3_cast( node->mScalingKeys[0].mValue );
    443 //              float scale_value   = glm::length( glm::abs( scale_vec0 - nv::vec3(1,1,1) ) );
     442//              vec3 scale_vec0 = assimp_vec3_cast( node->mScalingKeys[0].mValue );
     443//              float scale_value   = glm::length( math::abs( scale_vec0 - vec3(1,1,1) ) );
    444444//              if ( node->mNumScalingKeys > 1 || scale_value > 0.001 )
    445445//              {
  • trunk/src/formats/md3_loader.cc

    r431 r451  
    240240        if ( !s_normal_ready )
    241241        {
    242                 float pi      = glm::pi<float>();
     242                float pi      = math::pi<float>();
    243243                float convert = (2 * pi) / 255.0f;
    244244                int n = 0;
     
    246246                {
    247247                        float flat    = lat * convert;
    248                         float sin_lat = glm::sin( flat );
    249                         float cos_lat = glm::cos( flat );
     248                        float sin_lat = math::sin( flat );
     249                        float cos_lat = math::cos( flat );
    250250                        for ( int lng = 0; lng < 256; ++lng, ++n )
    251251                        {
    252252                                float flng    = lng * convert;
    253                                 float sin_lng = glm::sin( flng );
    254                                 float cos_lng = glm::cos( flng );
     253                                float sin_lng = math::sin( flng );
     254                                float cos_lng = math::cos( flng );
    255255                                s_normal_cache[n].x = cos_lat * sin_lng;
    256256//                              s_normal_cache[n].y = sin_lat * sin_lng;
Note: See TracChangeset for help on using the changeset viewer.