Revision: 41591
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41591
Author:   campbellbarton
Date:     2011-11-06 15:39:20 +0000 (Sun, 06 Nov 2011)
Log Message:
-----------
more macro --> bli math lib replacements.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/BKE_effect.h
    trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c
    trunk/blender/source/blender/blenkernel/intern/boids.c
    trunk/blender/source/blender/blenkernel/intern/cloth.c
    trunk/blender/source/blender/blenkernel/intern/effect.c
    trunk/blender/source/blender/blenkernel/intern/fluidsim.c
    trunk/blender/source/blender/blenkernel/intern/smoke.c
    trunk/blender/source/blender/blenkernel/intern/softbody.c
    trunk/blender/source/blender/editors/mesh/editmesh.c
    trunk/blender/source/blender/render/intern/source/occlusion.c

Modified: trunk/blender/source/blender/blenkernel/BKE_effect.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_effect.h        2011-11-06 
15:17:43 UTC (rev 41590)
+++ trunk/blender/source/blender/blenkernel/BKE_effect.h        2011-11-06 
15:39:20 UTC (rev 41591)
@@ -129,7 +129,7 @@
 
 /* needed for boids */
 float effector_falloff(struct EffectorCache *eff, struct EffectorData *efd, 
struct EffectedPoint *point, struct EffectorWeights *weights);
-int closest_point_on_surface(struct SurfaceModifierData *surmd, float *co, 
float *surface_co, float *surface_nor, float *surface_vel);
+int closest_point_on_surface(SurfaceModifierData *surmd, const float co[3], 
float surface_co[3], float surface_nor[3], float surface_vel[3]);
 int get_effector_data(struct EffectorCache *eff, struct EffectorData *efd, 
struct EffectedPoint *point, int real_velocity);
 
 /* required for particle_system.c */

Modified: trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c        
2011-11-06 15:17:43 UTC (rev 41590)
+++ trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c        
2011-11-06 15:39:20 UTC (rev 41591)
@@ -292,7 +292,7 @@
        mvert=dm->getVertDataArray(dm, CD_MVERT);
        
        for(a=0; a<kb->totelem; a++, fp+=3, mvert++) {
-               VECCOPY(fp, mvert->co);
+               copy_v3_v3(fp, mvert->co);
        }
 }
 
