Ignore:
Timestamp:
06/13/15 11:20:22 (10 years ago)
Author:
epyon
Message:
  • cleanup of glm usage
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/core/transform.hh

    r397 r398  
    2626                void set_orientation( const quat& a_orientation ) { m_orientation = a_orientation; }
    2727                void set_orientation( float radians, const vec3& axis )
    28                 { // use glm::radians if degrees!
     28                { // use math::radians if degrees!
    2929                        m_orientation = glm::angleAxis( radians, axis );
    3030                }
     
    4343                }
    4444//              void rotate( const vec3& axis, f32 angle )
    45 //              { // use glm::radians if degrees!
     45//              { // use math::radians if degrees!
    4646//                      quat temp( angle, axis );
    4747//                      m_orientation = temp * m_orientation;
     
    5454                mat4 extract() const
    5555                {
    56                         mat4 result = glm::mat4_cast( m_orientation );
     56                        mat4 result = mat4_cast( m_orientation );
    5757                        result[3] = vec4( m_position, 1.0f );
    5858                        return result;
     
    6262                        quat new_orient( glm::inverse( m_orientation ) );
    6363                        // TODO: simplify
    64                         return transform( -glm::mat3_cast(new_orient) * m_position, new_orient );
     64                        return transform( -mat3_cast(new_orient) * m_position, new_orient );
    6565                }
    6666
     
    100100                return transform(
    101101                        glm::mix  ( a.get_position(), b.get_position(), value ),
    102                         glm::slerp( a.get_orientation(), b.get_orientation(), value ) 
     102                        glm::slerp( a.get_orientation(), b.get_orientation(), value )
    103103                );
    104104        }
Note: See TracChangeset for help on using the changeset viewer.