22-06-2017, 12:13 PM
(This post was last modified: 23-06-2017, 03:12 PM by virtualmethod.
Edit Reason: eliminado el quote
)
Thanks a lot for the code, David!
There's already a couple methods in the API that do what you ask, but they're still undocumented (for some reason we write code faster than we write docs
):
The first method takes an array of forces and an array of particle indices. It applies forces[i] to particle_indices[i].
The second variation applies the same force to all particles in the array.
There's already a couple methods in the API that do what you ask, but they're still undocumented (for some reason we write code faster than we write docs
![Triste Triste](https://obi.virtualmethodstudio.com/forum/images/smilies/sad.png)
Code:
AddParticleExternalForces(solver, forces, particle_indices, num);
AddParticleExternalForce(solver, force, particle_indices, num);
The first method takes an array of forces and an array of particle indices. It applies forces[i] to particle_indices[i].
The second variation applies the same force to all particles in the array.