Ignore:
Timestamp:
05/06/14 12:39:51 (11 years ago)
Author:
epyon
Message:
  • animated_mesh, scene_node, camera and transform classes added
  • order in mesh hierarchies
  • simplified and generified animation class hierarchy
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gfx/skeletal_mesh.cc

    r227 r230  
    1111
    1212
    13 nv::skeletal_mesh::skeletal_mesh( context* a_context, program* a_program, md5_loader* a_loader )
    14         : m_context( a_context )
    15         , m_program( a_program )
    16         , m_va( nullptr )
     13nv::skeletal_mesh::skeletal_mesh( context* a_context, md5_loader* a_loader )
     14        : animated_mesh( a_context )
    1715        , m_data( a_loader )
    1816        , m_animation( nullptr )
     
    3836        if ( m_animation ) m_animation->reset_animation();
    3937        m_animation = a_anim;
     38        // TODO : INSTANCE!
    4039        m_animation->reset_animation();
    4140}
     
    6463}
    6564
    66 void nv::skeletal_mesh::draw( render_state& rstate )
    67 {
    68         m_context->draw( nv::TRIANGLES, rstate, m_program, m_va, m_data->get_index_count(0) );
    69 }
    70 
    7165nv::skeletal_mesh::~skeletal_mesh()
    7266{
    7367        delete m_va;
    7468}
     69
     70void nv::skeletal_mesh::run_animation( animation_entry* a_anim )
     71{
     72        skeletal_animation_entry * anim = down_cast<skeletal_animation_entry>(a_anim);
     73        // TODO : INSTANCE!
     74        setup_animation( anim->m_animation );
     75}
Note: See TracChangeset for help on using the changeset viewer.