2022-03-17 22:33:22 +01:00
|
|
|
#ifndef TERRAIN_STRUCTURE_H
|
|
|
|
#define TERRAIN_STRUCTURE_H
|
2023-12-17 22:59:50 +01:00
|
|
|
|
2022-03-15 13:29:32 +01:00
|
|
|
|
2022-08-17 12:53:49 +02:00
|
|
|
#include "core/containers/hash_map.h"
|
2022-08-17 13:45:14 +02:00
|
|
|
#include "core/object/resource.h"
|
2022-03-15 13:29:32 +01:00
|
|
|
|
|
|
|
#include "../defines.h"
|
|
|
|
|
2022-08-17 12:53:49 +02:00
|
|
|
#include "core/containers/pool_vector.h"
|
2022-03-18 02:41:08 +01:00
|
|
|
|
2022-03-15 13:29:32 +01:00
|
|
|
#include "core/math/aabb.h"
|
|
|
|
#include "terrain_chunk.h"
|
|
|
|
|
2022-03-18 02:41:08 +01:00
|
|
|
class TerrainStructure : public Resource {
|
2022-03-15 13:29:32 +01:00
|
|
|
GDCLASS(TerrainStructure, Resource);
|
|
|
|
|
|
|
|
public:
|
|
|
|
bool get_use_aabb() const;
|
|
|
|
void set_use_aabb(const bool value);
|
|
|
|
|
|
|
|
AABB get_chunk_aabb() const;
|
|
|
|
void set_chunk_aabb(const AABB &value);
|
|
|
|
|
|
|
|
int get_position_x() const;
|
|
|
|
void set_position_x(const int value);
|
|
|
|
|
|
|
|
int get_position_y() const;
|
|
|
|
void set_position_y(const int value);
|
|
|
|
|
|
|
|
int get_position_z() const;
|
|
|
|
void set_position_z(const int value);
|
|
|
|
|
|
|
|
void set_position(const int x, const int y, const int z);
|
|
|
|
|
|
|
|
void write_to_chunk(Ref<TerrainChunk> chunk);
|
|
|
|
|
|
|
|
TerrainStructure();
|
|
|
|
~TerrainStructure();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool _use_aabb;
|
|
|
|
AABB _chunk_aabb;
|
|
|
|
|
|
|
|
int _position_x;
|
|
|
|
int _position_y;
|
|
|
|
int _position_z;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|