From 4b679f7f161e45cea48bf0f964066e2f4e766c99 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 1 Mar 2019 18:02:45 -0300 Subject: [PATCH] Remove old method that makes no sense today, fixes #25566 --- scene/resources/mesh.cpp | 30 ------------------------------ scene/resources/mesh.h | 1 - 2 files changed, 31 deletions(-) diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 98402dbeaf8..85018f38d74 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -1028,34 +1028,6 @@ AABB ArrayMesh::get_custom_aabb() const { return custom_aabb; } -void ArrayMesh::center_geometry() { - - /* - Vector3 ofs = aabb.pos+aabb.size*0.5; - - for(int i=0;i geom = surface_get_array(i,ARRAY_VERTEX); - int gc =geom.size(); - PoolVector::Write w = geom.write(); - surfaces[i].aabb.pos-=ofs; - - for(int i=0;i::Write(); - - surface_set_array(i,ARRAY_VERTEX,geom); - - } - - aabb.pos-=ofs; - -*/ -} - void ArrayMesh::regen_normalmaps() { Vector > surfs; @@ -1295,8 +1267,6 @@ void ArrayMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("create_trimesh_shape"), &ArrayMesh::create_trimesh_shape); ClassDB::bind_method(D_METHOD("create_convex_shape"), &ArrayMesh::create_convex_shape); ClassDB::bind_method(D_METHOD("create_outline", "margin"), &ArrayMesh::create_outline); - ClassDB::bind_method(D_METHOD("center_geometry"), &ArrayMesh::center_geometry); - ClassDB::set_method_flags(get_class_static(), _scs_create("center_geometry"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR); ClassDB::bind_method(D_METHOD("regen_normalmaps"), &ArrayMesh::regen_normalmaps); ClassDB::set_method_flags(get_class_static(), _scs_create("regen_normalmaps"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR); ClassDB::bind_method(D_METHOD("lightmap_unwrap", "transform", "texel_size"), &ArrayMesh::lightmap_unwrap); diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index 2d0aef8ab05..dabfc6ea607 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -223,7 +223,6 @@ public: AABB get_aabb() const; virtual RID get_rid() const; - void center_geometry(); void regen_normalmaps(); Error lightmap_unwrap(const Transform &p_base_transform = Transform(), float p_texel_size = 0.05);