From 2c49d2e8d9c64d52466df07db00145a62f9664f8 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 7 Nov 2019 21:32:31 +0100 Subject: [PATCH] Renamed VoxelmanProp to PropData. --- SCsub | 14 ++-- props/prop_data.cpp | 83 +++++++++++++++++++ props/{voxelman_prop.h => prop_data.h} | 22 ++--- props/prop_data_entity.cpp | 33 ++++++++ ...elman_prop_entity.h => prop_data_entity.h} | 14 ++-- props/prop_data_entry.cpp | 21 +++++ ...oxelman_prop_entry.h => prop_data_entry.h} | 12 +-- props/prop_data_light.cpp | 32 +++++++ ...oxelman_prop_light.h => prop_data_light.h} | 14 ++-- props/prop_data_mesh.cpp | 56 +++++++++++++ ...{voxelman_prop_mesh.h => prop_data_mesh.h} | 14 ++-- props/prop_data_prop.cpp | 45 ++++++++++ props/prop_data_prop.h | 34 ++++++++ props/prop_data_scene.cpp | 45 ++++++++++ ...oxelman_prop_scene.h => prop_data_scene.h} | 14 ++-- props/voxelman_prop.cpp | 83 ------------------- props/voxelman_prop_entity.cpp | 33 -------- props/voxelman_prop_entry.cpp | 21 ----- props/voxelman_prop_light.cpp | 32 ------- props/voxelman_prop_mesh.cpp | 56 ------------- props/voxelman_prop_prop.cpp | 45 ---------- props/voxelman_prop_prop.h | 34 -------- props/voxelman_prop_scene.cpp | 45 ---------- register_types.cpp | 28 +++---- world/voxel_chunk.h | 10 +-- world/voxel_chunk_prop_data.cpp | 12 +-- world/voxel_chunk_prop_data.h | 16 ++-- 27 files changed, 434 insertions(+), 434 deletions(-) create mode 100644 props/prop_data.cpp rename props/{voxelman_prop.h => prop_data.h} (52%) create mode 100644 props/prop_data_entity.cpp rename props/{voxelman_prop_entity.h => prop_data_entity.h} (50%) create mode 100644 props/prop_data_entry.cpp rename props/{voxelman_prop_entry.h => prop_data_entry.h} (56%) create mode 100644 props/prop_data_light.cpp rename props/{voxelman_prop_light.h => prop_data_light.h} (54%) create mode 100644 props/prop_data_mesh.cpp rename props/{voxelman_prop_mesh.h => prop_data_mesh.h} (72%) create mode 100644 props/prop_data_prop.cpp create mode 100644 props/prop_data_prop.h create mode 100644 props/prop_data_scene.cpp rename props/{voxelman_prop_scene.h => prop_data_scene.h} (64%) delete mode 100644 props/voxelman_prop.cpp delete mode 100644 props/voxelman_prop_entity.cpp delete mode 100644 props/voxelman_prop_entry.cpp delete mode 100644 props/voxelman_prop_light.cpp delete mode 100644 props/voxelman_prop_mesh.cpp delete mode 100644 props/voxelman_prop_prop.cpp delete mode 100644 props/voxelman_prop_prop.h delete mode 100644 props/voxelman_prop_scene.cpp diff --git a/SCsub b/SCsub index e7f6c4e..6eb3a58 100644 --- a/SCsub +++ b/SCsub @@ -26,12 +26,12 @@ env.add_source_files(env.modules_sources,"world/voxel_chunk_prop_data.cpp") env.add_source_files(env.modules_sources,"meshers/cubic_mesher/voxel_mesher_cubic.cpp") env.add_source_files(env.modules_sources,"meshers/cubic_mesher/voxel_cube_points.cpp") -env.add_source_files(env.modules_sources,"props/voxelman_prop.cpp") -env.add_source_files(env.modules_sources,"props/voxelman_prop_entry.cpp") -env.add_source_files(env.modules_sources,"props/voxelman_prop_scene.cpp") -env.add_source_files(env.modules_sources,"props/voxelman_prop_mesh.cpp") -env.add_source_files(env.modules_sources,"props/voxelman_prop_light.cpp") -env.add_source_files(env.modules_sources,"props/voxelman_prop_prop.cpp") -env.add_source_files(env.modules_sources,"props/voxelman_prop_entity.cpp") +env.add_source_files(env.modules_sources,"props/prop_data.cpp") +env.add_source_files(env.modules_sources,"props/prop_data_entry.cpp") +env.add_source_files(env.modules_sources,"props/prop_data_scene.cpp") +env.add_source_files(env.modules_sources,"props/prop_data_mesh.cpp") +env.add_source_files(env.modules_sources,"props/prop_data_light.cpp") +env.add_source_files(env.modules_sources,"props/prop_data_prop.cpp") +env.add_source_files(env.modules_sources,"props/prop_data_entity.cpp") env.add_source_files(env.modules_sources,"level_generator/voxelman_level_generator.cpp") diff --git a/props/prop_data.cpp b/props/prop_data.cpp new file mode 100644 index 0000000..071c4c8 --- /dev/null +++ b/props/prop_data.cpp @@ -0,0 +1,83 @@ +#include "prop_data.h" + +bool PropData::get_snap_to_mesh() { + return _snap_to_mesh; +} +void PropData::set_snap_to_mesh(bool value) { + _snap_to_mesh = value; +} + +Vector3 PropData::get_snap_axis() { + return _snap_axis; +} +void PropData::set_snap_axis(Vector3 value) { + _snap_axis = value; +} + +Ref PropData::get_prop(const int index) const { + ERR_FAIL_INDEX_V(index, _props.size(), Ref()); + + return _props.get(index); +} +void PropData::set_prop(const int index, const Ref prop) { + ERR_FAIL_INDEX(index, _props.size()); + + _props.set(index, prop); +} +void PropData::add_prop(const Ref prop) { + _props.push_back(prop); +} +void PropData::remove_prop(const int index) { + ERR_FAIL_INDEX(index, _props.size()); + + _props.remove(index); +} + +int PropData::get_prop_count() const { + return _props.size(); +} + +Vector PropData::get_props() { + Vector r; + for (int i = 0; i < _props.size(); i++) { + r.push_back(_props[i].get_ref_ptr()); + } + return r; +} +void PropData::set_props(const Vector &props) { + _props.clear(); + for (int i = 0; i < props.size(); i++) { + Ref prop = Ref(props[i]); + + _props.push_back(prop); + } +} + +PropData::PropData() { + _snap_to_mesh = false; + _snap_axis = Vector3(0, -1, 0); +} +PropData::~PropData() { + _props.clear(); +} + +void PropData::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_snap_to_mesh"), &PropData::get_snap_to_mesh); + ClassDB::bind_method(D_METHOD("set_snap_to_mesh", "value"), &PropData::set_snap_to_mesh); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_to_mesh"), "set_snap_to_mesh", "get_snap_to_mesh"); + + ClassDB::bind_method(D_METHOD("get_snap_axis"), &PropData::get_snap_axis); + ClassDB::bind_method(D_METHOD("set_snap_axis", "value"), &PropData::set_snap_axis); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis"); + + ClassDB::bind_method(D_METHOD("get_prop", "index"), &PropData::get_prop); + ClassDB::bind_method(D_METHOD("set_prop", "index", "spell"), &PropData::set_prop); + ClassDB::bind_method(D_METHOD("add_prop", "prop"), &PropData::add_prop); + ClassDB::bind_method(D_METHOD("remove_prop", "index"), &PropData::remove_prop); + + ClassDB::bind_method(D_METHOD("get_prop_count"), &PropData::get_prop_count); + + ClassDB::bind_method(D_METHOD("get_props"), &PropData::get_props); + ClassDB::bind_method(D_METHOD("set_props", "props"), &PropData::set_props); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "props", PROPERTY_HINT_NONE, "17/17:PropDataEntry", PROPERTY_USAGE_DEFAULT, "PropDataEntry"), "set_props", "get_props"); +} diff --git a/props/voxelman_prop.h b/props/prop_data.h similarity index 52% rename from props/voxelman_prop.h rename to props/prop_data.h index 2d5bf05..4000c4b 100644 --- a/props/voxelman_prop.h +++ b/props/prop_data.h @@ -1,13 +1,13 @@ -#ifndef VOXELMAN_PROP_H -#define VOXELMAN_PROP_H +#ifndef PROP_DATA_H +#define PROP_DATA_H #include "core/reference.h" #include "core/vector.h" -#include "voxelman_prop_entry.h" +#include "prop_data_entry.h" -class VoxelmanProp : public Resource { - GDCLASS(VoxelmanProp, Resource); +class PropData : public Resource { + GDCLASS(PropData, Resource); public: bool get_snap_to_mesh(); @@ -16,9 +16,9 @@ public: Vector3 get_snap_axis(); void set_snap_axis(Vector3 value); - Ref get_prop(const int index) const; - void set_prop(const int index, const Ref prop); - void add_prop(const Ref prop); + Ref get_prop(const int index) const; + void set_prop(const int index, const Ref prop); + void add_prop(const Ref prop); void remove_prop(const int index); int get_prop_count() const; @@ -26,8 +26,8 @@ public: Vector get_props(); void set_props(const Vector &props); - VoxelmanProp(); - ~VoxelmanProp(); + PropData(); + ~PropData(); protected: static void _bind_methods(); @@ -36,7 +36,7 @@ private: bool _snap_to_mesh; Vector3 _snap_axis; - Vector > _props; + Vector > _props; }; #endif diff --git a/props/prop_data_entity.cpp b/props/prop_data_entity.cpp new file mode 100644 index 0000000..1419a84 --- /dev/null +++ b/props/prop_data_entity.cpp @@ -0,0 +1,33 @@ +#include "prop_data_entity.h" + + +int PropDataEntity::get_entity_data_id() const { + return _entity_data_id; +} +void PropDataEntity::set_entity_data_id(const int value) { + _entity_data_id = value; +} + +int PropDataEntity::get_level() const { + return _level; +} +void PropDataEntity::set_level(const int value) { + _level = value; +} + +PropDataEntity::PropDataEntity() { + _entity_data_id = 0; + _level = 1; +} +PropDataEntity::~PropDataEntity() { +} + +void PropDataEntity::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_entity_data_id"), &PropDataEntity::get_entity_data_id); + ClassDB::bind_method(D_METHOD("set_entity_data_id", "value"), &PropDataEntity::set_entity_data_id); + ADD_PROPERTY(PropertyInfo(Variant::INT, "entity_data_id"), "set_entity_data_id", "get_entity_data_id"); + + ClassDB::bind_method(D_METHOD("get_level"), &PropDataEntity::get_level); + ClassDB::bind_method(D_METHOD("set_level", "value"), &PropDataEntity::set_level); + ADD_PROPERTY(PropertyInfo(Variant::INT, "level"), "set_level", "get_level"); +} diff --git a/props/voxelman_prop_entity.h b/props/prop_data_entity.h similarity index 50% rename from props/voxelman_prop_entity.h rename to props/prop_data_entity.h index b635a22..90da5b3 100644 --- a/props/voxelman_prop_entity.h +++ b/props/prop_data_entity.h @@ -1,10 +1,10 @@ -#ifndef VOXELMAN_PROP_ENTITY_H -#define VOXELMAN_PROP_ENTITY_H +#ifndef PROP_DATA_ENTITY_H +#define PROP_DATA_ENTITY_H -#include "voxelman_prop_entry.h" +#include "prop_data_entry.h" -class VoxelmanPropEntity : public VoxelmanPropEntry { - GDCLASS(VoxelmanPropEntity, VoxelmanPropEntry); +class PropDataEntity : public PropDataEntry { + GDCLASS(PropDataEntity, PropDataEntry); public: int get_entity_data_id() const; @@ -13,8 +13,8 @@ public: int get_level() const; void set_level(const int value); - VoxelmanPropEntity(); - ~VoxelmanPropEntity(); + PropDataEntity(); + ~PropDataEntity(); protected: static void _bind_methods(); diff --git a/props/prop_data_entry.cpp b/props/prop_data_entry.cpp new file mode 100644 index 0000000..74cfac6 --- /dev/null +++ b/props/prop_data_entry.cpp @@ -0,0 +1,21 @@ +#include "prop_data_entry.h" + +Transform PropDataEntry::get_transform() const { + return _transform; +} +void PropDataEntry::set_transform(const Transform value) { + _transform = value; +} + +PropDataEntry::PropDataEntry() { + +} +PropDataEntry::~PropDataEntry() { + +} + +void PropDataEntry::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_transform"), &PropDataEntry::get_transform); + ClassDB::bind_method(D_METHOD("set_transform", "value"), &PropDataEntry::set_transform); + ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "transform"), "set_transform", "get_transform"); +} diff --git a/props/voxelman_prop_entry.h b/props/prop_data_entry.h similarity index 56% rename from props/voxelman_prop_entry.h rename to props/prop_data_entry.h index 768b83a..e04ed14 100644 --- a/props/voxelman_prop_entry.h +++ b/props/prop_data_entry.h @@ -1,19 +1,19 @@ -#ifndef VOXELMAN_PROP_DATA_H -#define VOXELMAN_PROP_DATA_H +#ifndef PROP_DATA_DATA_H +#define PROP_DATA_DATA_H #include "core/resource.h" #include "core/math/transform.h" -class VoxelmanPropEntry : public Resource { - GDCLASS(VoxelmanPropEntry, Resource); +class PropDataEntry : public Resource { + GDCLASS(PropDataEntry, Resource); public: Transform get_transform() const; void set_transform(const Transform value); - VoxelmanPropEntry(); - ~VoxelmanPropEntry(); + PropDataEntry(); + ~PropDataEntry(); protected: static void _bind_methods(); diff --git a/props/prop_data_light.cpp b/props/prop_data_light.cpp new file mode 100644 index 0000000..34f48eb --- /dev/null +++ b/props/prop_data_light.cpp @@ -0,0 +1,32 @@ +#include "prop_data_light.h" + + +Color PropDataLight::get_light_color() const { + return _light_color; +} +void PropDataLight::set_light_color(const Color value) { + _light_color = value; +} + +int PropDataLight::get_light_size() const { + return _light_size; +} +void PropDataLight::set_light_size(const int value) { + _light_size = value; +} + +PropDataLight::PropDataLight() { + _light_size = 5; +} +PropDataLight::~PropDataLight() { +} + +void PropDataLight::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_light_color"), &PropDataLight::get_light_color); + ClassDB::bind_method(D_METHOD("set_light_color", "value"), &PropDataLight::set_light_color); + ADD_PROPERTY(PropertyInfo(Variant::COLOR, "light_color"), "set_light_color", "get_light_color"); + + ClassDB::bind_method(D_METHOD("get_light_size"), &PropDataLight::get_light_size); + ClassDB::bind_method(D_METHOD("set_light_size", "value"), &PropDataLight::set_light_size); + ADD_PROPERTY(PropertyInfo(Variant::INT, "light_size"), "set_light_size", "get_light_size"); +} diff --git a/props/voxelman_prop_light.h b/props/prop_data_light.h similarity index 54% rename from props/voxelman_prop_light.h rename to props/prop_data_light.h index 5664dd8..22ea7f9 100644 --- a/props/voxelman_prop_light.h +++ b/props/prop_data_light.h @@ -1,12 +1,12 @@ -#ifndef VOXELMAN_PROP_LIGHT_H -#define VOXELMAN_PROP_LIGHT_H +#ifndef PROP_DATA_LIGHT_H +#define PROP_DATA_LIGHT_H -#include "voxelman_prop_entry.h" +#include "prop_data_entry.h" #include "core/color.h" -class VoxelmanPropLight : public VoxelmanPropEntry { - GDCLASS(VoxelmanPropLight, VoxelmanPropEntry); +class PropDataLight : public PropDataEntry { + GDCLASS(PropDataLight, PropDataEntry); public: Color get_light_color() const; @@ -15,8 +15,8 @@ public: int get_light_size() const; void set_light_size(const int value); - VoxelmanPropLight(); - ~VoxelmanPropLight(); + PropDataLight(); + ~PropDataLight(); protected: static void _bind_methods(); diff --git a/props/prop_data_mesh.cpp b/props/prop_data_mesh.cpp new file mode 100644 index 0000000..16413c1 --- /dev/null +++ b/props/prop_data_mesh.cpp @@ -0,0 +1,56 @@ +#include "prop_data_mesh.h" + +Ref PropDataMesh::get_mesh() const { + return _mesh; +} +void PropDataMesh::set_mesh(const Ref mesh) { + _mesh = mesh; +} + +Ref PropDataMesh::get_texture() const { + return _texture; +} +void PropDataMesh::set_texture(const Ref texture) { + _texture = texture; +} + +bool PropDataMesh::get_snap_to_mesh() { + return _snap_to_mesh; +} +void PropDataMesh::set_snap_to_mesh(bool value) { + _snap_to_mesh = value; +} + +Vector3 PropDataMesh::get_snap_axis() { + return _snap_axis; +} +void PropDataMesh::set_snap_axis(Vector3 value) { + _snap_axis = value; +} + +PropDataMesh::PropDataMesh() { + _snap_to_mesh = true; + _snap_axis = Vector3(0, 1, 0); +} +PropDataMesh::~PropDataMesh() { + if (_mesh.is_valid()) + _mesh.unref(); +} + +void PropDataMesh::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_mesh"), &PropDataMesh::get_mesh); + ClassDB::bind_method(D_METHOD("set_mesh", "value"), &PropDataMesh::set_mesh); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "MeshDataResource"), "set_mesh", "get_mesh"); + + ClassDB::bind_method(D_METHOD("get_texture"), &PropDataMesh::get_texture); + ClassDB::bind_method(D_METHOD("set_texture", "value"), &PropDataMesh::set_texture); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture"); + + ClassDB::bind_method(D_METHOD("get_snap_to_mesh"), &PropDataMesh::get_snap_to_mesh); + ClassDB::bind_method(D_METHOD("set_snap_to_mesh", "value"), &PropDataMesh::set_snap_to_mesh); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_to_mesh"), "set_snap_to_mesh", "get_snap_to_mesh"); + + ClassDB::bind_method(D_METHOD("get_snap_axis"), &PropDataMesh::get_snap_axis); + ClassDB::bind_method(D_METHOD("set_snap_axis", "value"), &PropDataMesh::set_snap_axis); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis"); +} diff --git a/props/voxelman_prop_mesh.h b/props/prop_data_mesh.h similarity index 72% rename from props/voxelman_prop_mesh.h rename to props/prop_data_mesh.h index 41ebb49..1a0927e 100644 --- a/props/voxelman_prop_mesh.h +++ b/props/prop_data_mesh.h @@ -1,15 +1,15 @@ -#ifndef VOXELMAN_PROP_MESH_H -#define VOXELMAN_PROP_MESH_H +#ifndef PROP_DATA_MESH_H +#define PROP_DATA_MESH_H -#include "voxelman_prop_entry.h" +#include "prop_data_entry.h" #include "core/math/vector3.h" #include "scene/resources/texture.h" #include "../../entity_spell_system/meshes/mesh_data_resource.h" -class VoxelmanPropMesh : public VoxelmanPropEntry { - GDCLASS(VoxelmanPropMesh, VoxelmanPropEntry); +class PropDataMesh : public PropDataEntry { + GDCLASS(PropDataMesh, PropDataEntry); public: Ref get_mesh() const; @@ -24,8 +24,8 @@ public: Vector3 get_snap_axis(); void set_snap_axis(Vector3 value); - VoxelmanPropMesh(); - ~VoxelmanPropMesh(); + PropDataMesh(); + ~PropDataMesh(); protected: static void _bind_methods(); diff --git a/props/prop_data_prop.cpp b/props/prop_data_prop.cpp new file mode 100644 index 0000000..a2d2644 --- /dev/null +++ b/props/prop_data_prop.cpp @@ -0,0 +1,45 @@ +#include "prop_data_prop.h" + +Ref PropDataProp::get_prop() const { + return _prop; +} +void PropDataProp::set_prop(const Ref value) { + _prop = value; +} + +bool PropDataProp::get_snap_to_mesh() { + return _snap_to_mesh; +} +void PropDataProp::set_snap_to_mesh(bool value) { + _snap_to_mesh = value; +} + +Vector3 PropDataProp::get_snap_axis() { + return _snap_axis; +} +void PropDataProp::set_snap_axis(Vector3 value) { + _snap_axis = value; +} + +PropDataProp::PropDataProp() { + _snap_to_mesh = false; + _snap_axis = Vector3(0, 1, 0); +} +PropDataProp::~PropDataProp() { + if (_prop.is_valid()) + _prop.unref(); +} + +void PropDataProp::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_prop"), &PropDataProp::get_prop); + ClassDB::bind_method(D_METHOD("set_prop", "value"), &PropDataProp::set_prop); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "prop", PROPERTY_HINT_RESOURCE_TYPE, "PropData"), "set_prop", "get_prop"); + + ClassDB::bind_method(D_METHOD("get_snap_to_mesh"), &PropDataProp::get_snap_to_mesh); + ClassDB::bind_method(D_METHOD("set_snap_to_mesh", "value"), &PropDataProp::set_snap_to_mesh); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_to_mesh"), "set_snap_to_mesh", "get_snap_to_mesh"); + + ClassDB::bind_method(D_METHOD("get_snap_axis"), &PropDataProp::get_snap_axis); + ClassDB::bind_method(D_METHOD("set_snap_axis", "value"), &PropDataProp::set_snap_axis); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis"); +} diff --git a/props/prop_data_prop.h b/props/prop_data_prop.h new file mode 100644 index 0000000..29ff534 --- /dev/null +++ b/props/prop_data_prop.h @@ -0,0 +1,34 @@ +#ifndef PROP_DATA_PROP_H +#define PROP_DATA_PROP_H + +#include "prop_data_entry.h" +#include "core/math/vector3.h" + +#include "prop_data.h" + +class PropDataProp : public PropDataEntry { + GDCLASS(PropDataProp, PropDataEntry); + +public: + Ref get_prop() const; + void set_prop(const Ref value); + + bool get_snap_to_mesh(); + void set_snap_to_mesh(bool value); + + Vector3 get_snap_axis(); + void set_snap_axis(Vector3 value); + + PropDataProp(); + ~PropDataProp(); + +protected: + static void _bind_methods(); + +private: + bool _snap_to_mesh; + Vector3 _snap_axis; + Ref _prop; +}; + +#endif diff --git a/props/prop_data_scene.cpp b/props/prop_data_scene.cpp new file mode 100644 index 0000000..a632be7 --- /dev/null +++ b/props/prop_data_scene.cpp @@ -0,0 +1,45 @@ +#include "prop_data_scene.h" + +Ref PropDataScene::get_scene() const { + return _scene; +} +void PropDataScene::set_scene(const Ref value) { + _scene = value; +} + +bool PropDataScene::get_snap_to_mesh() { + return _snap_to_mesh; +} +void PropDataScene::set_snap_to_mesh(bool value) { + _snap_to_mesh = value; +} + +Vector3 PropDataScene::get_snap_axis() { + return _snap_axis; +} +void PropDataScene::set_snap_axis(Vector3 value) { + _snap_axis = value; +} + +PropDataScene::PropDataScene() { + _snap_to_mesh = true; + _snap_axis = Vector3(0, 1, 0); +} +PropDataScene::~PropDataScene() { + if (_scene.is_valid()) + _scene.unref(); +} + +void PropDataScene::_bind_methods() { + ClassDB::bind_method(D_METHOD("get_scene"), &PropDataScene::get_scene); + ClassDB::bind_method(D_METHOD("set_scene", "value"), &PropDataScene::set_scene); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "scene", PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"), "set_scene", "get_scene"); + + ClassDB::bind_method(D_METHOD("get_snap_to_mesh"), &PropDataScene::get_snap_to_mesh); + ClassDB::bind_method(D_METHOD("set_snap_to_mesh", "value"), &PropDataScene::set_snap_to_mesh); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_to_mesh"), "set_snap_to_mesh", "get_snap_to_mesh"); + + ClassDB::bind_method(D_METHOD("get_snap_axis"), &PropDataScene::get_snap_axis); + ClassDB::bind_method(D_METHOD("set_snap_axis", "value"), &PropDataScene::set_snap_axis); + ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis"); +} diff --git a/props/voxelman_prop_scene.h b/props/prop_data_scene.h similarity index 64% rename from props/voxelman_prop_scene.h rename to props/prop_data_scene.h index 4b96504..adeee34 100644 --- a/props/voxelman_prop_scene.h +++ b/props/prop_data_scene.h @@ -1,13 +1,13 @@ -#ifndef VOXELMAN_PROP_SCENE_H -#define VOXELMAN_PROP_SCENE_H +#ifndef PROP_DATA_SCENE_H +#define PROP_DATA_SCENE_H -#include "voxelman_prop_entry.h" +#include "prop_data_entry.h" #include "core/math/vector3.h" #include "scene/resources/packed_scene.h" -class VoxelmanPropScene : public VoxelmanPropEntry { - GDCLASS(VoxelmanPropScene, VoxelmanPropEntry); +class PropDataScene : public PropDataEntry { + GDCLASS(PropDataScene, PropDataEntry); public: Ref get_scene() const; @@ -19,8 +19,8 @@ public: Vector3 get_snap_axis(); void set_snap_axis(Vector3 value); - VoxelmanPropScene(); - ~VoxelmanPropScene(); + PropDataScene(); + ~PropDataScene(); protected: static void _bind_methods(); diff --git a/props/voxelman_prop.cpp b/props/voxelman_prop.cpp deleted file mode 100644 index 9987682..0000000 --- a/props/voxelman_prop.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include "voxelman_prop.h" - -bool VoxelmanProp::get_snap_to_mesh() { - return _snap_to_mesh; -} -void VoxelmanProp::set_snap_to_mesh(bool value) { - _snap_to_mesh = value; -} - -Vector3 VoxelmanProp::get_snap_axis() { - return _snap_axis; -} -void VoxelmanProp::set_snap_axis(Vector3 value) { - _snap_axis = value; -} - -Ref VoxelmanProp::get_prop(const int index) const { - ERR_FAIL_INDEX_V(index, _props.size(), Ref()); - - return _props.get(index); -} -void VoxelmanProp::set_prop(const int index, const Ref prop) { - ERR_FAIL_INDEX(index, _props.size()); - - _props.set(index, prop); -} -void VoxelmanProp::add_prop(const Ref prop) { - _props.push_back(prop); -} -void VoxelmanProp::remove_prop(const int index) { - ERR_FAIL_INDEX(index, _props.size()); - - _props.remove(index); -} - -int VoxelmanProp::get_prop_count() const { - return _props.size(); -} - -Vector VoxelmanProp::get_props() { - Vector r; - for (int i = 0; i < _props.size(); i++) { - r.push_back(_props[i].get_ref_ptr()); - } - return r; -} -void VoxelmanProp::set_props(const Vector &props) { - _props.clear(); - for (int i = 0; i < props.size(); i++) { - Ref prop = Ref(props[i]); - - _props.push_back(prop); - } -} - -VoxelmanProp::VoxelmanProp() { - _snap_to_mesh = false; - _snap_axis = Vector3(0, -1, 0); -} -VoxelmanProp::~VoxelmanProp() { - _props.clear(); -} - -void VoxelmanProp::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_snap_to_mesh"), &VoxelmanProp::get_snap_to_mesh); - ClassDB::bind_method(D_METHOD("set_snap_to_mesh", "value"), &VoxelmanProp::set_snap_to_mesh); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_to_mesh"), "set_snap_to_mesh", "get_snap_to_mesh"); - - ClassDB::bind_method(D_METHOD("get_snap_axis"), &VoxelmanProp::get_snap_axis); - ClassDB::bind_method(D_METHOD("set_snap_axis", "value"), &VoxelmanProp::set_snap_axis); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis"); - - ClassDB::bind_method(D_METHOD("get_prop", "index"), &VoxelmanProp::get_prop); - ClassDB::bind_method(D_METHOD("set_prop", "index", "spell"), &VoxelmanProp::set_prop); - ClassDB::bind_method(D_METHOD("add_prop", "prop"), &VoxelmanProp::add_prop); - ClassDB::bind_method(D_METHOD("remove_prop", "index"), &VoxelmanProp::remove_prop); - - ClassDB::bind_method(D_METHOD("get_prop_count"), &VoxelmanProp::get_prop_count); - - ClassDB::bind_method(D_METHOD("get_props"), &VoxelmanProp::get_props); - ClassDB::bind_method(D_METHOD("set_props", "props"), &VoxelmanProp::set_props); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "props", PROPERTY_HINT_NONE, "17/17:VoxelmanPropEntry", PROPERTY_USAGE_DEFAULT, "VoxelmanPropEntry"), "set_props", "get_props"); -} diff --git a/props/voxelman_prop_entity.cpp b/props/voxelman_prop_entity.cpp deleted file mode 100644 index a3865e2..0000000 --- a/props/voxelman_prop_entity.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "voxelman_prop_entity.h" - - -int VoxelmanPropEntity::get_entity_data_id() const { - return _entity_data_id; -} -void VoxelmanPropEntity::set_entity_data_id(const int value) { - _entity_data_id = value; -} - -int VoxelmanPropEntity::get_level() const { - return _level; -} -void VoxelmanPropEntity::set_level(const int value) { - _level = value; -} - -VoxelmanPropEntity::VoxelmanPropEntity() { - _entity_data_id = 0; - _level = 1; -} -VoxelmanPropEntity::~VoxelmanPropEntity() { -} - -void VoxelmanPropEntity::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_entity_data_id"), &VoxelmanPropEntity::get_entity_data_id); - ClassDB::bind_method(D_METHOD("set_entity_data_id", "value"), &VoxelmanPropEntity::set_entity_data_id); - ADD_PROPERTY(PropertyInfo(Variant::INT, "entity_data_id"), "set_entity_data_id", "get_entity_data_id"); - - ClassDB::bind_method(D_METHOD("get_level"), &VoxelmanPropEntity::get_level); - ClassDB::bind_method(D_METHOD("set_level", "value"), &VoxelmanPropEntity::set_level); - ADD_PROPERTY(PropertyInfo(Variant::INT, "level"), "set_level", "get_level"); -} diff --git a/props/voxelman_prop_entry.cpp b/props/voxelman_prop_entry.cpp deleted file mode 100644 index 29f46e9..0000000 --- a/props/voxelman_prop_entry.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "voxelman_prop_entry.h" - -Transform VoxelmanPropEntry::get_transform() const { - return _transform; -} -void VoxelmanPropEntry::set_transform(const Transform value) { - _transform = value; -} - -VoxelmanPropEntry::VoxelmanPropEntry() { - -} -VoxelmanPropEntry::~VoxelmanPropEntry() { - -} - -void VoxelmanPropEntry::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_transform"), &VoxelmanPropEntry::get_transform); - ClassDB::bind_method(D_METHOD("set_transform", "value"), &VoxelmanPropEntry::set_transform); - ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM, "transform"), "set_transform", "get_transform"); -} diff --git a/props/voxelman_prop_light.cpp b/props/voxelman_prop_light.cpp deleted file mode 100644 index a3e8da5..0000000 --- a/props/voxelman_prop_light.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "voxelman_prop_light.h" - - -Color VoxelmanPropLight::get_light_color() const { - return _light_color; -} -void VoxelmanPropLight::set_light_color(const Color value) { - _light_color = value; -} - -int VoxelmanPropLight::get_light_size() const { - return _light_size; -} -void VoxelmanPropLight::set_light_size(const int value) { - _light_size = value; -} - -VoxelmanPropLight::VoxelmanPropLight() { - _light_size = 5; -} -VoxelmanPropLight::~VoxelmanPropLight() { -} - -void VoxelmanPropLight::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_light_color"), &VoxelmanPropLight::get_light_color); - ClassDB::bind_method(D_METHOD("set_light_color", "value"), &VoxelmanPropLight::set_light_color); - ADD_PROPERTY(PropertyInfo(Variant::COLOR, "light_color"), "set_light_color", "get_light_color"); - - ClassDB::bind_method(D_METHOD("get_light_size"), &VoxelmanPropLight::get_light_size); - ClassDB::bind_method(D_METHOD("set_light_size", "value"), &VoxelmanPropLight::set_light_size); - ADD_PROPERTY(PropertyInfo(Variant::INT, "light_size"), "set_light_size", "get_light_size"); -} diff --git a/props/voxelman_prop_mesh.cpp b/props/voxelman_prop_mesh.cpp deleted file mode 100644 index 9b550ec..0000000 --- a/props/voxelman_prop_mesh.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include "voxelman_prop_mesh.h" - -Ref VoxelmanPropMesh::get_mesh() const { - return _mesh; -} -void VoxelmanPropMesh::set_mesh(const Ref mesh) { - _mesh = mesh; -} - -Ref VoxelmanPropMesh::get_texture() const { - return _texture; -} -void VoxelmanPropMesh::set_texture(const Ref texture) { - _texture = texture; -} - -bool VoxelmanPropMesh::get_snap_to_mesh() { - return _snap_to_mesh; -} -void VoxelmanPropMesh::set_snap_to_mesh(bool value) { - _snap_to_mesh = value; -} - -Vector3 VoxelmanPropMesh::get_snap_axis() { - return _snap_axis; -} -void VoxelmanPropMesh::set_snap_axis(Vector3 value) { - _snap_axis = value; -} - -VoxelmanPropMesh::VoxelmanPropMesh() { - _snap_to_mesh = true; - _snap_axis = Vector3(0, 1, 0); -} -VoxelmanPropMesh::~VoxelmanPropMesh() { - if (_mesh.is_valid()) - _mesh.unref(); -} - -void VoxelmanPropMesh::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_mesh"), &VoxelmanPropMesh::get_mesh); - ClassDB::bind_method(D_METHOD("set_mesh", "value"), &VoxelmanPropMesh::set_mesh); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "MeshDataResource"), "set_mesh", "get_mesh"); - - ClassDB::bind_method(D_METHOD("get_texture"), &VoxelmanPropMesh::get_texture); - ClassDB::bind_method(D_METHOD("set_texture", "value"), &VoxelmanPropMesh::set_texture); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture"); - - ClassDB::bind_method(D_METHOD("get_snap_to_mesh"), &VoxelmanPropMesh::get_snap_to_mesh); - ClassDB::bind_method(D_METHOD("set_snap_to_mesh", "value"), &VoxelmanPropMesh::set_snap_to_mesh); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_to_mesh"), "set_snap_to_mesh", "get_snap_to_mesh"); - - ClassDB::bind_method(D_METHOD("get_snap_axis"), &VoxelmanPropMesh::get_snap_axis); - ClassDB::bind_method(D_METHOD("set_snap_axis", "value"), &VoxelmanPropMesh::set_snap_axis); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis"); -} diff --git a/props/voxelman_prop_prop.cpp b/props/voxelman_prop_prop.cpp deleted file mode 100644 index eb8a3ce..0000000 --- a/props/voxelman_prop_prop.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "voxelman_prop_prop.h" - -Ref VoxelmanPropProp::get_prop() const { - return _prop; -} -void VoxelmanPropProp::set_prop(const Ref value) { - _prop = value; -} - -bool VoxelmanPropProp::get_snap_to_mesh() { - return _snap_to_mesh; -} -void VoxelmanPropProp::set_snap_to_mesh(bool value) { - _snap_to_mesh = value; -} - -Vector3 VoxelmanPropProp::get_snap_axis() { - return _snap_axis; -} -void VoxelmanPropProp::set_snap_axis(Vector3 value) { - _snap_axis = value; -} - -VoxelmanPropProp::VoxelmanPropProp() { - _snap_to_mesh = false; - _snap_axis = Vector3(0, 1, 0); -} -VoxelmanPropProp::~VoxelmanPropProp() { - if (_prop.is_valid()) - _prop.unref(); -} - -void VoxelmanPropProp::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_prop"), &VoxelmanPropProp::get_prop); - ClassDB::bind_method(D_METHOD("set_prop", "value"), &VoxelmanPropProp::set_prop); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "prop", PROPERTY_HINT_RESOURCE_TYPE, "VoxelmanProp"), "set_prop", "get_prop"); - - ClassDB::bind_method(D_METHOD("get_snap_to_mesh"), &VoxelmanPropProp::get_snap_to_mesh); - ClassDB::bind_method(D_METHOD("set_snap_to_mesh", "value"), &VoxelmanPropProp::set_snap_to_mesh); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_to_mesh"), "set_snap_to_mesh", "get_snap_to_mesh"); - - ClassDB::bind_method(D_METHOD("get_snap_axis"), &VoxelmanPropProp::get_snap_axis); - ClassDB::bind_method(D_METHOD("set_snap_axis", "value"), &VoxelmanPropProp::set_snap_axis); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis"); -} diff --git a/props/voxelman_prop_prop.h b/props/voxelman_prop_prop.h deleted file mode 100644 index 892282b..0000000 --- a/props/voxelman_prop_prop.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef VOXELMAN_PROP_PROP_H -#define VOXELMAN_PROP_PROP_H - -#include "voxelman_prop_entry.h" -#include "core/math/vector3.h" - -#include "voxelman_prop.h" - -class VoxelmanPropProp : public VoxelmanPropEntry { - GDCLASS(VoxelmanPropProp, VoxelmanPropEntry); - -public: - Ref get_prop() const; - void set_prop(const Ref value); - - bool get_snap_to_mesh(); - void set_snap_to_mesh(bool value); - - Vector3 get_snap_axis(); - void set_snap_axis(Vector3 value); - - VoxelmanPropProp(); - ~VoxelmanPropProp(); - -protected: - static void _bind_methods(); - -private: - bool _snap_to_mesh; - Vector3 _snap_axis; - Ref _prop; -}; - -#endif diff --git a/props/voxelman_prop_scene.cpp b/props/voxelman_prop_scene.cpp deleted file mode 100644 index 9c6416a..0000000 --- a/props/voxelman_prop_scene.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "voxelman_prop_scene.h" - -Ref VoxelmanPropScene::get_scene() const { - return _scene; -} -void VoxelmanPropScene::set_scene(const Ref value) { - _scene = value; -} - -bool VoxelmanPropScene::get_snap_to_mesh() { - return _snap_to_mesh; -} -void VoxelmanPropScene::set_snap_to_mesh(bool value) { - _snap_to_mesh = value; -} - -Vector3 VoxelmanPropScene::get_snap_axis() { - return _snap_axis; -} -void VoxelmanPropScene::set_snap_axis(Vector3 value) { - _snap_axis = value; -} - -VoxelmanPropScene::VoxelmanPropScene() { - _snap_to_mesh = true; - _snap_axis = Vector3(0, 1, 0); -} -VoxelmanPropScene::~VoxelmanPropScene() { - if (_scene.is_valid()) - _scene.unref(); -} - -void VoxelmanPropScene::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_scene"), &VoxelmanPropScene::get_scene); - ClassDB::bind_method(D_METHOD("set_scene", "value"), &VoxelmanPropScene::set_scene); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "scene", PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"), "set_scene", "get_scene"); - - ClassDB::bind_method(D_METHOD("get_snap_to_mesh"), &VoxelmanPropScene::get_snap_to_mesh); - ClassDB::bind_method(D_METHOD("set_snap_to_mesh", "value"), &VoxelmanPropScene::set_snap_to_mesh); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "snap_to_mesh"), "set_snap_to_mesh", "get_snap_to_mesh"); - - ClassDB::bind_method(D_METHOD("get_snap_axis"), &VoxelmanPropScene::get_snap_axis); - ClassDB::bind_method(D_METHOD("set_snap_axis", "value"), &VoxelmanPropScene::set_snap_axis); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "snap_axis"), "set_snap_axis", "get_snap_axis"); -} diff --git a/register_types.cpp b/register_types.cpp index 2f70d76..60f50ac 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -19,13 +19,13 @@ #include "meshers/cubic_mesher/voxel_mesher_cubic.h" #include "meshers/cubic_mesher/voxel_cube_points.h" -#include "props/voxelman_prop.h" -#include "props/voxelman_prop_entry.h" -#include "props/voxelman_prop_scene.h" -#include "props/voxelman_prop_mesh.h" -#include "props/voxelman_prop_light.h" -#include "props/voxelman_prop_prop.h" -#include "props/voxelman_prop_entity.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 "level_generator/voxelman_level_generator.h" @@ -50,13 +50,13 @@ void register_voxelman_types() { ClassDB::register_class(); ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); - ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); ClassDB::register_class(); } diff --git a/world/voxel_chunk.h b/world/voxel_chunk.h index d91ac57..55c242b 100644 --- a/world/voxel_chunk.h +++ b/world/voxel_chunk.h @@ -26,11 +26,11 @@ #include "voxel_buffer.h" #include "../../entity_spell_system/meshes/mesh_data_resource.h" -#include "../props/voxelman_prop.h" -#include "../props/voxelman_prop_entry.h" -#include "../props/voxelman_prop_scene.h" -#include "../props/voxelman_prop_mesh.h" -#include "../props/voxelman_prop_light.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 "voxel_chunk_prop_data.h" class VoxelWorld; diff --git a/world/voxel_chunk_prop_data.cpp b/world/voxel_chunk_prop_data.cpp index 22d05f0..52576ba 100644 --- a/world/voxel_chunk_prop_data.cpp +++ b/world/voxel_chunk_prop_data.cpp @@ -63,17 +63,17 @@ void VoxelChunkPropData::set_mesh_texture(const Ref value) { _texture = value; } -Ref VoxelChunkPropData::get_light() const { +Ref VoxelChunkPropData::get_light() const { return _light; } -void VoxelChunkPropData::set_light(const Ref value) { +void VoxelChunkPropData::set_light(const Ref value) { _light = value; } -Ref VoxelChunkPropData::get_prop() const { +Ref VoxelChunkPropData::get_prop() const { return _prop; } -void VoxelChunkPropData::set_prop(const Ref value) { +void VoxelChunkPropData::set_prop(const Ref value) { _prop = value; } @@ -139,11 +139,11 @@ void VoxelChunkPropData::_bind_methods() { ClassDB::bind_method(D_METHOD("get_light"), &VoxelChunkPropData::get_light); ClassDB::bind_method(D_METHOD("set_light", "value"), &VoxelChunkPropData::set_light); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "VoxelmanPropLight"), "set_light", "get_light"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "light", PROPERTY_HINT_RESOURCE_TYPE, "PropDataLight"), "set_light", "get_light"); ClassDB::bind_method(D_METHOD("get_prop"), &VoxelChunkPropData::get_prop); ClassDB::bind_method(D_METHOD("set_prop", "value"), &VoxelChunkPropData::set_prop); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "prop", PROPERTY_HINT_RESOURCE_TYPE, "VoxelmanProp"), "set_prop", "get_prop"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "prop", PROPERTY_HINT_RESOURCE_TYPE, "PropData"), "set_prop", "get_prop"); ClassDB::bind_method(D_METHOD("get_scene"), &VoxelChunkPropData::get_scene); ClassDB::bind_method(D_METHOD("set_scene", "value"), &VoxelChunkPropData::set_scene); diff --git a/world/voxel_chunk_prop_data.h b/world/voxel_chunk_prop_data.h index 1f694b2..27d1adc 100644 --- a/world/voxel_chunk_prop_data.h +++ b/world/voxel_chunk_prop_data.h @@ -6,8 +6,8 @@ #include "scene/resources/texture.h" #include "scene/resources/packed_scene.h" -#include "../props/voxelman_prop.h" -#include "../props/voxelman_prop_light.h" +#include "../props/prop_data.h" +#include "../props/prop_data_light.h" #include "../../entity_spell_system/meshes/mesh_data_resource.h" class VoxelChunkPropData : public Reference { @@ -41,11 +41,11 @@ public: Ref get_mesh_texture() const; void set_mesh_texture(const Ref value); - Ref get_light() const; - void set_light(const Ref value); + Ref get_light() const; + void set_light(const Ref value); - Ref get_prop() const; - void set_prop(const Ref value); + Ref get_prop() const; + void set_prop(const Ref value); Ref get_scene() const; void set_scene(const Ref value); @@ -68,8 +68,8 @@ private: Ref _mesh; Ref _texture; - Ref _light; - Ref _prop; + Ref _light; + Ref _prop; Ref _scene; };