diff options
author | Ton Roosendaal <ton@blender.org> | 2004-07-11 17:17:03 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-07-11 17:17:03 +0400 |
commit | 612eb7c1931a903552ba9e7cc6c0a3e5a07c5e5e (patch) | |
tree | 04ebfbac5d85b9b19f85f2714fc7e15d8ca392e4 /source/blender/include/blendef.h | |
parent | 6b092cf8adc27c671b5e0afcd919d20c1c42df1c (diff) |
- Simple optimizing for deflected (collision) particles. It now caches
transformation (from vertex -> world space), used defines for vecadd and
vecsub, and intersects quads more efficient.
Result is about 2 times faster.
- Added draw mode for empty used as forcefield
- added defines VECADD and VECSUB
Diffstat (limited to 'source/blender/include/blendef.h')
-rw-r--r-- | source/blender/include/blendef.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/include/blendef.h b/source/blender/include/blendef.h index 2ff08352d0d..cd3218c03ab 100644 --- a/source/blender/include/blendef.h +++ b/source/blender/include/blendef.h @@ -63,6 +63,9 @@ #define VECCOPY(v1,v2) {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2);} #define QUATCOPY(v1,v2) {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2); *(v1+3)= *(v2+3);} +#define VECADD(v1,v2,v3) {*(v1)= *(v2) + *(v3); *(v1+1)= *(v2+1) + *(v3+1); *(v1+2)= *(v2+2) + *(v3+2);} +#define VECSUB(v1,v2,v3) {*(v1)= *(v2) - *(v3); *(v1+1)= *(v2+1) - *(v3+1); *(v1+2)= *(v2+2) - *(v3+2);} + #define INPR(v1, v2) ( (v1)[0]*(v2)[0] + (v1)[1]*(v2)[1] + (v1)[2]*(v2)[2] ) #define CLAMP(a, b, c) if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c) #define CLAMPIS(a, b, c) ((a)<(b) ? (b) : (a)>(c) ? (c) : (a)) |