diff options
Diffstat (limited to 'scene/resources/mesh.cpp')
-rw-r--r-- | scene/resources/mesh.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 4f301fca95..ad589a605e 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -224,9 +224,7 @@ Vector<Face3> Mesh::get_faces() const { Ref<Shape3D> Mesh::create_convex_shape(bool p_clean, bool p_simplify) const { if (p_simplify) { - ConvexDecompositionSettings settings; - settings.max_convex_hulls = 1; - Vector<Ref<Shape3D>> decomposed = convex_decompose(settings); + Vector<Ref<Shape3D>> decomposed = convex_decompose(1); if (decomposed.size() == 1) { return decomposed[0]; } else { @@ -566,12 +564,12 @@ void Mesh::clear_cache() const { debug_lines.clear(); } -Vector<Ref<Shape3D>> Mesh::convex_decompose(const ConvexDecompositionSettings &p_settings) const { +Vector<Ref<Shape3D>> Mesh::convex_decompose(int p_max_convex_hulls) const { ERR_FAIL_COND_V(!convex_composition_function, Vector<Ref<Shape3D>>()); const Vector<Face3> faces = get_faces(); - const Vector<Vector<Face3>> decomposed = convex_composition_function(faces, p_settings); + Vector<Vector<Face3>> decomposed = convex_composition_function(faces, p_max_convex_hulls); Vector<Ref<Shape3D>> ret; |