Renamed VoxelMesherTransvoxel to VoxelMesherUVTransvoxel.

This commit is contained in:
Relintai 2020-04-06 14:52:18 +02:00
parent 81dc8bcb36
commit 28ce072e51
4 changed files with 63 additions and 63 deletions

2
SCsub
View File

@ -24,7 +24,7 @@ sources = [
"meshers/voxel_mesher.cpp", "meshers/voxel_mesher.cpp",
"meshers/transvoxel_uv_mesher/transvoxel_cell_data.cpp", "meshers/transvoxel_uv_mesher/transvoxel_cell_data.cpp",
"meshers/transvoxel_uv_mesher/voxel_mesher_transvoxel.cpp", "meshers/transvoxel_uv_mesher/voxel_mesher_uv_transvoxel.cpp",
"meshers/transvoxel_uv_mesher/transvoxel_tables.cpp", "meshers/transvoxel_uv_mesher/transvoxel_tables.cpp",
"meshers/blocky/voxel_mesher_blocky.cpp", "meshers/blocky/voxel_mesher_blocky.cpp",

View File

@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#include "voxel_mesher_transvoxel.h" #include "voxel_mesher_uv_transvoxel.h"
#include "../../world/default/voxel_chunk_default.h" #include "../../world/default/voxel_chunk_default.h"
#include "../../world/voxel_chunk.h" #include "../../world/voxel_chunk.h"
@ -28,14 +28,14 @@ SOFTWARE.
#include "core/dictionary.h" #include "core/dictionary.h"
#include "servers/visual_server.h" #include "servers/visual_server.h"
int VoxelMesherTransvoxel::get_texture_scale() const { int VoxelMesherUVTransvoxel::get_texture_scale() const {
return _texture_scale; return _texture_scale;
} }
void VoxelMesherTransvoxel::set_texture_scale(const int value) { void VoxelMesherUVTransvoxel::set_texture_scale(const int value) {
_texture_scale = value; _texture_scale = value;
} }
void VoxelMesherTransvoxel::get_voxel_type_array(int *arr, Ref<VoxelChunk> chunk, const int x, const int y, const int z, const int size) { void VoxelMesherUVTransvoxel::get_voxel_type_array(int *arr, Ref<VoxelChunk> chunk, const int x, const int y, const int z, const int size) {
arr[0] = chunk->get_voxel(x, y, z, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE); arr[0] = chunk->get_voxel(x, y, z, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE);
arr[1] = chunk->get_voxel(x, y + size, z, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE); arr[1] = chunk->get_voxel(x, y + size, z, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE);
arr[2] = chunk->get_voxel(x, y, z + size, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE); arr[2] = chunk->get_voxel(x, y, z + size, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE);
@ -45,7 +45,7 @@ void VoxelMesherTransvoxel::get_voxel_type_array(int *arr, Ref<VoxelChunk> chunk
arr[6] = chunk->get_voxel(x + size, y, z + size, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE); arr[6] = chunk->get_voxel(x + size, y, z + size, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE);
arr[7] = chunk->get_voxel(x + size, y + size, z + size, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE); arr[7] = chunk->get_voxel(x + size, y + size, z + size, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE);
} }
int VoxelMesherTransvoxel::get_case_code_from_arr(const int *data) { int VoxelMesherUVTransvoxel::get_case_code_from_arr(const int *data) {
int case_code = 0; int case_code = 0;
if (data[0] != 0) if (data[0] != 0)
@ -74,7 +74,7 @@ int VoxelMesherTransvoxel::get_case_code_from_arr(const int *data) {
return case_code; return case_code;
} }
int VoxelMesherTransvoxel::get_case_code(Ref<VoxelChunk> chunk, const int x, const int y, const int z, const int size) { int VoxelMesherUVTransvoxel::get_case_code(Ref<VoxelChunk> chunk, const int x, const int y, const int z, const int size) {
int case_code = 0; int case_code = 0;
if (chunk->get_voxel(x, y, z, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE) != 0) if (chunk->get_voxel(x, y, z, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE) != 0)
@ -104,7 +104,7 @@ int VoxelMesherTransvoxel::get_case_code(Ref<VoxelChunk> chunk, const int x, con
return case_code; return case_code;
} }
int VoxelMesherTransvoxel::get_voxel_type(Ref<VoxelChunk> chunk, const int x, const int y, const int z, const int size) { int VoxelMesherUVTransvoxel::get_voxel_type(Ref<VoxelChunk> chunk, const int x, const int y, const int z, const int size) {
int type = 0; int type = 0;
type = chunk->get_voxel(x, y + size, z, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE); type = chunk->get_voxel(x, y + size, z, VoxelChunkDefault::DEFAULT_CHANNEL_TYPE);
@ -147,7 +147,7 @@ int VoxelMesherTransvoxel::get_voxel_type(Ref<VoxelChunk> chunk, const int x, co
return type; return type;
} }
void VoxelMesherTransvoxel::_add_chunk(Ref<VoxelChunk> p_chunk) { void VoxelMesherUVTransvoxel::_add_chunk(Ref<VoxelChunk> p_chunk) {
Ref<VoxelChunkDefault> chunk = p_chunk; Ref<VoxelChunkDefault> chunk = p_chunk;
ERR_FAIL_COND(!chunk.is_valid()); ERR_FAIL_COND(!chunk.is_valid());
@ -400,80 +400,80 @@ void VoxelMesherTransvoxel::_add_chunk(Ref<VoxelChunk> p_chunk) {
remove_doubles_hashed(); remove_doubles_hashed();
} }
Vector3 VoxelMesherTransvoxel::corner_id_to_vertex(int corner_id) const { Vector3 VoxelMesherUVTransvoxel::corner_id_to_vertex(int corner_id) const {
ERR_FAIL_COND_V(corner_id < 0 || corner_id > 8, Vector3()); ERR_FAIL_COND_V(corner_id < 0 || corner_id > 8, Vector3());
return transvoxel_vertices[corner_id]; return transvoxel_vertices[corner_id];
} }
int VoxelMesherTransvoxel::get_regular_cell_class(int index) const { int VoxelMesherUVTransvoxel::get_regular_cell_class(int index) const {
return static_cast<int>(regularCellClass[index]); return static_cast<int>(regularCellClass[index]);
} }
Ref<TransvoxelCellData> VoxelMesherTransvoxel::get_regular_cell_data(int index) const { Ref<TransvoxelCellData> VoxelMesherUVTransvoxel::get_regular_cell_data(int index) const {
return _regular_cell_datas[index]; return _regular_cell_datas[index];
} }
int VoxelMesherTransvoxel::get_regular_vertex_data(int index1, int index2) const { int VoxelMesherUVTransvoxel::get_regular_vertex_data(int index1, int index2) const {
//return static_cast<int>(regularVertexData[index1][index2]); //return static_cast<int>(regularVertexData[index1][index2]);
return regularVertexData[index1][index2]; return regularVertexData[index1][index2];
} }
//void VoxelMesherTransvoxel::set_regular_vertex_data(int index1, int index2, int value) { //void VoxelMesherUVTransvoxel::set_regular_vertex_data(int index1, int index2, int value) {
// ERR_FAIL_INDEX(index1, 256); // ERR_FAIL_INDEX(index1, 256);
// ERR_FAIL_INDEX(index2, 13); // ERR_FAIL_INDEX(index2, 13);
// regularVertexData[index1][index2] = value; // regularVertexData[index1][index2] = value;
//} //}
int VoxelMesherTransvoxel::get_regular_vertex_data_first_vertex(int index1, int index2) const { int VoxelMesherUVTransvoxel::get_regular_vertex_data_first_vertex(int index1, int index2) const {
int vert1 = regularVertexData[index1][index2] & 0x000F; int vert1 = regularVertexData[index1][index2] & 0x000F;
return vert1; return vert1;
} }
int VoxelMesherTransvoxel::get_regular_vertex_data_second_vertex(int index1, int index2) const { int VoxelMesherUVTransvoxel::get_regular_vertex_data_second_vertex(int index1, int index2) const {
int vert2 = (regularVertexData[index1][index2] & 0x00F0) >> 4; int vert2 = (regularVertexData[index1][index2] & 0x00F0) >> 4;
return vert2; return vert2;
} }
Vector3 VoxelMesherTransvoxel::get_regular_vertex_first_position(int index1, int index2) const { Vector3 VoxelMesherUVTransvoxel::get_regular_vertex_first_position(int index1, int index2) const {
int vert = regularVertexData[index1][index2] & 0x000F; int vert = regularVertexData[index1][index2] & 0x000F;
return transvoxel_vertices[vert]; return transvoxel_vertices[vert];
} }
Vector3 VoxelMesherTransvoxel::get_regular_vertex_second_position(int index1, int index2) const { Vector3 VoxelMesherUVTransvoxel::get_regular_vertex_second_position(int index1, int index2) const {
int vert = (regularVertexData[index1][index2] & 0x00F0) >> 4; int vert = (regularVertexData[index1][index2] & 0x00F0) >> 4;
return transvoxel_vertices[vert]; return transvoxel_vertices[vert];
} }
Vector3 VoxelMesherTransvoxel::get_regular_vertex_direction(int index1, int index2) const { Vector3 VoxelMesherUVTransvoxel::get_regular_vertex_direction(int index1, int index2) const {
int vert1 = regularVertexData[index1][index2] & 0x000F; int vert1 = regularVertexData[index1][index2] & 0x000F;
int vert2 = (regularVertexData[index1][index2] & 0x00F0) >> 4; int vert2 = (regularVertexData[index1][index2] & 0x00F0) >> 4;
return transvoxel_vertices[vert2] - transvoxel_vertices[vert1]; return transvoxel_vertices[vert2] - transvoxel_vertices[vert1];
} }
int VoxelMesherTransvoxel::get_transition_cell_class(int index) const { int VoxelMesherUVTransvoxel::get_transition_cell_class(int index) const {
return static_cast<int>(transitionCellClass[index]); return static_cast<int>(transitionCellClass[index]);
} }
Ref<TransvoxelCellData> VoxelMesherTransvoxel::get_transition_cell_data(int index) const { Ref<TransvoxelCellData> VoxelMesherUVTransvoxel::get_transition_cell_data(int index) const {
return _transition_cell_data[index]; return _transition_cell_data[index];
} }
int VoxelMesherTransvoxel::get_transition_corner_data(int index) const { int VoxelMesherUVTransvoxel::get_transition_corner_data(int index) const {
return static_cast<int>(transitionCornerData[index]); return static_cast<int>(transitionCornerData[index]);
} }
int VoxelMesherTransvoxel::get_transition_vertex_data(int index1, int index2) const { int VoxelMesherUVTransvoxel::get_transition_vertex_data(int index1, int index2) const {
return static_cast<int>(transitionVertexData[index1][index2]); return static_cast<int>(transitionVertexData[index1][index2]);
} }
int VoxelMesherTransvoxel::get_transition_vertex_data_first_vertex(int index1, int index2) const { int VoxelMesherUVTransvoxel::get_transition_vertex_data_first_vertex(int index1, int index2) const {
unsigned short val = transitionVertexData[index1][index2]; unsigned short val = transitionVertexData[index1][index2];
unsigned short vert = val & 0x000F; unsigned short vert = val & 0x000F;
@ -481,7 +481,7 @@ int VoxelMesherTransvoxel::get_transition_vertex_data_first_vertex(int index1, i
return static_cast<int>(vert); return static_cast<int>(vert);
} }
int VoxelMesherTransvoxel::get_transition_vertex_data_second_vertex(int index1, int index2) const { int VoxelMesherUVTransvoxel::get_transition_vertex_data_second_vertex(int index1, int index2) const {
unsigned short val = transitionVertexData[index1][index2]; unsigned short val = transitionVertexData[index1][index2];
unsigned short vert = (val & 0x00F0) >> 4; unsigned short vert = (val & 0x00F0) >> 4;
@ -489,26 +489,26 @@ int VoxelMesherTransvoxel::get_transition_vertex_data_second_vertex(int index1,
return static_cast<int>(vert); return static_cast<int>(vert);
} }
Vector3 VoxelMesherTransvoxel::get_transition_vertex_first_position(int index1, int index2) const { Vector3 VoxelMesherUVTransvoxel::get_transition_vertex_first_position(int index1, int index2) const {
int vert = transitionVertexData[index1][index2] & 0x000F; int vert = transitionVertexData[index1][index2] & 0x000F;
return transvoxel_vertices[vert]; return transvoxel_vertices[vert];
} }
Vector3 VoxelMesherTransvoxel::get_transition_vertex_second_position(int index1, int index2) const { Vector3 VoxelMesherUVTransvoxel::get_transition_vertex_second_position(int index1, int index2) const {
int vert = (transitionVertexData[index1][index2] & 0x00F0) >> 4; int vert = (transitionVertexData[index1][index2] & 0x00F0) >> 4;
return transvoxel_vertices[vert]; return transvoxel_vertices[vert];
} }
Vector3 VoxelMesherTransvoxel::get_transition_vertex_direction(int index1, int index2) const { Vector3 VoxelMesherUVTransvoxel::get_transition_vertex_direction(int index1, int index2) const {
int vert1 = transitionVertexData[index1][index2] & 0x000F; int vert1 = transitionVertexData[index1][index2] & 0x000F;
int vert2 = (transitionVertexData[index1][index2] & 0x00F0) >> 4; int vert2 = (transitionVertexData[index1][index2] & 0x00F0) >> 4;
return transvoxel_vertices[vert2] - transvoxel_vertices[vert1]; return transvoxel_vertices[vert2] - transvoxel_vertices[vert1];
} }
VoxelMesherTransvoxel::VoxelMesherTransvoxel() { VoxelMesherUVTransvoxel::VoxelMesherUVTransvoxel() {
_format = VisualServer::ARRAY_FORMAT_NORMAL | VisualServer::ARRAY_FORMAT_COLOR | VisualServer::ARRAY_FORMAT_TEX_UV | VisualServer::ARRAY_FORMAT_TEX_UV2; _format = VisualServer::ARRAY_FORMAT_NORMAL | VisualServer::ARRAY_FORMAT_COLOR | VisualServer::ARRAY_FORMAT_TEX_UV | VisualServer::ARRAY_FORMAT_TEX_UV2;
_texture_scale = 4; _texture_scale = 4;
@ -522,37 +522,37 @@ VoxelMesherTransvoxel::VoxelMesherTransvoxel() {
} }
} }
VoxelMesherTransvoxel::~VoxelMesherTransvoxel() { VoxelMesherUVTransvoxel::~VoxelMesherUVTransvoxel() {
} }
void VoxelMesherTransvoxel::_bind_methods() { void VoxelMesherUVTransvoxel::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_texture_scale"), &VoxelMesherTransvoxel::get_texture_scale); ClassDB::bind_method(D_METHOD("get_texture_scale"), &VoxelMesherUVTransvoxel::get_texture_scale);
ClassDB::bind_method(D_METHOD("set_texture_scale", "value"), &VoxelMesherTransvoxel::set_texture_scale); ClassDB::bind_method(D_METHOD("set_texture_scale", "value"), &VoxelMesherUVTransvoxel::set_texture_scale);
ADD_PROPERTY(PropertyInfo(Variant::INT, "texture_scale"), "set_texture_scale", "get_texture_scale"); ADD_PROPERTY(PropertyInfo(Variant::INT, "texture_scale"), "set_texture_scale", "get_texture_scale");
ClassDB::bind_method(D_METHOD("_add_chunk", "chunk"), &VoxelMesherTransvoxel::_add_chunk); ClassDB::bind_method(D_METHOD("_add_chunk", "chunk"), &VoxelMesherUVTransvoxel::_add_chunk);
ClassDB::bind_method(D_METHOD("corner_id_to_vertex", "index1"), &VoxelMesherTransvoxel::corner_id_to_vertex); ClassDB::bind_method(D_METHOD("corner_id_to_vertex", "index1"), &VoxelMesherUVTransvoxel::corner_id_to_vertex);
ClassDB::bind_method(D_METHOD("get_regular_cell_class", "index"), &VoxelMesherTransvoxel::get_regular_cell_class); ClassDB::bind_method(D_METHOD("get_regular_cell_class", "index"), &VoxelMesherUVTransvoxel::get_regular_cell_class);
ClassDB::bind_method(D_METHOD("get_regular_cell_data", "index"), &VoxelMesherTransvoxel::get_regular_cell_data); ClassDB::bind_method(D_METHOD("get_regular_cell_data", "index"), &VoxelMesherUVTransvoxel::get_regular_cell_data);
ClassDB::bind_method(D_METHOD("get_regular_vertex_data", "index1", "index2"), &VoxelMesherTransvoxel::get_regular_vertex_data); ClassDB::bind_method(D_METHOD("get_regular_vertex_data", "index1", "index2"), &VoxelMesherUVTransvoxel::get_regular_vertex_data);
// ClassDB::bind_method(D_METHOD("set_regular_vertex_data", "index1", "index2", "value"), &VoxelMesherTransvoxel::set_regular_vertex_data); // ClassDB::bind_method(D_METHOD("set_regular_vertex_data", "index1", "index2", "value"), &VoxelMesherUVTransvoxel::set_regular_vertex_data);
ClassDB::bind_method(D_METHOD("get_regular_vertex_data_first_vertex", "index1", "index2"), &VoxelMesherTransvoxel::get_regular_vertex_data_first_vertex); ClassDB::bind_method(D_METHOD("get_regular_vertex_data_first_vertex", "index1", "index2"), &VoxelMesherUVTransvoxel::get_regular_vertex_data_first_vertex);
ClassDB::bind_method(D_METHOD("get_regular_vertex_data_second_vertex", "index1", "index2"), &VoxelMesherTransvoxel::get_regular_vertex_data_second_vertex); ClassDB::bind_method(D_METHOD("get_regular_vertex_data_second_vertex", "index1", "index2"), &VoxelMesherUVTransvoxel::get_regular_vertex_data_second_vertex);
ClassDB::bind_method(D_METHOD("get_regular_vertex_first_position", "index1", "index2"), &VoxelMesherTransvoxel::get_regular_vertex_first_position); ClassDB::bind_method(D_METHOD("get_regular_vertex_first_position", "index1", "index2"), &VoxelMesherUVTransvoxel::get_regular_vertex_first_position);
ClassDB::bind_method(D_METHOD("get_regular_vertex_second_position", "index1", "index2"), &VoxelMesherTransvoxel::get_regular_vertex_second_position); ClassDB::bind_method(D_METHOD("get_regular_vertex_second_position", "index1", "index2"), &VoxelMesherUVTransvoxel::get_regular_vertex_second_position);
ClassDB::bind_method(D_METHOD("get_regular_vertex_direction", "index1", "index2"), &VoxelMesherTransvoxel::get_regular_vertex_direction); ClassDB::bind_method(D_METHOD("get_regular_vertex_direction", "index1", "index2"), &VoxelMesherUVTransvoxel::get_regular_vertex_direction);
ClassDB::bind_method(D_METHOD("get_transition_cell_class", "index"), &VoxelMesherTransvoxel::get_transition_cell_class); ClassDB::bind_method(D_METHOD("get_transition_cell_class", "index"), &VoxelMesherUVTransvoxel::get_transition_cell_class);
ClassDB::bind_method(D_METHOD("get_transition_cell_data", "index"), &VoxelMesherTransvoxel::get_transition_cell_data); ClassDB::bind_method(D_METHOD("get_transition_cell_data", "index"), &VoxelMesherUVTransvoxel::get_transition_cell_data);
ClassDB::bind_method(D_METHOD("get_transition_corner_data", "index"), &VoxelMesherTransvoxel::get_transition_corner_data); ClassDB::bind_method(D_METHOD("get_transition_corner_data", "index"), &VoxelMesherUVTransvoxel::get_transition_corner_data);
ClassDB::bind_method(D_METHOD("get_transition_vertex_data", "index1", "index2"), &VoxelMesherTransvoxel::get_transition_vertex_data); ClassDB::bind_method(D_METHOD("get_transition_vertex_data", "index1", "index2"), &VoxelMesherUVTransvoxel::get_transition_vertex_data);
ClassDB::bind_method(D_METHOD("get_transition_vertex_data_first_vertex", "index1", "index2"), &VoxelMesherTransvoxel::get_transition_vertex_data_first_vertex); ClassDB::bind_method(D_METHOD("get_transition_vertex_data_first_vertex", "index1", "index2"), &VoxelMesherUVTransvoxel::get_transition_vertex_data_first_vertex);
ClassDB::bind_method(D_METHOD("get_transition_vertex_data_second_vertex", "index1", "index2"), &VoxelMesherTransvoxel::get_transition_vertex_data_second_vertex); ClassDB::bind_method(D_METHOD("get_transition_vertex_data_second_vertex", "index1", "index2"), &VoxelMesherUVTransvoxel::get_transition_vertex_data_second_vertex);
ClassDB::bind_method(D_METHOD("get_transition_vertex_first_position", "index1", "index2"), &VoxelMesherTransvoxel::get_transition_vertex_first_position); ClassDB::bind_method(D_METHOD("get_transition_vertex_first_position", "index1", "index2"), &VoxelMesherUVTransvoxel::get_transition_vertex_first_position);
ClassDB::bind_method(D_METHOD("get_transition_vertex_second_position", "index1", "index2"), &VoxelMesherTransvoxel::get_transition_vertex_second_position); ClassDB::bind_method(D_METHOD("get_transition_vertex_second_position", "index1", "index2"), &VoxelMesherUVTransvoxel::get_transition_vertex_second_position);
ClassDB::bind_method(D_METHOD("get_transition_vertex_direction", "index1", "index2"), &VoxelMesherTransvoxel::get_transition_vertex_direction); ClassDB::bind_method(D_METHOD("get_transition_vertex_direction", "index1", "index2"), &VoxelMesherUVTransvoxel::get_transition_vertex_direction);
BIND_ENUM_CONSTANT(VOXEL_ENTRY_INDEX_000); BIND_ENUM_CONSTANT(VOXEL_ENTRY_INDEX_000);
BIND_ENUM_CONSTANT(VOXEL_ENTRY_INDEX_100); BIND_ENUM_CONSTANT(VOXEL_ENTRY_INDEX_100);

View File

@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#ifndef VOXEL_MESHER_TRANSVOXEL_H #ifndef VOXEL_MESHER_UV_TRANSVOXEL_H
#define VOXEL_MESHER_TRANSVOXEL_H #define VOXEL_MESHER_UV_TRANSVOXEL_H
#include "../default/voxel_mesher_default.h" #include "../default/voxel_mesher_default.h"
#include "core/reference.h" #include "core/reference.h"
@ -32,8 +32,8 @@ SOFTWARE.
using namespace Transvoxel; using namespace Transvoxel;
class VoxelMesherTransvoxel : public VoxelMesherDefault { class VoxelMesherUVTransvoxel : public VoxelMesherDefault {
GDCLASS(VoxelMesherTransvoxel, VoxelMesherDefault) GDCLASS(VoxelMesherUVTransvoxel, VoxelMesherDefault)
public: public:
static const String BINDING_STRING_VOXEL_ENTRY_INDICES; static const String BINDING_STRING_VOXEL_ENTRY_INDICES;
@ -99,8 +99,8 @@ public:
Vector3 get_transition_vertex_second_position(int index1, int index2) const; Vector3 get_transition_vertex_second_position(int index1, int index2) const;
Vector3 get_transition_vertex_direction(int index1, int index2) const; Vector3 get_transition_vertex_direction(int index1, int index2) const;
VoxelMesherTransvoxel(); VoxelMesherUVTransvoxel();
~VoxelMesherTransvoxel(); ~VoxelMesherUVTransvoxel();
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -111,7 +111,7 @@ protected:
int _texture_scale; int _texture_scale;
}; };
VARIANT_ENUM_CAST(VoxelMesherTransvoxel::VoxelEntryIndices); VARIANT_ENUM_CAST(VoxelMesherUVTransvoxel::VoxelEntryIndices);
VARIANT_ENUM_CAST(VoxelMesherTransvoxel::VoxelEntryMask); VARIANT_ENUM_CAST(VoxelMesherUVTransvoxel::VoxelEntryMask);
#endif // VOXEL_MESHER_SMOOTH_H #endif // VOXEL_MESHER_SMOOTH_H

View File

@ -32,7 +32,7 @@ SOFTWARE.
#include "data/voxel_light.h" #include "data/voxel_light.h"
#include "meshers/transvoxel_uv_mesher/transvoxel_cell_data.h" #include "meshers/transvoxel_uv_mesher/transvoxel_cell_data.h"
#include "meshers/transvoxel_uv_mesher/voxel_mesher_transvoxel.h" #include "meshers/transvoxel_uv_mesher/voxel_mesher_uv_transvoxel.h"
#include "meshers/voxel_mesher.h" #include "meshers/voxel_mesher.h"
#include "world/block_voxel_structure.h" #include "world/block_voxel_structure.h"
@ -60,7 +60,7 @@ SOFTWARE.
void register_voxelman_types() { void register_voxelman_types() {
ClassDB::register_class<VoxelMesher>(); ClassDB::register_class<VoxelMesher>();
ClassDB::register_class<VoxelMesherTransvoxel>(); ClassDB::register_class<VoxelMesherUVTransvoxel>();
ClassDB::register_class<TransvoxelCellData>(); ClassDB::register_class<TransvoxelCellData>();
ClassDB::register_class<VoxelSurface>(); ClassDB::register_class<VoxelSurface>();