Changeset 287 for trunk/src/gfx/keyframed_mesh.cc
- Timestamp:
- 07/23/14 15:24:03 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gfx/keyframed_mesh.cc
r285 r287 15 15 using namespace nv; 16 16 17 nv::keyframed_mesh::keyframed_mesh( device* a_device, mesh_data* a_data, tag_map* a_tag_map )17 nv::keyframed_mesh::keyframed_mesh( device* a_device, const mesh_data* a_data, const mesh_nodes_data* a_tag_map ) 18 18 : animated_mesh() 19 19 , m_mesh_data( a_data ) … … 40 40 } 41 41 42 transform keyframed_mesh::get_ tag( uint32 tag) const42 transform keyframed_mesh::get_node_transform( uint32 node_id ) const 43 43 { 44 44 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; 46 47 NV_ASSERT( data, "TAG FAIL" ); 47 48 transform last = data->get_raw_transform( m_last_frame ); 48 49 transform next = data->get_raw_transform( m_next_frame ); 49 50 return interpolate( last, next, m_interpolation ); 51 } 52 53 mat4 keyframed_mesh::get_node_matrix( uint32 node_id ) const 54 { 55 return get_node_transform( node_id ).extract(); 50 56 } 51 57 … … 125 131 } 126 132 127 nv::keyframed_mesh_gpu::keyframed_mesh_gpu( device* a_device, mesh_data* a_data, tag_map* a_tag_map, program* a_program )133 nv::keyframed_mesh_gpu::keyframed_mesh_gpu( device* a_device, const mesh_data* a_data, const mesh_nodes_data* a_tag_map, program* a_program ) 128 134 : keyframed_mesh( a_device, a_data, a_tag_map ) 129 135 , m_loc_next_position( 0 ) … … 159 165 } 160 166 161 nv::keyframed_mesh_cpu::keyframed_mesh_cpu( device* a_device, mesh_data* a_data, tag_map* a_tag_map )167 nv::keyframed_mesh_cpu::keyframed_mesh_cpu( device* a_device, const mesh_data* a_data, const mesh_nodes_data* a_tag_map ) 162 168 : keyframed_mesh( a_device, a_data, a_tag_map ) 163 169 {
Note: See TracChangeset
for help on using the changeset viewer.