Flint Particle System Forum - Number of neighbors?2011-06-23T13:23:58+01:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Number of neighbors?http://flintparticles.org/forum/comments.php?DiscussionID=248&Focus=895#Comment_8952009-08-10T14:46:40+01:002011-06-23T13:23:58+01:00kytomhttp://flintparticles.org/forum/account.php?u=235
Hi,
Thank you for the awesome particle engine. Just learning this thing, and ran into an issue...
I want to create a certain effect based on the 'energy' of the particle, where energy is a ...
Thank you for the awesome particle engine. Just learning this thing, and ran into an issue...
I want to create a certain effect based on the 'energy' of the particle, where energy is a number of its neighbors. Is there some easy way of determining it, or should I implement one myself?
TIA and cheers :)]]>
Number of neighbors?http://flintparticles.org/forum/comments.php?DiscussionID=248&Focus=897#Comment_8972009-08-12T08:12:35+01:002011-06-23T13:23:58+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi
You'll probably need a custom action for this. Some of the existing actions (like ApproachNeighbours) relate to the number and location of neighbours, but it doesn't sound like you want any of ...
You'll probably need a custom action for this. Some of the existing actions (like ApproachNeighbours) relate to the number and location of neighbours, but it doesn't sound like you want any of the specific actions already implemented in the library. You might find the source code for ApproachNeighbours useful in implementing your own solution.
Richard]]>
Number of neighbors?http://flintparticles.org/forum/comments.php?DiscussionID=248&Focus=906#Comment_9062009-08-27T09:28:37+01:002011-06-23T13:23:58+01:00kytomhttp://flintparticles.org/forum/account.php?u=235
Sorry for the late response. Thank you for your suggestion!
I made my own action based on ApproachNeighbours, exactly how you said, though if I wanted to optimize it better, especially in case of ...
I made my own action based on ApproachNeighbours, exactly how you said, though if I wanted to optimize it better, especially in case of a large number of particles, I think the best solution would be to implement a grid-based solution, like Grant did in his ProximityManager.
Cheers :)]]>
Number of neighbors?http://flintparticles.org/forum/comments.php?DiscussionID=248&Focus=908#Comment_9082009-09-01T07:44:14+01:002011-06-23T13:23:58+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
I too would have expected space partitioning to produce faster results, but when I implemented ApproachNeighbours and the other space related actions I found a simple sorted array to be faster than ...