pandemonium_engine/modules/terraman/world/terrain_structure.h

54 lines
995 B
C++
Raw Normal View History

2022-03-17 22:33:22 +01:00
#ifndef TERRAIN_STRUCTURE_H
#define TERRAIN_STRUCTURE_H
2023-12-17 22:59:50 +01:00
#include "core/containers/hash_map.h"
#include "core/object/resource.h"
#include "../defines.h"
#include "core/containers/pool_vector.h"
2022-03-18 02:41:08 +01:00
#include "core/math/aabb.h"
#include "terrain_chunk.h"
2022-03-18 02:41:08 +01:00
class TerrainStructure : public Resource {
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