Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2009-11-23 17:41:22 +0300
committerJoseph Eagar <joeedh@gmail.com>2009-11-23 17:41:22 +0300
commit0e165c55bbd867ba487673b261d8d7e53baa5d95 (patch)
treeb7597ea61a4134c393055c9e4cea0394c44f167a /source/blender/editors/physics/particle_object.c
parent9fa2a9d18a113698c2d2498a12e468a3a1bf08d4 (diff)
parent37e4a311b0ad9da7177e50620efc3561e2dd7045 (diff)
did math lib conversion, equivilent to merge with trunk/2.5 at r24464
Diffstat (limited to 'source/blender/editors/physics/particle_object.c')
-rw-r--r--source/blender/editors/physics/particle_object.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 0c24e3fff0a..90e45f81c17 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -37,7 +37,7 @@
#include "DNA_scene_types.h"
#include "DNA_windowmanager_types.h"
-#include "BLI_arithb.h"
+#include "BLI_math.h"
#include "BLI_listbase.h"
#include "BKE_context.h"
@@ -548,7 +548,7 @@ static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
- Mat4MulVecfl(hairmat,key->co);
+ mul_m4_v3(hairmat,key->co);
if(ekey) {
ekey->flag &= ~PEK_USE_WCO;
@@ -638,7 +638,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
/* convert to global coordinates */
for (i=0; i<numverts; i++)
- Mat4MulVecfl (ob->obmat, CDDM_get_vert(dm, i)->co);
+ mul_m4_v3(ob->obmat, CDDM_get_vert(dm, i)->co);
bvhtree_from_mesh_faces(&bvhtree, dm, 0.0, 2, 6);
@@ -657,21 +657,21 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
mface = CDDM_get_tessface(dm,nearest.index);
- VecCopyf(v[0], CDDM_get_vert(dm,mface->v1)->co);
- VecCopyf(v[1], CDDM_get_vert(dm,mface->v2)->co);
- VecCopyf(v[2], CDDM_get_vert(dm,mface->v3)->co);
+ copy_v3_v3(v[0], CDDM_get_vert(dm,mface->v1)->co);
+ copy_v3_v3(v[1], CDDM_get_vert(dm,mface->v2)->co);
+ copy_v3_v3(v[2], CDDM_get_vert(dm,mface->v3)->co);
if(mface->v4) {
- VecCopyf(v[3], CDDM_get_vert(dm,mface->v4)->co);
- MeanValueWeights(v, 4, nearest.co, pa->fuv);
+ copy_v3_v3(v[3], CDDM_get_vert(dm,mface->v4)->co);
+ interp_weights_poly_v3( pa->fuv,v, 4, nearest.co);
}
else
- MeanValueWeights(v, 3, nearest.co, pa->fuv);
+ interp_weights_poly_v3( pa->fuv,v, 3, nearest.co);
pa->num = nearest.index;
pa->num_dmcache = psys_particle_dm_face_lookup(ob,psmd->dm,pa->num,pa->fuv,NULL);
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
- Mat4Invert(imat,hairmat);
+ invert_m4_m4(imat,hairmat);
VECSUB(vec, nearest.co, key->co);
@@ -682,7 +682,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
VECADD(key->co, key->co, vec);
- Mat4MulVecfl(imat,key->co);
+ mul_m4_v3(imat,key->co);
if(ekey) {
ekey->flag |= PEK_USE_WCO;