?? xvectorfunc.inl
字號:
#ifndef __XVECTOR_FUNC_INLINE_INCLUDE__
#define __XVECTOR_FUNC_INLINE_INCLUDE__
#ifndef IN_MATHLIB_NAMESPACE
#error You cann't include this file out the XMathLib namespace
#endif
__FORCE_INLINE__ void _MATH_LIB_EXPORT_ XM_Add(XVector2D& v1,XVector2D& v2,XVector2D& vOut)
{
vOut.x = v1.x + v2.x;
vOut.y = v1.y + v2.y;
}
__FORCE_INLINE__ void _MATH_LIB_EXPORT_ XM_Sub(XVector2D& v1,XVector2D& v2,XVector2D& vOut)
{
vOut.x = v1.x - v2.x;
vOut.y = v1.y - v2.y;
}
__FORCE_INLINE__ void _MATH_LIB_EXPORT_ XM_Add(XVector3D& v1,XVector3D& v2,XVector3D& vOut)
{
vOut.x = v1.x + v2.x;
vOut.y = v1.y + v2.y;
vOut.z = v1.z + v2.z;
}
__FORCE_INLINE__ void _MATH_LIB_EXPORT_ XM_Sub(XVector3D& v1,XVector3D& v2,XVector3D& vOut)
{
vOut.x = v1.x - v2.x;
vOut.y = v1.y - v2.y;
vOut.z = v1.z - v2.z;
}
__FORCE_INLINE__ void _MATH_LIB_EXPORT_ XM_CP(XVector3D& a,XVector3D& b,XVector3D& vOut)
{
vOut.x = a.y * b.z - b.y * a.z;
vOut.y = a.z * b.x - b.z * a.x;
vOut.z = a.x * b.y - b.x * a.y;
}
__FORCE_INLINE__ void _MATH_LIB_EXPORT_ XM_Add(XVector& a, XVector& b, XVector& vOut)
{
vOut.x = a.x + b.x;
vOut.y = a.y + b.y;
vOut.z = a.z + b.z;
vOut.w = 1;
}
__FORCE_INLINE__ void _MATH_LIB_EXPORT_ XM_Sub(XVector& a, XVector& b, XVector& vOut)
{
vOut.x = a.x - b.x;
vOut.y = a.y - b.y;
vOut.z = a.z - b.z;
vOut.w = 1;
}
__FORCE_INLINE__ void _MATH_LIB_EXPORT_ XM_CP(XVector& a,XVector& b,XVector& vOut)
{
vOut.x = a.y * b.z - b.y * a.z;
vOut.y = a.z * b.x - b.z * a.x;
vOut.z = a.x * b.y - b.x * a.y;
vOut.w = 1;
}
__FORCE_INLINE__ void _MATH_LIB_EXPORT_ XM_Mul(XVector& a, float s, XVector& vOut)
{
vOut.x = a.x * s;
vOut.y = a.y * s;
vOut.z = a.z * s;
}
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -