AI_Vector.h

Go to the documentation of this file.
00001 #ifndef AI_VECTOR_H
00002 #define AI_VECTOR_H
00003 //------------------------------------------------------------------------------
00009 //#include "kernel/ntypes.h"
00010 
00011 #ifndef AI_USE_SSE
00012 // generic vector classes
00013 #include "AI_TVector2.h"
00014 #include "AI_TVector3.h"
00015 #include "AI_TVector4.h"
00016 typedef AI_TVector2 AI_Vector2;
00017 typedef AI_TVector3 AI_Vector3;
00018 typedef AI_TVector4 AI_Vector4;
00019 #else
00020 // sse vector classes
00021 #include "AI_TVector2.h"
00022 #include "AI_TVector3SSE.h"
00023 #include "AI_TVector4SSE.h"
00024 typedef AI_TVector2 AI_Vector2; 
00025 typedef AI_TVector3SSE AI_Vector3;
00026 typedef AI_TVector4SSE AI_Vector4;
00027 #endif
00028 
00029 //------------------------------------------------------------------------------
00032 template<>
00033 static inline
00034 void
00035 ai_lerp<AI_Vector2>(AI_Vector2 & result, const AI_Vector2 & val0, const AI_Vector2 & val1, float lerpVal)
00036 {
00037     result.lerp(val0, val1, lerpVal);
00038 }
00039 
00040 //------------------------------------------------------------------------------
00043 template<>
00044 static inline
00045 void
00046 ai_lerp<AI_Vector3>(AI_Vector3 & result, const AI_Vector3 & val0, const AI_Vector3 & val1, float lerpVal)
00047 {
00048     result.lerp(val0, val1, lerpVal);
00049 }
00050 
00051 //------------------------------------------------------------------------------
00054 template<>
00055 static inline
00056 void
00057 ai_lerp<AI_Vector4>(AI_Vector4 & result, const AI_Vector4 & val0, const AI_Vector4 & val1, float lerpVal)
00058 {
00059     result.lerp(val0, val1, lerpVal);
00060 }
00061 
00062 //------------------------------------------------------------------------------
00063 #endif