// Copyright (C) 2011-2015 ChaosForge Ltd // http://chaosforge.org/ // // This file is part of Nova libraries. // For conditions of distribution and use, see copying.txt file in root folder. #include "nv/gfx/skeletal_mesh.hh" #include "nv/interface/context.hh" #include "nv/interface/device.hh" #include "nv/stl/unordered_map.hh" #include "nv/core/logging.hh" #if 0 void nv::skeletal_animation_entry::update_skeleton( skeleton_instance& data, uint32 a_ms_time ) const { float fframe = ( a_ms_time * 0.001f ) * m_fps; float nframe = nv::floor( fframe ); uint32 duration = get_frame_count(); if ( duration == 0 ) { fframe = static_cast( get_start_frame() ); } else if ( nframe >= duration ) { if ( is_looping() ) fframe = nv::fmodf( fframe, nv::f32( duration ) ); else fframe = static_cast( get_end_frame() ); } if ( data.size() == 0 ) data.initialize( m_temp_anim->size() ); data.animate( m_temp_anim, m_data, fframe ); } void nv::skeletal_animation_entry::prepare( const mesh_nodes_data* bones ) { m_data.prepare( m_temp_anim, bones ? bones : m_temp_anim ); } #endif