Heightmap.h 725 B

12345678910111213141516171819202122232425262728
  1. #ifndef HEIGHTMAP_H_
  2. #define HEIGHTMAP_H_
  3. #include "Node.h"
  4. namespace gameplay
  5. {
  6. class Heightmap
  7. {
  8. public:
  9. /**
  10. * Generates heightmap data and saves the result to the specified filename (PNG file).
  11. *
  12. * @param nodeIds List of node ids to include in the heightmap generation.
  13. * @param width Width of the produced heightmap image.
  14. * @param height Height of the produced heightmap image.
  15. * @param filename Output PNG file to write the heightmap image to.
  16. * @param highP Use packed 24-bit (RGB) instead of standard 8-bit grayscale.
  17. */
  18. static void generate(const std::vector<std::string>& nodeIds, int width, int height, const char* filename, bool highP = false);
  19. };
  20. }
  21. #endif