Ignore:
Timestamp:
07/23/14 15:24:03 (11 years ago)
Author:
epyon
Message:
  • mesh_data_pack's in every format
  • md5_mesh_data removed, uses standard mesh_data
  • BONE_ARRAY in NMD is now a simple set of animation nodes
  • bone and animation node concepts merged
  • several minor changes
File:
1 edited

Legend:

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

    r285 r287  
    1515using namespace nv;
    1616
    17 nv::keyframed_mesh::keyframed_mesh( device* a_device, mesh_data* a_data, tag_map* a_tag_map )
     17nv::keyframed_mesh::keyframed_mesh( device* a_device, const mesh_data* a_data, const mesh_nodes_data* a_tag_map )
    1818        : animated_mesh()
    1919        , m_mesh_data( a_data )
     
    4040}
    4141
    42 transform keyframed_mesh::get_tag( uint32 tag ) const
     42transform keyframed_mesh::get_node_transform( uint32 node_id ) const
    4343{
    4444        NV_ASSERT( m_tag_map, "TAGMAP FAIL" );
    45         const key_data* data = m_tag_map->get_tag( tag );
     45        NV_ASSERT( node_id < m_tag_map->get_count(), "TAGMAP FAIL" );
     46        const key_data* data = m_tag_map->get_node( node_id )->data;
    4647        NV_ASSERT( data, "TAG FAIL" );
    4748        transform last = data->get_raw_transform( m_last_frame );
    4849        transform next = data->get_raw_transform( m_next_frame );
    4950        return interpolate( last, next, m_interpolation  );
     51}
     52
     53mat4 keyframed_mesh::get_node_matrix( uint32 node_id ) const
     54{
     55        return get_node_transform( node_id ).extract();
    5056}
    5157
     
    125131}
    126132
    127 nv::keyframed_mesh_gpu::keyframed_mesh_gpu( device* a_device, mesh_data* a_data, tag_map* a_tag_map, program* a_program )
     133nv::keyframed_mesh_gpu::keyframed_mesh_gpu( device* a_device, const mesh_data* a_data, const mesh_nodes_data* a_tag_map, program* a_program )
    128134        : keyframed_mesh( a_device, a_data, a_tag_map )
    129135        , m_loc_next_position( 0 )
     
    159165}
    160166
    161 nv::keyframed_mesh_cpu::keyframed_mesh_cpu( device* a_device, mesh_data* a_data, tag_map* a_tag_map )
     167nv::keyframed_mesh_cpu::keyframed_mesh_cpu( device* a_device, const mesh_data* a_data, const mesh_nodes_data* a_tag_map )
    162168        : keyframed_mesh( a_device, a_data, a_tag_map )
    163169{
Note: See TracChangeset for help on using the changeset viewer.