Flint Particle System Forum - Initializing a particle's dictionary2016-05-08T22:01:07+01:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Initializing a particle's dictionaryhttp://flintparticles.org/forum/comments.php?DiscussionID=364&Focus=1227#Comment_12272010-06-04T00:42:29+01:002016-05-08T22:01:07+01:00Richard Clarkhttp://flintparticles.org/forum/account.php?u=246
I'm writing biomedical simulations using Flint (see an example at http://elearning.millipore.com) and I'm using the dictionary property to add additional data to each particle. I've found it useful ...
May I propose this become part of a future release?
public class DictionaryInitializer extends InitializerBase { private var _template: Object;
public function DictionaryInitializer(template:Object) { _template = template; }
public override function initialize(emitter:Emitter, particle:Particle):void { if (_template == null) return; var dict: Dictionary = particle.dictionary; for (var key:* in _template) { dict[key] = _template[key]; } }
} }]]>
Initializing a particle's dictionaryhttp://flintparticles.org/forum/comments.php?DiscussionID=364&Focus=1234#Comment_12342010-06-17T10:36:12+01:002016-05-08T22:01:07+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi Richard
Sounds like a good idea. I'll try to include it soon.
Richard
Sounds like a good idea. I'll try to include it soon.