diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-10 23:43:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-10 23:43:45 +0300 |
commit | 37e4a311b0ad9da7177e50620efc3561e2dd7045 (patch) | |
tree | 8aea2cc851ab828ee040d601ed4c776283fd639a /source/blender/blenkernel/intern/texture.c | |
parent | 4617bb68ba4b1c5ab459673fffd98bf7203bb4f2 (diff) |
Math Lib
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
conversion script instead, if they use a lot of math functions
in new code:
http://www.pasteall.org/9052/python
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 14460423999..0171c58f2c6 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -41,7 +41,7 @@ #include "BLI_blenlib.h" -#include "BLI_arithb.h" +#include "BLI_math.h" #include "BLI_rand.h" #include "BLI_kdopbvh.h" @@ -215,7 +215,7 @@ TexMapping *add_mapping(void) texmap->size[0]= texmap->size[1]= texmap->size[2]= 1.0f; texmap->max[0]= texmap->max[1]= texmap->max[2]= 1.0f; - Mat4One(texmap->mat); + unit_m4(texmap->mat); return texmap; } @@ -224,16 +224,16 @@ void init_mapping(TexMapping *texmap) { float eul[3], smat[3][3], rmat[3][3], mat[3][3]; - SizeToMat3(texmap->size, smat); + size_to_mat3( smat,texmap->size); eul[0]= (M_PI/180.0f)*texmap->rot[0]; eul[1]= (M_PI/180.0f)*texmap->rot[1]; eul[2]= (M_PI/180.0f)*texmap->rot[2]; - EulToMat3(eul, rmat); + eul_to_mat3( rmat,eul); - Mat3MulMat3(mat, rmat, smat); + mul_m3_m3m3(mat, rmat, smat); - Mat4CpyMat3(texmap->mat, mat); + copy_m4_m3(texmap->mat, mat); VECCOPY(texmap->mat[3], texmap->loc); } |