Tag Info

New answers tagged

3

Back in the days of C and no templates... we had void pointers. Good thing they weren't made obsolete, because you have just seen that templates aren't omnipotent gods. This situation is perfect for some void pointer hacks. Here, I tried to make an example that was as simple as possible: Edit: The example below makes a dangerous use of shared_ptr, please ...


0

I'm currently on a similar development path, though not explicitly entity-based. Can't say if this is a "typical" approach, but so far seems to work. I'm managing a list of "volumes", and detecting when certain ones intersect others. (Sometimes for physics, sometimes for other kinds of triggers, like you describe.) Volume *v = new Volume(dimensions and ...



Top 50 recent answers are included