Changeset 288 for trunk/src/gfx/skeletal_mesh.cc
- Timestamp:
- 07/23/14 17:37:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gfx/skeletal_mesh.cc
r287 r288 33 33 skeletal_animation_entry * anim = (skeletal_animation_entry*)a_anim; 34 34 float frame_duration = 1000.f / (float)anim->get_frame_rate(); 35 uint32 anim_duration = uint32( frame_duration * (float)anim->get_frame_count());36 uint32 new_time = a_anim_time % anim_duration;37 anim->update_skeleton( m_transform.data(), (float)new_time * 0.001f );35 float anim_duration = frame_duration * anim->get_duration(); 36 float new_time = fmodf( (float)a_anim_time, anim_duration ); 37 anim->update_skeleton( m_transform.data(), new_time * 0.001f ); 38 38 39 39 //m_mesh_data->apply( m_transform.data() ); … … 87 87 } 88 88 89 90 nv::skeletal_animation_entry_gpu::skeletal_animation_entry_gpu( const std::string& name, const mesh_nodes_data* anim, bool a_looping ) 91 : animation_entry( name ) 92 , m_node_data( anim ) 93 { 94 uint32 node_count = m_node_data->get_count(); 95 89 void nv::skeletal_animation_entry_gpu::initialize() 90 { 96 91 m_prepared = false; 97 m_looping = a_looping;98 92 m_children = nullptr; 99 93 m_offsets = nullptr; 94 uint32 node_count = m_node_data->get_count(); 100 95 m_bone_ids = new sint16[ node_count ]; 101 96
Note: See TracChangeset
for help on using the changeset viewer.