InterpolateAxisYToAxis_Nlerp implemented

This commit is contained in:
Dander7BD 2014-01-21 10:32:44 +01:00
parent 748023bf9e
commit 7087421bb9
1 changed files with 15 additions and 0 deletions

View File

@ -726,6 +726,21 @@ namespace LinearAlgebra3D
template<typename ScalarType>
inline ::LinearAlgebra::Vector4<ScalarType> NormalProjection( const ::LinearAlgebra::Vector4<ScalarType> &vector, const ::LinearAlgebra::Vector4<ScalarType> &normalizedAxis )
{ return normalizedAxis * ( vector.Dot(normalizedAxis) ); }
template<typename ScalarType>
::LinearAlgebra::Matrix4x4<ScalarType> & SnapAxisYToAxis_Nlerp( ::LinearAlgebra::Matrix4x4<ScalarType> &rotation, const ::LinearAlgebra::Vector4<ScalarType> &normalizedAxis )
{
}
template<typename ScalarType>
::LinearAlgebra::Matrix4x4<ScalarType> & InterpolateAxisYToAxis_Nlerp( ::LinearAlgebra::Matrix4x4<ScalarType> &rotation, const ::LinearAlgebra::Vector4<ScalarType> &normalizedAxis, ScalarType t )
{
::LinearAlgebra::Vector4<ScalarType> interpolated = ::LinearAlgebra::Nlerp( rotation.v[1], normalizedAxis, t );
if( interpolated.Dot(interpolated) == 0 )
return rotation; // return no change
return SnapAxisYToAxis_Nlerp( rotation, interpolated );
}
}
#include "Utilities.h"