mirror of
https://github.com/Relintai/terraman.git
synced 2025-04-21 21:41:20 +02:00
Added a new virtual voxel_surface_id_get method to the material cache.
This commit is contained in:
parent
1a395d3dc4
commit
6e7a9ae71b
@ -85,6 +85,9 @@ void TerraMaterialCache::materials_set(const Vector<Variant> &materials) {
|
||||
Ref<TerraSurface> TerraMaterialCache::voxel_surface_get(const int index) {
|
||||
return Ref<TerraSurface>();
|
||||
}
|
||||
Ref<TerraSurface> TerraMaterialCache::voxel_surface_id_get(const int id) {
|
||||
return Ref<TerraSurface>();
|
||||
}
|
||||
void TerraMaterialCache::voxel_surface_add(Ref<TerraSurface> value) {
|
||||
}
|
||||
void TerraMaterialCache::voxel_surface_set(int index, Ref<TerraSurface> value) {
|
||||
@ -130,6 +133,8 @@ void TerraMaterialCache::_bind_methods() {
|
||||
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "materials", PROPERTY_HINT_NONE, "17/17:Material", PROPERTY_USAGE_DEFAULT, "Material"), "materials_set", "materials_get");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("voxel_surface_get", "index"), &TerraMaterialCache::voxel_surface_get);
|
||||
ClassDB::bind_method(D_METHOD("voxel_surface_id_get", "index"), &TerraMaterialCache::voxel_surface_id_get);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("voxel_surface_add", "value"), &TerraMaterialCache::voxel_surface_add);
|
||||
ClassDB::bind_method(D_METHOD("voxel_surface_set", "index", "surface"), &TerraMaterialCache::voxel_surface_set);
|
||||
ClassDB::bind_method(D_METHOD("voxel_surface_remove", "index"), &TerraMaterialCache::voxel_surface_remove);
|
||||
|
@ -60,6 +60,7 @@ public:
|
||||
void materials_set(const Vector<Variant> &materials);
|
||||
|
||||
virtual Ref<TerraSurface> voxel_surface_get(const int index);
|
||||
virtual Ref<TerraSurface> voxel_surface_id_get(const int id);
|
||||
virtual void voxel_surface_add(Ref<TerraSurface> value);
|
||||
virtual void voxel_surface_set(const int index, Ref<TerraSurface> value);
|
||||
virtual void voxel_surface_remove(const int index);
|
||||
|
@ -66,6 +66,9 @@ void TerraMaterialCachePCM::set_margin(const int margin) {
|
||||
Ref<TerraSurface> TerraMaterialCachePCM::voxel_surface_get(const int index) {
|
||||
return Ref<TerraSurface>();
|
||||
}
|
||||
Ref<TerraSurface> TerraMaterialCache::voxel_surface_id_get(const int id) {
|
||||
return Ref<TerraSurface>();
|
||||
}
|
||||
void TerraMaterialCachePCM::voxel_surface_add(Ref<TerraSurface> value) {
|
||||
}
|
||||
void TerraMaterialCachePCM::voxel_surface_set(int index, Ref<TerraSurface> value) {
|
||||
|
@ -65,6 +65,7 @@ public:
|
||||
void set_margin(const int margin);
|
||||
|
||||
Ref<TerraSurface> voxel_surface_get(const int index);
|
||||
Ref<TerraSurface> voxel_surface_id_get(const int id);
|
||||
void voxel_surface_add(Ref<TerraSurface> value);
|
||||
void voxel_surface_set(const int index, Ref<TerraSurface> value);
|
||||
void voxel_surface_remove(const int index);
|
||||
|
Loading…
Reference in New Issue
Block a user