@@ -604,12 +604,12 @@
 static void emDM__calcFaceCent(EditFace *efa, float cent[3], float 
(*vertexCos)[3])
 {
        if (vertexCos) {
-               VECCOPY(cent, vertexCos[(int) efa->v1->tmp.l]);
+               copy_v3_v3(cent, vertexCos[(int) efa->v1->tmp.l]);
                add_v3_v3(cent, vertexCos[(int) efa->v2->tmp.l]);
                add_v3_v3(cent, vertexCos[(int) efa->v3->tmp.l]);
                if (efa->v4) add_v3_v3(cent, vertexCos[(int) efa->v4->tmp.l]);
        } else {
-               VECCOPY(cent, efa->v1->co);
+               copy_v3_v3(cent, efa->v1->co);
                add_v3_v3(cent, efa->v2->co);
                add_v3_v3(cent, efa->v3->co);
                if (efa->v4) add_v3_v3(cent, efa->v4->co);
@@ -1184,7 +1184,7 @@
 
        for(i = 0; i < index; ++i) ev = ev->next;
 
-       VECCOPY(vert_r->co, ev->co);
+       copy_v3_v3(vert_r->co, ev->co);
 
        normal_float_to_short_v3(vert_r->no, ev->no);
 
@@ -1539,8 +1539,9 @@
        
        orco = MEM_mallocN(sizeof(float)*3*totvert, "EditMesh Orco");
 
-       for(a=0, eve=em->verts.first; eve; eve=eve->next, a+=3)
-               VECCOPY(orco+a, eve->co);
+       for(a=0, eve=em->verts.first; eve; eve=eve->next, a+=3) {
+               copy_v3_v3(orco+a, eve->co);
+       }
        
        return orco;
 }
@@ -2146,7 +2147,7 @@
 
        cos = MEM_mallocN(sizeof(*cos)*numVerts, "vertexcos");
        for (i=0,eve=em->verts.first; i<numVerts; i++,eve=eve->next) {
-               VECCOPY(cos[i], eve->co);
+               copy_v3_v3(cos[i], eve->co);
        }
 
        return cos;
@@ -2654,7 +2655,7 @@
        //assert(vert_index>=0 && vert_index<4);
        SGLSLMeshToTangent * pMesh = (SGLSLMeshToTangent *) 
pContext->m_pUserData;
        const float *co= 
pMesh->mvert[(&pMesh->mface[face_num].v1)[vert_index]].co;
-       VECCOPY(fPos, co);
+       copy_v3_v3(fPos, co);
 }
 
 static void GetTextureCoordinate(const SMikkTSpaceContext * pContext, float 
fUV[], const int face_num, const int vert_index)
@@ -2680,7 +2681,7 @@
        const int smoothnormal = (pMesh->mface[face_num].flag & ME_SMOOTH);
        if(!smoothnormal) {     // flat
                if(pMesh->precomputedFaceNormals) {
-                       VECCOPY(fNorm, 
&pMesh->precomputedFaceNormals[3*face_num]);
+                       copy_v3_v3(fNorm, 
&pMesh->precomputedFaceNormals[3*face_num]);
                }
                else {
                        MFace *mf= &pMesh->mface[face_num];
@@ -2707,7 +2708,7 @@
        //assert(vert_index>=0 && vert_index<4);
        SGLSLMeshToTangent * pMesh = (SGLSLMeshToTangent *) 
pContext->m_pUserData;
        float * pRes = pMesh->tangent[4*face_num+iVert];
-       VECCOPY(pRes, fvTangent);
+       copy_v3_v3(pRes, fvTangent);
        pRes[3]=fSign;
 }
 

Modified: trunk/blender/source/blender/blenkernel/intern/boids.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/boids.c      2011-11-06 
15:17:43 UTC (rev 41590)
+++ trunk/blender/source/blender/blenkernel/intern/boids.c      2011-11-06 
15:39:20 UTC (rev 41591)
@@ -162,7 +162,7 @@
                        negate_v3_v3(efd.vec_to_point, bpa->gravity);
                }
 
-               VECCOPY(bbd->wanted_co, efd.vec_to_point);
+               copy_v3_v3(bbd->wanted_co, efd.vec_to_point);
                mul_v3_fl(bbd->wanted_co, mul);
 
                bbd->wanted_speed = val->max_speed * priority;
@@ -204,7 +204,7 @@
                BVHTreeRayHit hit;
                float radius = val->personal_space * pa->size, ray_dir[3];
 
-               VECCOPY(col.co1, pa->prev_state.co);
+               copy_v3_v3(col.co1, pa->prev_state.co);
                add_v3_v3v3(col.co2, pa->prev_state.co, pa->prev_state.vel);
                sub_v3_v3v3(ray_dir, col.co2, col.co1);
                mul_v3_fl(ray_dir, acbr->look_ahead);
