pioneerspacesim/pioneer — pull request #2317 by fluffyfreak (2013-05-27 12:53:53+00:00)
Title: InstanceTerrain GeneratorInstancer changes.

Difficult one to describe this one, quite abstract.

Everytiem I request a job I have to go through the ridiculous process of calling `Terrain::InstanceTerrain` and pass it a body to get a bunch of data from and do lots of branching etc.

In this commit I'm constructing a single static const table of unique `InstanceGenerator` objects, instead of doing it everytime `Terrain::InstanceTerrain` is called. An enum into that table. Then changing the way that `InstanceGenerator` objects are called.

I also add a second way of getting the `InstanceGenerator` when I already know which one I want.

It still has to do some stupid stuff like passing in the body each time rather than just copying the values across but the template madness is a bit much for me to work out today.

Andy