Ignore:
Timestamp:
11/03/15 19:06:23 (10 years ago)
Author:
epyon
Message:
  • cleanup of legacy code
  • resource updates
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gfx/skeleton_instance.cc

    r477 r480  
    66
    77#include "nv/gfx/skeleton_instance.hh"
     8
     9#include "nv/core/profiler.hh"
    810
    911void nv::skeleton_binding::prepare( const mesh_nodes_data* node_data, const mesh_nodes_data* bone_data )
     
    6264                        for ( uint32 n = 0; n < node_data->size(); ++n )
    6365                                if ( ( *node_data )[n]->get_parent_id() == -1 )
    64                                         animate_rec( node_data, binding, frame, n, mat4() );
     66                                        animate_rec( node_data, binding, frame, n, transform() );
    6567                }
    6668        }
    6769}
    6870
    69 void nv::skeleton_instance::animate_rec( const mesh_nodes_data* node_data, const skeleton_binding& binding, float frame, uint32 id, const mat4& parent )
     71void nv::skeleton_instance::animate_rec( const mesh_nodes_data* node_data, const skeleton_binding& binding, float frame, uint32 id, const transform& parent )
    7072{
    7173        // TODO: fix transforms, which are now embedded,
    7274        //       see note in assimp_loader.cc:load_node
    7375        const data_channel_set* node = ( *node_data )[id];
    74         mat4 node_mat( node->get_transform() );
     76        transform node_mat( node->get_transform() );
    7577
    7678        if ( node->size() > 0 )
    7779        {
    7880                raw_channel_interpolator interpolator( node, binding.m_key );
    79                 node_mat = interpolator.get< mat4 >( frame );
     81                node_mat = interpolator.get< transform >( frame );
    8082        }
    8183
    82         mat4 global_mat = parent * node_mat;
     84        transform global_mat = parent * node_mat;
    8385
    8486        sint16 bone_id = binding.m_indices[id];
    8587        if ( bone_id >= 0 )
    8688        {
    87                 m_transform[bone_id] = global_mat * binding.m_offsets[bone_id];
     89                m_transform[bone_id] = global_mat.extract() * binding.m_offsets[bone_id];
    8890        }
    8991
Note: See TracChangeset for help on using the changeset viewer.