#ifndef DENSITY_MAP_H #define DENSITY_MAP_H #include #include #include #include #include "world_height_map.h" class DensityMap: public Resource { GDCLASS(DensityMap, Resource); public: DensityMap(); ~DensityMap(); protected: Ref height_map; Ref rnd; Ref noise; Ref curve; float max_height; bool _set(const StringName &p_name, const Variant &p_value); bool _get(const StringName &p_name, Variant &r_ret) const; void _get_property_list(List *p_list) const; static void _bind_methods(); public: void update_all(); float get_population_density(float x, float y); private: int seed; }; #endif