#define VEC3toSIMD(v1,v2) v2.fields.x=(v1).x; v2.fields.y=(v1).y; v2.fields.z=(v1).z;
#define VEC4toSIMD(v1,v2) v2.fields.x=(v1).x; v2.fields.y=(v1).y; v2.fields.z=(v1).z; v2.fields.w=(v1).w;
#define COPYVEC3(v1,v2) (v2)->x=(v1)->x; (v2)->y=(v1)->y; (v2)->z=(v1)->z;
#define COPYVEC4(v1,v2) (v2)->x=(v1)->x; (v2)->y=(v1)->y; (v2)->z=(v1).z; (v2)->w=(v1)->w;
#define PRINT_VEC(v) printf("\n(vector) x= %f, y= %f, z = %f\n", (v).x, (v).y, (v).z);
#define PRINT_SVEC(str,v) printf("\n%s x= %f, y= %f, z = %f\n", str, (v).x, (v).y, (v).z);
#define PRINT_VEC2(v) printf("\n(vector) x= %f, y= %f\n", (v).x, (v).y);
#define PRINT_SVEC2(str,v) printf("\n%s x= %f, y= %f\n", str, (v).x, (v).y);
#define PRINT_VEC4(v) printf("\n(vector) x= %f, y= %f, z = %f, w = %f\n", (v).x, (v).y, (v).z, (v).w);
#define PRINT_SVEC4(str,v) printf("\n%s x= %f, y= %f, z = %f, w = %f\n", str, (v).x, (v).y, (v).z, (v).w);
#define PRINT_BULLETVEC(str,v) printf("\n%s x= %f, y= %f, z = %f, w = %f\n", str, (v).x(), (v).y(), (v).z(), (v).w());
#define MUL_FVEC3(t,v) (v)->x *= t; (v)->y *=t; (v)->z *= t;
#define MUL_FVEC4(t,v) (v)->x *= t; (v)->y *=t; (v)->z *= t, (v)->w *= t;
#define ADD_FVEC3(t,v) (v)->x += t; (v)->y +=t; (v)->z += t;
#define ADD_FVEC4(t,v) (v)->x += t; (v)->y +=t; (v)->z += t, (v)->w += t;
#define SUB_FVEC3(t,v) (v)->x -= t; (v)->y -=t; (v)->z -= t;
#define SUB_FVEC4(t,v) (v)->x -= t; (v)->y -=t; (v)->z -= t, (v)->w -= t;
#define INIT_OBJ_ARR_NULL(arr, len) {for(int i=0; i<len; i++) {arr[i] = NULL;}}
Wednesday, August 11, 2010
You know whoo you are... and it is your fault :P...
Tags:
Programming
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment