Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lerp.h
Go to the documentation of this file.
1 #ifndef _GFX_LERP_H_
2 #define _GFX_LERP_H_
3 
4 #include <assert.h>
5 #include "vec.h"
6 #include "quaternion.h"
7 
8 //Interpolates A and B, but does not cap the interpolation to less than 1.0
10 
11 //Interpolates between the transformations A and B. Caps the blending factor at 1.0, but not at 0.0
12 inline Transformation linear_interpolate( const Transformation &a, const Transformation &b, double blend )
13 {
14  return linear_interpolate_uncapped( a, b, ( (blend > 1.0) ? 1.0 : blend ) );
15 }
16 
17 #endif
18