Ignore:
Timestamp:
07/10/14 00:29:34 (11 years ago)
Author:
epyon
Message:
  • key_slots - another template hell similar to vertex definitions
  • animation data is now stored using key_raw_channel's similarly to mesh_raw_channels
  • automatic compile-time templated interpolation generation for any type of animation key
  • QUAT and TRANSFORM as registered types for channels
  • a ton of minor cleanups
  • do not open vertex.hh if you want to stay sane
File:
1 edited

Legend:

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

    r280 r282  
    397397                                remove_quotes( joint.name );
    398398                                joint_infos.push_back( joint );
    399                                 m_joints.push_back( md5_joint( joint.parent_id, m_num_frames ) );
     399                                m_joints.emplace_back( joint.parent_id );
    400400                                next_line( sstream );
    401401                        }
     
    490490        for ( size_t i = 0; i < m_num_joints; ++i )
    491491        {
    492                 const transform_vector& keys = m_joints[i].keys;
    493                 skeleton[i] = interpolate( keys.get(frame0), keys.get(frame1), interpolation );
     492                const std::vector< transform >& keys = m_joints[i].keys;
     493                skeleton[i] = interpolate( keys[frame0], keys[frame1], interpolation );
    494494        }
    495495}
     
    519519                if ( parent_id >= 0 ) // Has a parent joint
    520520                {
    521                         const transform_vector& ptv = m_joints[ size_t( parent_id ) ].keys;
     521                        const std::vector< transform >& ptv = m_joints[ size_t( parent_id ) ].keys;
    522522                        transform ptr;
    523                         if ( ptv.size() > index ) ptr = ptv.get( index );
     523                        if ( ptv.size() > index ) ptr = ptv[ index ];
    524524                        glm::vec3 rot_pos = ptr.get_orientation() * pos;
    525525
     
    530530                }
    531531
    532                 m_joints[i].keys.insert( transform( pos, orient ) );
     532                m_joints[i].keys.push_back( transform( pos, orient ) );
    533533        }
    534534}
Note: See TracChangeset for help on using the changeset viewer.