1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-29 16:16:38 +00:00

Replace QuickHull with Bullet's convex hull computer.

The code is based on the current version of thirdparty/vhacd and modified to use Godot's types and code style.

Additional changes:
- backported and extended PagedAllocator to allow leaked objects
- applied patch from https://github.com/bulletphysics/bullet3/pull/3037
This commit is contained in:
Morris Tabor
2021-05-07 12:48:56 +02:00
parent c311b4c039
commit ba396caefc
11 changed files with 2611 additions and 13 deletions

View File

@@ -29,7 +29,7 @@
/*************************************************************************/
#include "navigation_mesh_generator.h"
#include "core/math/quick_hull.h"
#include "core/math/convex_hull.h"
#include "core/os/thread.h"
#include "editor/editor_settings.h"
#include "scene/3d/collision_shape.h"
@@ -213,7 +213,7 @@ void EditorNavigationMeshGenerator::_parse_geometry(Transform p_accumulated_tran
Vector<Vector3> varr = Variant(convex_polygon->get_points());
Geometry::MeshData md;
Error err = QuickHull::build(varr, md);
Error err = ConvexHullComputer::convex_hull(varr, md);
if (err == OK) {
PoolVector3Array faces;