Last change
on this file since 533 was
480,
checked in by epyon, 10 years ago
|
- cleanup of legacy code
- resource updates
|
File size:
1.1 KB
|
Line | |
---|
1 | // Copyright (C) 2011-2015 ChaosForge Ltd
|
---|
2 | // http://chaosforge.org/
|
---|
3 | //
|
---|
4 | // This file is part of Nova libraries.
|
---|
5 | // For conditions of distribution and use, see copying.txt file in root folder.
|
---|
6 |
|
---|
7 | #include "nv/gfx/skeletal_mesh.hh"
|
---|
8 |
|
---|
9 | #include "nv/interface/context.hh"
|
---|
10 | #include "nv/interface/device.hh"
|
---|
11 | #include "nv/stl/unordered_map.hh"
|
---|
12 |
|
---|
13 | #include "nv/core/logging.hh"
|
---|
14 | #if 0
|
---|
15 | void nv::skeletal_animation_entry::update_skeleton( skeleton_instance& data, uint32 a_ms_time ) const
|
---|
16 | {
|
---|
17 | float fframe = ( a_ms_time * 0.001f ) * m_fps;
|
---|
18 | float nframe = nv::floor( fframe );
|
---|
19 | uint32 duration = get_frame_count();
|
---|
20 | if ( duration == 0 )
|
---|
21 | {
|
---|
22 | fframe = static_cast<float>( get_start_frame() );
|
---|
23 | }
|
---|
24 | else if ( nframe >= duration )
|
---|
25 | {
|
---|
26 | if ( is_looping() )
|
---|
27 | fframe = nv::fmodf( fframe, nv::f32( duration ) );
|
---|
28 | else
|
---|
29 | fframe = static_cast<float>( get_end_frame() );
|
---|
30 | }
|
---|
31 |
|
---|
32 | if ( data.size() == 0 )
|
---|
33 | data.initialize( m_temp_anim->size() );
|
---|
34 | data.animate( m_temp_anim, m_data, fframe );
|
---|
35 | }
|
---|
36 |
|
---|
37 | void nv::skeletal_animation_entry::prepare( const mesh_nodes_data* bones )
|
---|
38 | {
|
---|
39 | m_data.prepare( m_temp_anim, bones ? bones : m_temp_anim );
|
---|
40 | }
|
---|
41 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.