diff options
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 353c75d63c6..cc6e28b2a82 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -366,7 +366,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm_final, DerivedMesh *dm_deform for (i=0, node=nodedmelem; i<totdmelem; i++, node++) { int origindex_final; - node->link = SET_INT_IN_POINTER(i); + node->link = POINTER_FROM_INT(i); /* may be vertex or face origindex */ if (use_modifier_stack) { @@ -409,7 +409,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm_final, DerivedMesh *dm_deform else { if (psys->part->from == PART_FROM_VERT) { if (pa->num < totelem && nodearray[pa->num]) - pa->num_dmcache= GET_INT_FROM_POINTER(nodearray[pa->num]->link); + pa->num_dmcache= POINTER_AS_INT(nodearray[pa->num]->link); else pa->num_dmcache = DMCACHE_NOTFOUND; } @@ -1546,7 +1546,7 @@ static EdgeHash *sph_springhash_build(ParticleSystem *psys) springhash = BLI_edgehash_new_ex(__func__, psys->tot_fluidsprings); for (i=0, spring=psys->fluid_springs; i<psys->tot_fluidsprings; i++, spring++) - BLI_edgehash_insert(springhash, spring->particle_index[0], spring->particle_index[1], SET_INT_IN_POINTER(i+1)); + BLI_edgehash_insert(springhash, spring->particle_index[0], spring->particle_index[1], POINTER_FROM_INT(i+1)); return springhash; } @@ -1610,9 +1610,9 @@ static void sph_density_accum_cb(void *userdata, int index, const float co[3], f /* Ugh! One particle has too many neighbors! If some aren't taken into * account, the forces will be biased by the tree search order. This - * effectively adds enery to the system, and results in a churning motion. + * effectively adds energy to the system, and results in a churning motion. * But, we have to stop somewhere, and it's not the end of the world. - * - jahka and z0r + * - jahka and z0r */ if (pfr->tot_neighbors >= SPH_NEIGHBORS) return; @@ -1748,7 +1748,7 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa /* Viscoelastic spring force */ if (pfn->psys == psys[0] && fluid->flag & SPH_VISCOELASTIC_SPRINGS && springhash) { /* BLI_edgehash_lookup appears to be thread-safe. - z0r */ - spring_index = GET_INT_FROM_POINTER(BLI_edgehash_lookup(springhash, index, pfn->index)); + spring_index = POINTER_AS_INT(BLI_edgehash_lookup(springhash, index, pfn->index)); if (spring_index) { spring = psys[0]->fluid_springs + spring_index - 1; @@ -2187,7 +2187,7 @@ static void basic_rotate(ParticleSettings *part, ParticleData *pa, float dfra, f } /************************************************ - * Collisions + * Collisions * * The algorithm is roughly: * 1. Use a BVH tree to search for faces that a particle may collide with. @@ -4335,7 +4335,7 @@ void particle_system_update(Main *bmain, Scene *scene, Object *ob, ParticleSyste pa->flag &= ~PARS_NO_DISP; } - /* free unexisting after reseting particles */ + /* free unexisting after resetting particles */ if (free_unexisting) free_unexisting_particles(&sim); |