Hi all,
I did some experimentation with Thor particle systems and was faced with the following. My collision detection schema needs to save state information to each object that can collide. Therefore, in order get the Thor particles collide, I would like to extend the thor::Particle to contain the new attributes for the collision state information, but of course not to change the Thor library files in any way. Is there a feasible way to do this?
Being not a seasoned C++ expert, I come up only deriving ParticleExtended from Particle and include the things I want in the derived class. But as I am instantiating a ParticleSystem and not a Particle this probably would not work this simple. The other option I can think of is to maintain a map from a particle pointer (Particle*) to my collision state data and in my CollisionAffector I could retrive the correct data for each particle using the map. But this seems a bit awkward too. I would be glad to hear if anyone could suggest other alternatives.
Thanks,
ast