Clang format.

This commit is contained in:
Relintai 2020-01-09 04:29:05 +01:00
parent b559329212
commit a67d0393ca
47 changed files with 426 additions and 464 deletions

View File

@ -3,8 +3,8 @@
#include "core/reference.h" #include "core/reference.h"
#include "core/ustring.h"
#include "core/math/aabb.h" #include "core/math/aabb.h"
#include "core/ustring.h"
#include "scene/resources/texture.h" #include "scene/resources/texture.h"
class WorldArea : public Reference { class WorldArea : public Reference {

View File

@ -3,8 +3,8 @@
#include "core/resource.h" #include "core/resource.h"
#include "../meshers/voxel_mesher.h"
#include "../../texture_packer/texture_packer.h" #include "../../texture_packer/texture_packer.h"
#include "../meshers/voxel_mesher.h"
class VoxelChunk; class VoxelChunk;
class VoxelMesher; class VoxelMesher;

View File

@ -11,7 +11,6 @@ _FORCE_INLINE_ int VoxelLight::get_world_position_z() const {
} }
Vector3 VoxelLight::get_world_position() { Vector3 VoxelLight::get_world_position() {
return Vector3(_world_position_x, _world_position_y, _world_position_z); return Vector3(_world_position_x, _world_position_y, _world_position_z);
} }
void VoxelLight::set_world_position(const int x, const int y, const int z) { void VoxelLight::set_world_position(const int x, const int y, const int z) {
_world_position_x = x; _world_position_x = x;
@ -21,11 +20,9 @@ void VoxelLight::set_world_position(const int x, const int y, const int z) {
_FORCE_INLINE_ Color VoxelLight::get_color() const { _FORCE_INLINE_ Color VoxelLight::get_color() const {
return _color; return _color;
} }
void VoxelLight::set_color(Color color) { void VoxelLight::set_color(Color color) {
_color = color; _color = color;
} }
_FORCE_INLINE_ float VoxelLight::get_size() const { _FORCE_INLINE_ float VoxelLight::get_size() const {

View File

@ -17,8 +17,6 @@ public:
protected: protected:
static void _bind_methods(); static void _bind_methods();
}; };
#endif #endif

View File

@ -8,8 +8,8 @@
#include "core/vector.h" #include "core/vector.h"
#include "scene/resources/material.h" #include "scene/resources/material.h"
#include "voxelman_library.h"
#include "../clutter/ground_clutter.h" #include "../clutter/ground_clutter.h"
#include "voxelman_library.h"
class VoxelmanLibrary; class VoxelmanLibrary;
class GroundClutter; class GroundClutter;

View File

@ -72,5 +72,4 @@ void VoxelSurfaceMerger::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_top", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", VOXEL_SIDE_TOP); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_top", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", VOXEL_SIDE_TOP);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_bottom", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", VOXEL_SIDE_BOTTOM); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_bottom", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", VOXEL_SIDE_BOTTOM);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_side", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", VOXEL_SIDE_SIDE); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "texture_side", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture", VOXEL_SIDE_SIDE);
} }

View File

