llv4vector3.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLV4VECTOR3_H
00033 #define LL_LLV4VECTOR3_H
00034 
00035 #include "llv4math.h"
00036 
00037 //-----------------------------------------------------------------------------
00038 //-----------------------------------------------------------------------------
00039 // LLV4Vector3
00040 //-----------------------------------------------------------------------------
00041 //-----------------------------------------------------------------------------
00042 
00043 LL_LLV4MATH_ALIGN_PREFIX
00044 
00045 class LLV4Vector3
00046 {
00047 public:
00048         union {
00049                 F32             mV[LLV4_NUM_AXIS];
00050                 V4F32   v;
00051         };
00052 
00053         enum {
00054                 ALIGNMENT = 16
00055                 };
00056 
00057         void                            setVec(F32 x, F32 y, F32 z);
00058         void                            setVec(F32 a);
00059 }
00060 
00061 LL_LLV4MATH_ALIGN_POSTFIX;
00062 
00063 //-----------------------------------------------------------------------------
00064 //-----------------------------------------------------------------------------
00065 // LLV4Vector3
00066 //-----------------------------------------------------------------------------
00067 //-----------------------------------------------------------------------------
00068 
00069 inline void     LLV4Vector3::setVec(F32 x, F32 y, F32 z)
00070 {
00071         mV[VX] = x;
00072         mV[VY] = y;
00073         mV[VZ] = z;
00074 }
00075 
00076 inline void     LLV4Vector3::setVec(F32 a)
00077 {
00078 #if LL_VECTORIZE
00079         v = _mm_set1_ps(a);
00080 #else
00081         setVec(a, a, a);
00082 #endif
00083 }
00084 
00085 #endif

Generated on Thu Jul 1 06:09:25 2010 for Second Life Viewer by  doxygen 1.4.7