vector.h
Go to the documentation of this file.00001 #ifndef N_VECTOR_H
00002 #define N_VECTOR_H
00003
00009 #include "kernel/ntypes.h"
00010
00011 #ifndef __USE_SSE__
00012
00013 #include "mathlib/_vector2.h"
00014 #include "mathlib/_vector3.h"
00015 #include "mathlib/_vector4.h"
00016 typedef _vector2 vector2;
00017 typedef _vector3 vector3;
00018 typedef _vector4 vector4;
00019 #else
00020
00021 #include "mathlib/_vector2.h"
00022 #include "mathlib/_vector3_sse.h"
00023 #include "mathlib/_vector4_sse.h"
00024 typedef _vector2 vector2;
00025 typedef _vector3_sse vector3;
00026 typedef _vector4_sse vector4;
00027 #endif
00028
00029
00032 template<>
00033 static inline
00034 void
00035 lerp<vector2>(vector2 & result, const vector2 & val0, const vector2 & val1, float lerpVal)
00036 {
00037 result.lerp(val0, val1, lerpVal);
00038 }
00039
00040
00043 template<>
00044 static inline
00045 void
00046 lerp<vector3>(vector3 & result, const vector3 & val0, const vector3 & val1, float lerpVal)
00047 {
00048 result.lerp(val0, val1, lerpVal);
00049 }
00050
00051
00054 template<>
00055 static inline
00056 void
00057 lerp<vector4>(vector4 & result, const vector4 & val0, const vector4 & val1, float lerpVal)
00058 {
00059 result.lerp(val0, val1, lerpVal);
00060 }
00061
00062
00063 #endif