diff options
Diffstat (limited to 'scene/resources/mesh.cpp')
-rw-r--r-- | scene/resources/mesh.cpp | 30 |
1 files changed, 0 insertions, 30 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); |