Ignore:
Timestamp:
07/31/15 20:25:22 (10 years ago)
Author:
epyon
Message:
  • math library work
  • glm only referenced in math/common.hh
  • still a lot work to do, but its WURF
File:
1 edited

Legend:

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

    r451 r454  
    134134                {
    135135                        vec3 v = assimp_vec3_cast( mesh->mVertices[i] );
    136                         vec3 n = glm::normalize( assimp_vec3_cast( mesh->mNormals[i] ) );
    137                         vec3 t = glm::normalize( assimp_vec3_cast( mesh->mTangents[i] ) );
    138                         vec3 b = glm::normalize( assimp_vec3_cast( mesh->mBitangents[i] ) );
     136                        vec3 n = math::normalize( assimp_vec3_cast( mesh->mNormals[i] ) );
     137                        vec3 t = math::normalize( assimp_vec3_cast( mesh->mTangents[i] ) );
     138                        vec3 b = math::normalize( assimp_vec3_cast( mesh->mBitangents[i] ) );
    139139                        vec2 s = assimp_st_cast( mesh->mTextureCoords[0][i] );
    140140
    141                         vec3 t_i = glm::normalize( t - n * glm::dot( n, t ) );
    142                         float det = ( glm::dot( glm::cross( n, t ), b ) );
     141                        vec3 t_i = math::normalize( t - n * math::dot( n, t ) );
     142                        float det = ( math::dot( math::cross( n, t ), b ) );
    143143                        det = ( det < 0.0f ? -1.0f : 1.0f );
    144144                        nv::vec4 vt( t_i[0], t_i[1], t_i[2], det );
     
    441441//      {
    442442//              vec3 scale_vec0 = assimp_vec3_cast( node->mScalingKeys[0].mValue );
    443 //              float scale_value   = glm::length( math::abs( scale_vec0 - vec3(1,1,1) ) );
     443//              float scale_value   = math::length( math::abs( scale_vec0 - vec3(1,1,1) ) );
    444444//              if ( node->mNumScalingKeys > 1 || scale_value > 0.001 )
    445445//              {
Note: See TracChangeset for help on using the changeset viewer.