summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <juan@godotengine.org>2019-03-01 18:02:45 -0300
committerJuan Linietsky <juan@godotengine.org>2019-03-01 18:02:45 -0300
commit4b679f7f161e45cea48bf0f964066e2f4e766c99 (patch)
tree4ef07d748c1807de6bd3e7fbd3c0ab17ed5981d2
parentff34cd58ff6ea4e17474a45aa19bf9b130e6c6cc (diff)
Remove old method that makes no sense today, fixes #25566
-rw-r--r--scene/resources/mesh.cpp30
-rw-r--r--scene/resources/mesh.h1
2 files changed, 0 insertions, 31 deletions
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index 98402dbeaf..85018f38d7 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<get_surface_count();i++) {
-
- PoolVector<Vector3> geom = surface_get_array(i,ARRAY_VERTEX);
- int gc =geom.size();
- PoolVector<Vector3>::Write w = geom.write();
- surfaces[i].aabb.pos-=ofs;
-
- for(int i=0;i<gc;i++) {
-
- w[i]-=ofs;
- }
-
- w = PoolVector<Vector3>::Write();
-
- surface_set_array(i,ARRAY_VERTEX,geom);
-
- }
-
- aabb.pos-=ofs;
-
-*/
-}
-
void ArrayMesh::regen_normalmaps() {
Vector<Ref<SurfaceTool> > 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 2d0aef8ab0..dabfc6ea60 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);