diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-07-12 22:15:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-12 22:15:40 +0200 |
commit | fc00a8390193220cea702d9ab684fb6c53d97a6b (patch) | |
tree | dc604ebc95c9ac755ebddab8169b8c9a0d498e93 /scene/resources/mesh.h | |
parent | 30d4732623df8a9c286eb1e0b5d3321b31bcfa86 (diff) | |
parent | 1de995ae9911fdc3ce609a8c8f84e023531ea6bc (diff) | |
download | redot-engine-fc00a8390193220cea702d9ab684fb6c53d97a6b.tar.gz |
Merge pull request #50262 from nekomatata/convex-hull-simplification
Options to clean/simplify convex hull generated from mesh
Diffstat (limited to 'scene/resources/mesh.h')
-rw-r--r-- | scene/resources/mesh.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index 02cab9a5e1..27b0eb098b 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -149,7 +149,7 @@ public: void generate_debug_mesh_indices(Vector<Vector3> &r_points); Ref<Shape3D> create_trimesh_shape() const; - Ref<Shape3D> create_convex_shape() const; + Ref<Shape3D> create_convex_shape(bool p_clean = true, bool p_simplify = false) const; Ref<Mesh> create_outline(float p_margin) const; @@ -159,11 +159,11 @@ public: Size2i get_lightmap_size_hint() const; void clear_cache() const; - typedef Vector<Vector<Face3>> (*ConvexDecompositionFunc)(const Vector<Face3> &); + typedef Vector<Vector<Face3>> (*ConvexDecompositionFunc)(const Vector<Face3> &p_faces, int p_max_convex_hulls); static ConvexDecompositionFunc convex_composition_function; - Vector<Ref<Shape3D>> convex_decompose() const; + Vector<Ref<Shape3D>> convex_decompose(int p_max_convex_hulls = -1) const; virtual int get_builtin_bind_pose_count() const; virtual Transform3D get_builtin_bind_pose(int p_index) const; |