@@ -254,10 +254,10 @@
        {
                neighbors = BLI_kdtree_range_search(bbd->sim->psys->tree, 
acbr->look_ahead * len_v3(pa->prev_state.vel), pa->prev_state.co, 
pa->prev_state.ave, &ptn);
                if(neighbors > 1) for(n=1; n<neighbors; n++) {
-                       VECCOPY(co1, pa->prev_state.co);
-                       VECCOPY(vel1, pa->prev_state.vel);
-                       VECCOPY(co2, (bbd->sim->psys->particles + 
ptn[n].index)->prev_state.co);
-                       VECCOPY(vel2, (bbd->sim->psys->particles + 
ptn[n].index)->prev_state.vel);
+                       copy_v3_v3(co1, pa->prev_state.co);
+                       copy_v3_v3(vel1, pa->prev_state.vel);
+                       copy_v3_v3(co2, (bbd->sim->psys->particles + 
ptn[n].index)->prev_state.co);
+                       copy_v3_v3(vel2, (bbd->sim->psys->particles + 
ptn[n].index)->prev_state.vel);
 
                        sub_v3_v3v3(loc, co1, co2);
 
@@ -270,8 +270,8 @@
                                t = -dot_v3v3(loc, vec)/inp;
                                /* cpa is not too far in the future so 
investigate further */
                                if(t > 0.0f && t < t_min) {
-                                       VECADDFAC(co1, co1, vel1, t);
-                                       VECADDFAC(co2, co2, vel2, t);
+                                       madd_v3_v3fl(co1, vel1, t);
+                                       madd_v3_v3fl(co2, vel2, t);
                                        
                                        sub_v3_v3v3(vec, co2, co1);
 
@@ -300,10 +300,10 @@
                if(epsys) {
                        neighbors = BLI_kdtree_range_search(epsys->tree, 
acbr->look_ahead * len_v3(pa->prev_state.vel), pa->prev_state.co, 
pa->prev_state.ave, &ptn);
                        if(neighbors > 0) for(n=0; n<neighbors; n++) {
-                               VECCOPY(co1, pa->prev_state.co);
-                               VECCOPY(vel1, pa->prev_state.vel);
-                               VECCOPY(co2, (epsys->particles + 
ptn[n].index)->prev_state.co);
-                               VECCOPY(vel2, (epsys->particles + 
ptn[n].index)->prev_state.vel);
+                               copy_v3_v3(co1, pa->prev_state.co);
+                               copy_v3_v3(vel1, pa->prev_state.vel);
+                               copy_v3_v3(co2, (epsys->particles + 
ptn[n].index)->prev_state.co);
+                               copy_v3_v3(vel2, (epsys->particles + 
ptn[n].index)->prev_state.vel);
 
                                sub_v3_v3v3(loc, co1, co2);
 
@@ -316,8 +316,8 @@
                                        t = -dot_v3v3(loc, vec)/inp;
                                        /* cpa is not too far in the future so 
investigate further */
                                        if(t > 0.0f && t < t_min) {
-                                               VECADDFAC(co1, co1, vel1, t);
-                                               VECADDFAC(co2, co2, vel2, t);
+                                               madd_v3_v3fl(co1, vel1, t);
+                                               madd_v3_v3fl(co2, vel2, t);
                                                
                                                sub_v3_v3v3(vec, co2, co1);
 
@@ -439,7 +439,7 @@
                        len = len_v3(loc);
                        /* too close to leader */
                        if(len < 2.0f * val->personal_space * pa->size) {
-                               VECCOPY(bbd->wanted_co, loc);
+                               copy_v3_v3(bbd->wanted_co, loc);
                                bbd->wanted_speed = val->max_speed;
                                return 1;
                        }
@@ -449,7 +449,7 @@
 
                        /* possible blocking of leader in near future */
                        if(t > 0.0f && t < 3.0f) {
-                               VECCOPY(vec2, vec);
+                               copy_v3_v3(vec2, vec);
                                mul_v3_fl(vec2, t);
 
                                sub_v3_v3v3(vec2, loc, vec2);
@@ -457,7 +457,7 @@
                                len = len_v3(vec2);
 
                                if(len < 2.0f * val->personal_space * pa->size) 
{
-                                       VECCOPY(bbd->wanted_co, vec2);
+                                       copy_v3_v3(bbd->wanted_co, vec2);
                                        bbd->wanted_speed = val->max_speed * 
(3.0f - t)/3.0f;
                                        return 1;
                                }
@@ -466,17 +466,17 @@
 
                /* not blocking so try to follow leader */
                if(p && flbr->options & BRULE_LEADER_IN_LINE) {
-                       VECCOPY(vec, 
bbd->sim->psys->particles[p-1].prev_state.vel);
-                       VECCOPY(loc, 
bbd->sim->psys->particles[p-1].prev_state.co);
+                       copy_v3_v3(vec, 
bbd->sim->psys->particles[p-1].prev_state.vel);
+                       copy_v3_v3(loc, 
bbd->sim->psys->particles[p-1].prev_state.co);
                }
                else {
-                       VECCOPY(loc, flbr->oloc);
+                       copy_v3_v3(loc, flbr->oloc);
                        sub_v3_v3v3(vec, flbr->loc, flbr->oloc);
                        mul_v3_fl(vec, 1.0f/bbd->timestep);
                }
                
                /* fac is seconds behind leader */
-               VECADDFAC(loc, loc, vec, -flbr->distance);
+               madd_v3_v3fl(loc, vec, -flbr->distance);
 
                sub_v3_v3v3(bbd->wanted_co, loc, pa->prev_state.co);
                bbd->wanted_speed = len_v3(bbd->wanted_co);
@@ -488,7 +488,7 @@
 
                /* first check we're not blocking any leaders */
                for(i = 0; i< bbd->sim->psys->totpart; i+=n){
-                       VECCOPY(vec, 
bbd->sim->psys->particles[i].prev_state.vel);
+                       copy_v3_v3(vec, 
bbd->sim->psys->particles[i].prev_state.vel);
 
                        sub_v3_v3v3(loc, pa->prev_state.co, 
bbd->sim->psys->particles[i].prev_state.co);
 
@@ -499,7 +499,7 @@
                                len = len_v3(loc);
                                /* too close to leader */
                                if(len < 2.0f * val->personal_space * pa->size) 
{
-                                       VECCOPY(bbd->wanted_co, loc);
+                                       copy_v3_v3(bbd->wanted_co, loc);
                                        bbd->wanted_speed = val->max_speed;
                                        return 1;
                                }
@@ -509,7 +509,7 @@
 
                                /* possible blocking of leader in near future */
                                if(t > 0.0f && t < t_min) {
-                                       VECCOPY(vec2, vec);
+                                       copy_v3_v3(vec2, vec);
                                        mul_v3_fl(vec2, t);
 
                                        sub_v3_v3v3(vec2, loc, vec2);
@@ -518,7 +518,7 @@
 
                                        if(len < 2.0f * val->personal_space * 
pa->size) {
                                                t_min = t;
-                                               VECCOPY(bbd->wanted_co, loc);
+                                               copy_v3_v3(bbd->wanted_co, loc);
                                                bbd->wanted_speed = 
val->max_speed * (3.0f - t)/3.0f;
                                                ret = 1;
                                        }
@@ -530,16 +530,16 @@
 
                /* not blocking so try to follow leader */
                if(flbr->options & BRULE_LEADER_IN_LINE) {
-                       VECCOPY(vec, 
bbd->sim->psys->particles[p-1].prev_state.vel);
-                       VECCOPY(loc, 
bbd->sim->psys->particles[p-1].prev_state.co);
+                       copy_v3_v3(vec, 
bbd->sim->psys->particles[p-1].prev_state.vel);
+                       copy_v3_v3(loc, 
bbd->sim->psys->particles[p-1].prev_state.co);
                }
                else {
-                       VECCOPY(vec, bbd->sim->psys->particles[p - 
p%n].prev_state.vel);
-                       VECCOPY(loc, bbd->sim->psys->particles[p - 
p%n].prev_state.co);
+                       copy_v3_v3(vec, bbd->sim->psys->particles[p - 
p%n].prev_state.vel);
+                       copy_v3_v3(loc, bbd->sim->psys->particles[p - 
p%n].prev_state.co);
                }
                
                /* fac is seconds behind leader */
-               VECADDFAC(loc, loc, vec, -flbr->distance);
+               madd_v3_v3fl(loc, vec, -flbr->distance);
 
                sub_v3_v3v3(bbd->wanted_co, loc, pa->prev_state.co);
                bbd->wanted_speed = len_v3(bbd->wanted_co);
@@ -563,11 +563,11 @@
 
                normalize_v3(bpa->wander);
 
-               VECCOPY(vec, bpa->wander);
+               copy_v3_v3(vec, bpa->wander);
 

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to