#ifndef TERRAIN_OBJECT_H
#define TERRAIN_OBJECT_H
#include <scene/resources/packed_scene.h>
class TerrainObject {
	List<Ref<Mesh> > lods;
public:
	inline void add_mesh(Ref<Mesh> &mesh)
	{
		lods.push_back(mesh);
	}
	inline Ref<Mesh> get_mesh(int id) const
	{
		id = id * (id < lods.size()) + (lods.size() - 1) * (id >= lods.size());
		return lods[id];
	}
	inline int get_lod_count() const
	{
		return lods.size();
	}
	static List<TerrainObject> get_objects(const PackedScene *sc, const NodePath &path);
};
#endif