@ -317,7 +317,6 @@ void VoxelCubePoints::refresh_neighbours(VoxelChunk *chunk) {
_point_neighbours[P001] = neighbours; _point_neighbours[P001] = neighbours;
neighbours = 0; neighbours = 0;
x = _x + 1; x = _x + 1;
y = _y; y = _y;
@ -376,7 +375,6 @@ void VoxelCubePoints::refresh_neighbours(VoxelChunk *chunk) {
_point_neighbours[P011] = neighbours; _point_neighbours[P011] = neighbours;
neighbours = 0; neighbours = 0;
x = _x + 1; x = _x + 1;
y = _y + 1; y = _y + 1;
@ -467,7 +465,6 @@ void VoxelCubePoints::setup(VoxelChunk *chunk, int x, int y, int z, int size) {
refresh_points(); refresh_points();
} }
void VoxelCubePoints::reset() { void VoxelCubePoints::reset() {
for (int i = 0; i < POINT_COUNT; ++i) { for (int i = 0; i < POINT_COUNT; ++i) {
_point_types[i] = 0; _point_types[i] = 0;
@ -557,7 +554,6 @@ Vector3 VoxelCubePoints::get_vertex_vector3_for_point(int face, int index) {
vector.z -= num2; vector.z -= num2;
vector /= num; vector /= num;
return vector; return vector;
} }
@ -744,7 +740,6 @@ VoxelCubePoints::VoxelCubePoints() {
VoxelCubePoints::~VoxelCubePoints() { VoxelCubePoints::~VoxelCubePoints() {
} }
void VoxelCubePoints::_bind_methods() { void VoxelCubePoints::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_x"), &VoxelCubePoints::get_x); ClassDB::bind_method(D_METHOD("get_x"), &VoxelCubePoints::get_x);

View File

@ -1,6 +1,5 @@
#include "voxel_mesher_cubic.h" #include "voxel_mesher_cubic.h"
void VoxelMesherCubic::_add_buffer(Node *p_chunk) { void VoxelMesherCubic::_add_buffer(Node *p_chunk) {
VoxelChunk *chunk = Object::cast_to<VoxelChunk>(p_chunk); VoxelChunk *chunk = Object::cast_to<VoxelChunk>(p_chunk);
@ -85,7 +84,6 @@ void VoxelMesherCubic::_add_buffer(Node *p_chunk) {
} }
VoxelMesherCubic::VoxelMesherCubic() { VoxelMesherCubic::VoxelMesherCubic() {
} }
VoxelMesherCubic::~VoxelMesherCubic() { VoxelMesherCubic::~VoxelMesherCubic() {

View File

@ -2,8 +2,8 @@
#define VOXEL_MESHER_CUBIC_H #define VOXEL_MESHER_CUBIC_H
#include "core/color.h" #include "core/color.h"
#include "core/math/vector3.h"
#include "core/math/vector2.h" #include "core/math/vector2.h"
#include "core/math/vector3.h"
#include "../voxel_mesher.h" #include "../voxel_mesher.h"
@ -20,7 +20,6 @@ public:
protected: protected:
static void _bind_methods(); static void _bind_methods();
}; };
#endif #endif

View File

@ -64,5 +64,3 @@ void TransvoxelCellData::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_triangle_count"), &TransvoxelCellData::get_triangle_count); ClassDB::bind_method(D_METHOD("get_triangle_count"), &TransvoxelCellData::get_triangle_count);
ClassDB::bind_method(D_METHOD("set_triangle_count", "value"), &TransvoxelCellData::set_triangle_count); ClassDB::bind_method(D_METHOD("set_triangle_count", "value"), &TransvoxelCellData::set_triangle_count);
} }

View File

@ -3,9 +3,9 @@
#include "core/reference.h" #include "core/reference.h"
#include "core/vector.h" #include "core/vector.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h" #include "scene/resources/mesh.h"
#include "scene/resources/surface_tool.h" #include "scene/resources/surface_tool.h"
#include "scene/resources/material.h"
class VoxelMeshData : public Reference { class VoxelMeshData : public Reference {
GDCLASS(VoxelMeshData, Reference) GDCLASS(VoxelMeshData, Reference)

View File

@ -1,23 +1,23 @@
#ifndef VOXEL_TOOLS_H #ifndef VOXEL_TOOLS_H
#define VOXEL_TOOLS_H #define VOXEL_TOOLS_H
#include "core/reference.h"
#include "core/color.h" #include "core/color.h"
#include "core/math/rect2.h"
#include "core/math/vector2.h" #include "core/math/vector2.h"
#include "core/math/vector3.h" #include "core/math/vector3.h"
#include "core/math/rect2.h" #include "core/reference.h"
#include "core/vector.h" #include "core/vector.h"
#include "scene/3d/mesh_instance.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
#include "scene/resources/surface_tool.h"
#include "scene/3d/immediate_geometry.h" #include "scene/3d/immediate_geometry.h"
#include "scene/3d/mesh_instance.h"
#include "scene/3d/spatial.h" #include "scene/3d/spatial.h"
#include "scene/main/node.h" #include "scene/main/node.h"
#include "scene/resources/concave_polygon_shape.h" #include "scene/resources/concave_polygon_shape.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
#include "scene/resources/surface_tool.h"
#include "../library/voxelman_library.h"
#include "../../mesh_data_resource/mesh_data_resource.h" #include "../../mesh_data_resource/mesh_data_resource.h"
#include "../library/voxelman_library.h"
const double PI_2 = 3.141592653589793238463 / 2; const double PI_2 = 3.141592653589793238463 / 2;
const double PI = 3.141592653589793238463; const double PI = 3.141592653589793238463;

View File

@ -108,7 +108,6 @@ Vector3 VoxelMesherTransvoxel::get_transition_vertex_direction(int index1, int i
return transvoxel_vertices[vert2] - transvoxel_vertices[vert1]; return transvoxel_vertices[vert2] - transvoxel_vertices[vert1];
} }
VoxelMesherTransvoxel::VoxelMesherTransvoxel() { VoxelMesherTransvoxel::VoxelMesherTransvoxel() {
for (int i = 0; i < 16; ++i) { for (int i = 0; i < 16; ++i) {
_regular_cell_datas[i] = Ref<TransvoxelCellData>(memnew(TransvoxelCellData(regularCellData[i]))); _regular_cell_datas[i] = Ref<TransvoxelCellData>(memnew(TransvoxelCellData(regularCellData[i])));
@ -117,11 +116,9 @@ VoxelMesherTransvoxel::VoxelMesherTransvoxel() {
for (int i = 0; i < 56; ++i) { for (int i = 0; i < 56; ++i) {
_transition_cell_data[i] = Ref<TransvoxelCellData>(memnew(TransvoxelCellData(transitionCellData[i]))); _transition_cell_data[i] = Ref<TransvoxelCellData>(memnew(TransvoxelCellData(transitionCellData[i])));
} }
} }
VoxelMesherTransvoxel::~VoxelMesherTransvoxel() { VoxelMesherTransvoxel::~VoxelMesherTransvoxel() {
} }
void VoxelMesherTransvoxel::_bind_methods() { void VoxelMesherTransvoxel::_bind_methods() {

View File

@ -166,7 +166,6 @@ void PropData::add_meshes_into(Ref<VoxelMesher> mesher, Ref<TexturePacker> textu
else else
pdataprop->get_prop()->add_meshes_into(mesher, texture_packer, parent_transform * pmesh->get_transform(), snap_spatial); pdataprop->get_prop()->add_meshes_into(mesher, texture_packer, parent_transform * pmesh->get_transform(), snap_spatial);
} }
} }
} }
void PropData::add_meshes_into_bind(Ref<VoxelMesher> mesher, Ref<TexturePacker> texture_packer, Transform parent_transform, Node *snap_spatial) { void PropData::add_meshes_into_bind(Ref<VoxelMesher> mesher, Ref<TexturePacker> texture_packer, Transform parent_transform, Node *snap_spatial) {

View File

@ -1,12 +1,12 @@
#ifndef PROP_DATA_H #ifndef PROP_DATA_H
#define PROP_DATA_H #define PROP_DATA_H
#include "core/reference.h" #include "core/math/rect2.h"
#include "core/vector.h"
#include "core/math/transform.h" #include "core/math/transform.h"
#include "core/math/vector2.h" #include "core/math/vector2.h"
#include "core/math/vector3.h" #include "core/math/vector3.h"
#include "core/math/rect2.h" #include "core/reference.h"
#include "core/vector.h"
#include "servers/physics_server.h" #include "servers/physics_server.h"

View File

@ -1,6 +1,5 @@
#include "prop_data_entity.h" #include "prop_data_entity.h"
int PropDataEntity::get_entity_data_id() const { int PropDataEntity::get_entity_data_id() const {
return _entity_data_id; return _entity_data_id;
} }

View File

@ -8,10 +8,8 @@ void PropDataEntry::set_transform(const Transform value) {
} }
PropDataEntry::PropDataEntry() { PropDataEntry::PropDataEntry() {
} }
PropDataEntry::~PropDataEntry() { PropDataEntry::~PropDataEntry() {
} }
void PropDataEntry::_bind_methods() { void PropDataEntry::_bind_methods() {

View File

@ -1,14 +1,13 @@
#ifndef PROP_DATA_DATA_H #ifndef PROP_DATA_DATA_H
#define PROP_DATA_DATA_H #define PROP_DATA_DATA_H
#include "core/resource.h"
#include "core/math/transform.h" #include "core/math/transform.h"
#include "core/resource.h"
class PropDataEntry : public Resource { class PropDataEntry : public Resource {
GDCLASS(PropDataEntry, Resource); GDCLASS(PropDataEntry, Resource);
public: public:
Transform get_transform() const; Transform get_transform() const;
void set_transform(const Transform value); void set_transform(const Transform value);
@ -19,7 +18,6 @@ protected:
static void _bind_methods(); static void _bind_methods();
private: private:
Transform _transform; Transform _transform;
}; };

View File

@ -1,6 +1,5 @@
#include "prop_data_light.h" #include "prop_data_light.h"
Color PropDataLight::get_light_color() const { Color PropDataLight::get_light_color() const {
return _light_color; return _light_color;
} }

View File

@ -1,8 +1,8 @@
#ifndef PROP_DATA_MESH_H #ifndef PROP_DATA_MESH_H
#define PROP_DATA_MESH_H #define PROP_DATA_MESH_H
#include "prop_data_entry.h"
#include "core/math/vector3.h" #include "core/math/vector3.h"
#include "prop_data_entry.h"
#include "scene/resources/texture.h" #include "scene/resources/texture.h"

View File

@ -1,8 +1,8 @@
#ifndef PROP_DATA_PROP_H #ifndef PROP_DATA_PROP_H
#define PROP_DATA_PROP_H #define PROP_DATA_PROP_H
#include "prop_data_entry.h"
#include "core/math/vector3.h" #include "core/math/vector3.h"
#include "prop_data_entry.h"
#include "prop_data.h" #include "prop_data.h"

View File

@ -1,8 +1,8 @@
#ifndef PROP_DATA_SCENE_H #ifndef PROP_DATA_SCENE_H
#define PROP_DATA_SCENE_H #define PROP_DATA_SCENE_H
#include "prop_data_entry.h"
#include "core/math/vector3.h" #include "core/math/vector3.h"
#include "prop_data_entry.h"
#include "scene/resources/packed_scene.h" #include "scene/resources/packed_scene.h"

View File

@ -4,34 +4,34 @@
#include "containers/voxelman_unbounded_queue.h" #include "containers/voxelman_unbounded_queue.h"
#include "library/voxel_surface.h" #include "library/voxel_surface.h"
#include "library/voxel_surface_simple.h"
#include "library/voxel_surface_merger.h" #include "library/voxel_surface_merger.h"
#include "library/voxel_surface_simple.h"
#include "library/voxelman_library.h" #include "library/voxelman_library.h"
#include "library/voxelman_library_simple.h"
#include "library/voxelman_library_merger.h" #include "library/voxelman_library_merger.h"
#include "library/voxelman_library_simple.h"
#include "data/voxel_light.h" #include "data/voxel_light.h"
#include "meshers/voxel_mesher.h"
#include "meshers/transvoxel_cell_data.h" #include "meshers/transvoxel_cell_data.h"
#include "meshers/voxel_mesher.h"
#include "meshers/voxel_mesher_transvoxel.h" #include "meshers/voxel_mesher_transvoxel.h"
#include "world/voxel_world.h"
#include "world/voxel_chunk.h"
#include "world/voxel_structure.h"
#include "world/environment_data.h" #include "world/environment_data.h"
#include "world/voxel_chunk.h"
#include "world/voxel_chunk_prop_data.h" #include "world/voxel_chunk_prop_data.h"
#include "world/voxel_structure.h"
#include "world/voxel_world.h"
#include "meshers/cubic_mesher/voxel_mesher_cubic.h"
#include "meshers/cubic_mesher/voxel_cube_points.h" #include "meshers/cubic_mesher/voxel_cube_points.h"
#include "meshers/cubic_mesher/voxel_mesher_cubic.h"
#include "props/prop_data.h" #include "props/prop_data.h"
#include "props/prop_data_entry.h"
#include "props/prop_data_scene.h"
#include "props/prop_data_mesh.h"
#include "props/prop_data_light.h"
#include "props/prop_data_prop.h"
#include "props/prop_data_entity.h" #include "props/prop_data_entity.h"
#include "props/prop_data_entry.h"
#include "props/prop_data_light.h"
#include "props/prop_data_mesh.h"
#include "props/prop_data_prop.h"
#include "props/prop_data_scene.h"
#include "level_generator/voxelman_level_generator.h" #include "level_generator/voxelman_level_generator.h"
@ -40,9 +40,8 @@
#include "clutter/ground_clutter.h" #include "clutter/ground_clutter.h"
#include "clutter/ground_clutter_foliage.h" #include "clutter/ground_clutter_foliage.h"
void register_voxelman_types() { void register_voxelman_types() {
ClassDB::register_class<VoxelmanQueue>();\ ClassDB::register_class<VoxelmanQueue>();
ClassDB::register_class<VoxelmanUnboundedQueue>(); ClassDB::register_class<VoxelmanUnboundedQueue>();
ClassDB::register_class<VoxelMesher>(); ClassDB::register_class<VoxelMesher>();
@ -84,6 +83,4 @@ void register_voxelman_types() {
} }
void unregister_voxelman_types() { void unregister_voxelman_types() {
} }

View File

@ -1,11 +1,11 @@
#ifndef ENVIRONMENT_DATA_H #ifndef ENVIRONMENT_DATA_H
#define ENVIRONMENT_DATA_H #define ENVIRONMENT_DATA_H
#include "core/resource.h"
#include "core/color.h" #include "core/color.h"
#include "scene/main/node.h" #include "core/resource.h"
#include "scene/3d/world_environment.h"
#include "scene/3d/light.h" #include "scene/3d/light.h"
#include "scene/3d/world_environment.h"
#include "scene/main/node.h"
class EnvironmentData : public Resource { class EnvironmentData : public Resource {
GDCLASS(EnvironmentData, Resource); GDCLASS(EnvironmentData, Resource);

View File

@ -842,7 +842,6 @@ void VoxelChunk::allocate_prop_mesh() {
VS::get_singleton()->instance_set_transform(_prop_mesh_instance_rid, Transform(Basis(), Vector3(_position_x * _size_x * _voxel_scale, _position_y * _size_y * _voxel_scale, _position_z * _size_z * _voxel_scale))); VS::get_singleton()->instance_set_transform(_prop_mesh_instance_rid, Transform(Basis(), Vector3(_position_x * _size_x * _voxel_scale, _position_y * _size_y * _voxel_scale, _position_z * _size_z * _voxel_scale)));
} }
void VoxelChunk::free_prop_mesh() { void VoxelChunk::free_prop_mesh() {
if (_prop_mesh_instance_rid != RID()) { if (_prop_mesh_instance_rid != RID()) {
VS::get_singleton()->free(_prop_mesh_instance_rid); VS::get_singleton()->free(_prop_mesh_instance_rid);
@ -1186,7 +1185,6 @@ void VoxelChunk::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_size_z"), &VoxelChunk::get_size_z); ClassDB::bind_method(D_METHOD("get_size_z"), &VoxelChunk::get_size_z);
ADD_PROPERTY(PropertyInfo(Variant::INT, "size_z"), "", "get_size_z"); ADD_PROPERTY(PropertyInfo(Variant::INT, "size_z"), "", "get_size_z");
ClassDB::bind_method(D_METHOD("get_data_size_x"), &VoxelChunk::get_data_size_x); ClassDB::bind_method(D_METHOD("get_data_size_x"), &VoxelChunk::get_data_size_x);
ADD_PROPERTY(PropertyInfo(Variant::INT, "data_size_x"), "", "get_data_size_x"); ADD_PROPERTY(PropertyInfo(Variant::INT, "data_size_x"), "", "get_data_size_x");
@ -1196,7 +1194,6 @@ void VoxelChunk::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_data_size_z"), &VoxelChunk::get_data_size_z); ClassDB::bind_method(D_METHOD("get_data_size_z"), &VoxelChunk::get_data_size_z);
ADD_PROPERTY(PropertyInfo(Variant::INT, "data_size_z"), "", "get_data_size_z"); ADD_PROPERTY(PropertyInfo(Variant::INT, "data_size_z"), "", "get_data_size_z");
ClassDB::bind_method(D_METHOD("get_position"), &VoxelChunk::get_position); ClassDB::bind_method(D_METHOD("get_position"), &VoxelChunk::get_position);
ClassDB::bind_method(D_METHOD("get_size"), &VoxelChunk::get_size); ClassDB::bind_method(D_METHOD("get_size"), &VoxelChunk::get_size);
ClassDB::bind_method(D_METHOD("set_position", "x", "y", "z"), &VoxelChunk::set_position); ClassDB::bind_method(D_METHOD("set_position", "x", "y", "z"), &VoxelChunk::set_position);
@ -1204,7 +1201,6 @@ void VoxelChunk::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_margin_start"), &VoxelChunk::get_margin_start); ClassDB::bind_method(D_METHOD("get_margin_start"), &VoxelChunk::get_margin_start);
ClassDB::bind_method(D_METHOD("get_margin_end"), &VoxelChunk::get_margin_end); ClassDB::bind_method(D_METHOD("get_margin_end"), &VoxelChunk::get_margin_end);
ClassDB::bind_method(D_METHOD("get_library"), &VoxelChunk::get_library); ClassDB::bind_method(D_METHOD("get_library"), &VoxelChunk::get_library);
ClassDB::bind_method(D_METHOD("set_library", "value"), &VoxelChunk::set_library); ClassDB::bind_method(D_METHOD("set_library", "value"), &VoxelChunk::set_library);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "library", PROPERTY_HINT_RESOURCE_TYPE, "VoxelmanLibrary"), "set_library", "get_library"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "library", PROPERTY_HINT_RESOURCE_TYPE, "VoxelmanLibrary"), "set_library", "get_library");
@ -1385,5 +1381,4 @@ void VoxelChunk::_bind_methods() {
BIND_ENUM_CONSTANT(DEFAULT_CHANNEL_LIQUID_FILL); BIND_ENUM_CONSTANT(DEFAULT_CHANNEL_LIQUID_FILL);
BIND_ENUM_CONSTANT(DEFAULT_CHANNEL_LIQUID_FLOW); BIND_ENUM_CONSTANT(DEFAULT_CHANNEL_LIQUID_FLOW);
BIND_ENUM_CONSTANT(MAX_DEFAULT_CHANNELS); BIND_ENUM_CONSTANT(MAX_DEFAULT_CHANNELS);
} }

View File

@ -4,17 +4,17 @@
#include "scene/3d/spatial.h" #include "scene/3d/spatial.h"
#include "core/engine.h" #include "core/engine.h"
#include "core/ustring.h"
#include "core/os/thread.h" #include "core/os/thread.h"
#include "core/os/thread_safe.h" #include "core/os/thread_safe.h"
#include "core/ustring.h"
#include "scene/3d/mesh_instance.h"
#include "scene/resources/packed_scene.h"
#include "core/array.h" #include "core/array.h"
#include "scene/3d/collision_shape.h" #include "scene/3d/collision_shape.h"
#include "scene/3d/mesh_instance.h"
#include "scene/3d/physics_body.h" #include "scene/3d/physics_body.h"
#include "scene/resources/concave_polygon_shape.h"
#include "scene/3d/spatial.h" #include "scene/3d/spatial.h"
#include "scene/resources/concave_polygon_shape.h"
#include "scene/resources/packed_scene.h"
#include "voxel_world.h" #include "voxel_world.h"
@ -29,9 +29,9 @@
#include "../../mesh_data_resource/mesh_data_resource.h" #include "../../mesh_data_resource/mesh_data_resource.h"
#include "../props/prop_data.h" #include "../props/prop_data.h"
#include "../props/prop_data_entry.h" #include "../props/prop_data_entry.h"
#include "../props/prop_data_scene.h"
#include "../props/prop_data_mesh.h"
#include "../props/prop_data_light.h" #include "../props/prop_data_light.h"
#include "../props/prop_data_mesh.h"
#include "../props/prop_data_scene.h"
#include "voxel_chunk_prop_data.h" #include "voxel_chunk_prop_data.h"
class VoxelWorld; class VoxelWorld;

View File

@ -1,14 +1,14 @@
#ifndef VOXEL_CHUNK_PROP_DATA_H #ifndef VOXEL_CHUNK_PROP_DATA_H
#define VOXEL_CHUNK_PROP_DATA_H #define VOXEL_CHUNK_PROP_DATA_H
#include "core/reference.h"
#include "core/math/vector3.h" #include "core/math/vector3.h"
#include "core/reference.h"
#include "scene/resources/texture.h" #include "../../mesh_data_resource/mesh_data_resource.h"
#include "scene/resources/packed_scene.h"
#include "../props/prop_data.h" #include "../props/prop_data.h"
#include "../props/prop_data_light.h" #include "../props/prop_data_light.h"
#include "../../mesh_data_resource/mesh_data_resource.h" #include "scene/resources/packed_scene.h"
#include "scene/resources/texture.h"
class VoxelChunkPropData : public Reference { class VoxelChunkPropData : public Reference {
GDCLASS(VoxelChunkPropData, Reference); GDCLASS(VoxelChunkPropData, Reference);

View File

@ -71,7 +71,6 @@ void VoxelStructure::set_voxel(int value, int x, int y, int z, unsigned int chan
} }
void add_chunk_bind(Node *chunk, const int x, const int y, const int z) { void add_chunk_bind(Node *chunk, const int x, const int y, const int z) {
} }
void VoxelStructure::add_chunk(VoxelChunk *chunk, const int x, const int y, const int z) { void VoxelStructure::add_chunk(VoxelChunk *chunk, const int x, const int y, const int z) {
//_chunks.set(Vector3i(x, y, z), chunk); //_chunks.set(Vector3i(x, y, z), chunk);

View File

@ -19,7 +19,6 @@ public:
int get_chunk_size_z() const; int get_chunk_size_z() const;
void set_chunk_size_z(const int value); void set_chunk_size_z(const int value);
int get_world_position_x() const; int get_world_position_x() const;
void set_world_position_x(const int value); void set_world_position_x(const int value);

View File

@ -199,7 +199,6 @@ int VoxelWorld::get_generation_size() {
return _generating.size(); return _generating.size();
} }
void VoxelWorld::clear() { void VoxelWorld::clear() {
for (int i = 0; i < _chunks_vector.size(); ++i) { for (int i = 0; i < _chunks_vector.size(); ++i) {
_chunks_vector.get(i)->queue_delete(); _chunks_vector.get(i)->queue_delete();
@ -263,7 +262,6 @@ void VoxelWorld::generate_chunk(VoxelChunk *p_chunk) {
if (has_method("_prepare_chunk_for_generation")) if (has_method("_prepare_chunk_for_generation"))
call("_prepare_chunk_for_generation", p_chunk); call("_prepare_chunk_for_generation", p_chunk);
call("_generate_chunk", p_chunk); call("_generate_chunk", p_chunk);
p_chunk->build(); p_chunk->build();

View File

@ -1,13 +1,13 @@
#ifndef VOXEL_WORLD_H #ifndef VOXEL_WORLD_H
#define VOXEL_WORLD_H #define VOXEL_WORLD_H
#include "scene/3d/navigation.h"
#include "core/hash_map.h"
#include "core/engine.h" #include "core/engine.h"
#include "core/hash_map.h"
#include "scene/3d/navigation.h"
#include "../library/voxelman_library.h"
#include "../level_generator/voxelman_level_generator.h"
#include "../areas/world_area.h" #include "../areas/world_area.h"
#include "../level_generator/voxelman_level_generator.h"
#include "../library/voxelman_library.h"
#include "core/os/os.h" #include "core/os/os.h"