Changeset 532 for trunk/src


Ignore:
Timestamp:
01/09/17 17:49:22 (8 years ago)
Author:
epyon
Message:
  • minor date swap and initial size_t removal
Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine/particle_engine.cc

    r529 r532  
    196196        datap->plane_normal = normalize_safe( datap->plane_normal, vec3(0.0f,1.0f,0.0f) );
    197197        datap->bounce       = table->get<float>("bounce", 0.0f );
    198         datap->distance     = -math::dot( datap->plane_normal, datap->plane_point ) / sqrt( math::dot( datap->plane_normal, datap->plane_normal ) );
     198        datap->distance     = -math::dot( datap->plane_normal, datap->plane_point ) / math::sqrt( math::dot( datap->plane_normal, datap->plane_normal ) );
    199199        return true;
    200200}
  • trunk/src/gfx/mesh_creator.cc

    r526 r532  
    2525                                && old_keys->get_channel(0)->descriptor()[0].etype == TRANSFORM ) continue;
    2626
    27                         size_t max_keys = 0;
    28                         for ( size_t c = 0; c < chan_count; ++c )
     27                        uint32 max_keys = 0;
     28                        for ( uint32 c = 0; c < chan_count; ++c )
    2929                        {
    3030                                max_keys = nv::max( max_keys, old_keys->get_channel(c)->size() );
     
    4545                                for ( uint16 c = 0; c < chan_count; ++c )
    4646                                {
    47                                         size_t idx = nv::min( old_keys->get_channel_size(c) - 1, n );
     47                                        uint32 idx = nv::min( old_keys->get_channel_size(c) - 1, n );
    4848                                        pkey += raw_channel_interpolator::get_raw( *old_keys->get_channel(c), idx, pkey );
    4949                                }
     
    6666        for ( auto node : m_data->m_data )
    6767        {
    68                 for ( size_t c = 0; c < node->size(); ++c )
     68                for ( uint32 c = 0; c < node->size(); ++c )
    6969                {
    7070                        raw_data_channel_access channel( node, c );
    71                         size_t key_size = channel.element_size();
    72                         for ( size_t n = 0; n < channel.size(); ++n )
     71                        uint32 key_size = channel.element_size();
     72                        for ( uint32 n = 0; n < channel.size(); ++n )
    7373                        {
    7474                                transform_key_raw( node->get_channel( c )->descriptor(), channel.raw_data() + n * key_size, scale, r33, ri33 );
     
    568568        int och_ti = other->get_channel_index( slot::TEXCOORD );
    569569        if ( ch_pi == -1 || ch_ti == -1 ) return;
    570         size_t size   = m_data->get_channel_size( unsigned(ch_ti) );
    571         size_t osize  =  other->get_channel_size( unsigned(och_ti) );
    572         size_t count  = m_data->get_channel_size( unsigned(ch_pi) );
    573         size_t ocount =  other->get_channel_size( unsigned(och_pi) );
     570        uint32 size   = m_data->get_channel_size( unsigned(ch_ti) );
     571        uint32 osize  =  other->get_channel_size( unsigned(och_ti) );
     572        uint32 count  = m_data->get_channel_size( unsigned(ch_pi) );
     573        uint32 ocount =  other->get_channel_size( unsigned(och_pi) );
    574574        if ( count % size != 0 || ocount % osize != 0 ) return;
    575575        if ( count / size != ocount / osize ) return;
     
    583583                data_descriptor old_desc = old->descriptor();
    584584                bool old_is_index = old_size > 0 && old_desc[0].vslot == slot::INDEX;
    585                 size_t frame_count = ( old_is_index ? 1 : old_size / size );
     585                uint32 frame_count = ( old_is_index ? 1 : old_size / size );
    586586                data.set_channel( c, append_channels( *old, *other->get_channel(c), frame_count ) );
    587587                if ( old_is_index )
Note: See TracChangeset for help on using the changeset viewer.