Ignore:
Timestamp:
11/03/15 19:06:23 (10 years ago)
Author:
epyon
Message:
  • cleanup of legacy code
  • resource updates
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/legacy/skeletal_mesh.cc

    r479 r480  
    1212
    1313#include "nv/core/logging.hh"
    14 
     14#if 0
    1515void nv::skeletal_animation_entry::update_skeleton( skeleton_instance& data, uint32 a_ms_time ) const
    1616{
     
    3939        m_data.prepare( m_temp_anim, bones ? bones : m_temp_anim );
    4040}
    41 
    42 nv::skeletal_mesh::skeletal_mesh( context* a_context, const data_channel_set* a_mesh, const mesh_nodes_data* a_bone_data )
    43         : m_skeleton( a_bone_data ? a_bone_data->size() : 0 ), m_context( a_context ), m_bone_data( a_bone_data ), m_index_count( 0 ), m_parent_id(-1)
    44 {
    45         if ( a_mesh )
    46         {
    47                 m_va = a_context->create_vertex_array( a_mesh, nv::STATIC_DRAW );
    48                 m_index_count = a_mesh->get_channel_size( slot::INDEX );
    49                 m_parent_id = a_mesh->get_parent_id();
    50         }
    51 }
    52 
    53 void nv::skeletal_mesh::update_animation( animation_entry& a_anim, uint32 a_anim_time )
    54 {
    55         skeletal_animation_entry& anim = static_cast<skeletal_animation_entry&>( a_anim );
    56         anim.prepare( m_bone_data );
    57         anim.update_skeleton( m_skeleton, a_anim_time );
    58 }
    59 
    60 void nv::skeletal_mesh::update_program( program a_program )
    61 {
    62         m_context->get_device()->set_opt_uniform_array( a_program, "nv_m_bones", m_skeleton.transforms(), m_skeleton.size() );
    63 }
    64 
    65 nv::transform nv::skeletal_mesh::get_node_transform( uint32 node_id ) const
    66 {
    67         return transform( get_node_matrix( node_id ) );
    68 }
    69 
    70 nv::mat4 nv::skeletal_mesh::get_node_matrix( uint32 node_id ) const
    71 {
    72         return m_skeleton.transforms()[ node_id ];
    73 }
     41#endif
Note: See TracChangeset for help on using the changeset viewer.