Improve Level of Generality
Release 0.4.4
In this release we aim to remove heightmap generation stage from the engine, and instead we take in the user-defined STPDiversityGenerator and call the virtual function for generation.
Programmable pipeline stage
- Rename
STPDiversityGeneratortoSTPDiversityGeneratorRTC. And add a new classSTPDiversityGenerator. For runtime-compiled heightmap generation scriptSTPDiversityGeneratorRTCcan be used; for static-compiled heightmap generation scriptSTPDiversityGeneratorcan be use instead. This can help cutting down the class size if runtime complication is not required, or not supported on target machine. - Allow input type to be customised in
linkProgram()inSTPDiversityGeneratorRTCfor better control over complier and linker flags. - Allow attaching archive to
STPDiversityGeneratorRTC. - Main generator
STPHeightfieldGeneratorno longer takes simplex noise to generate heightmap, instead it usesSTPDiversityGeneratorimplemented by user. - Overhaul to
STPSettingsand INI to reduce redundancy for the new system. - Move
STPBiomeandSTPBiomeSettingsinto namespaceSTPDemo. Also they are moved to SuperTerrain+\World\Biome\Biomes. - Move all heightmap generation algorithms to
STPDemo, and it's located inSTPMultiHeightGeneratorwhereasSTPBiomefieldGeneratorimplementsSTPDiversityGenerator. The demo generation uses static complication.
Improvement and fixes
Suggestions mentioned in #19
- Correct the include guard for
STPBiomeFactoryso the symbol is consistent with the filename. - Include function info for
STPDeviceErrorHandler. - Catch and rethrow exception thrown in
STPDiversityGeneratorRTCinstead of letting the program to crash. -
Put in-class struct declarations in a separate inline file inSTPDiversityGeneratorRTC.
General
- Rename
STPSettingstoSTPSettingto resolve naming conflict with namespaceSTPSettings. - Remove the following settings from
STPHeightfieldSettings, to address the fact that heightmap generation is now user-defined.
float Scale;
unsigned int Octave;
float Persistence;
float Lacunarity;- Improve exception catching and handling.