Skip to content

Commit

Permalink
Drop b2d_convexdecomp. no longer necessary.
Browse files Browse the repository at this point in the history
We now use `thirdparty/misc/triangulator.h` for all physics-related
(collision, navigation) triangulation needs.

Follow-up to godotengine#34293.
  • Loading branch information
akien-mga committed Dec 13, 2019
1 parent f18cb89 commit f111d1a
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 2,284 deletions.
6 changes: 0 additions & 6 deletions COPYRIGHT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ Comment: Open Asset Import Library (assimp)
Copyright: 2006-2016, assimp team
License: BSD-3-clause

Files: ./thirdparty/b2d_convexdecomp/
Comment: Box2D (ConvexDecomp)
Copyright: 2007, Eric Jordan
2006-2009, Erin Catto
License: Zlib

Files: ./thirdparty/bullet/
Comment: Bullet Continuous Collision Detection and Physics Library
Copyright: 2003-2013, Erwin Coumans
Expand Down
2 changes: 0 additions & 2 deletions core/math/geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ void Geometry::MeshData::optimize_vertices() {
vertices = new_vertices;
}

Vector<Vector<Vector2> > (*Geometry::_decompose_func)(const Vector<Vector2> &p_polygon) = NULL;

struct _FaceClassify {

struct _Link {
Expand Down
9 changes: 0 additions & 9 deletions core/math/geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -853,15 +853,6 @@ class Geometry {
return triangles;
}

static Vector<Vector<Vector2> > (*_decompose_func)(const Vector<Vector2> &p_polygon);
static Vector<Vector<Vector2> > decompose_polygon(const Vector<Vector2> &p_polygon) {

if (_decompose_func)
return _decompose_func(p_polygon);

return Vector<Vector<Vector2> >();
}

static bool is_polygon_clockwise(const Vector<Vector2> &p_polygon) {
int c = p_polygon.size();
if (c < 3)
Expand Down
17 changes: 0 additions & 17 deletions drivers/convex_decomp/SCsub

This file was deleted.

162 changes: 0 additions & 162 deletions drivers/convex_decomp/b2d_decompose.cpp

This file was deleted.

39 changes: 0 additions & 39 deletions drivers/convex_decomp/b2d_decompose.h

This file was deleted.

13 changes: 0 additions & 13 deletions drivers/register_driver_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,9 @@

#include "register_driver_types.h"

#include "core/math/geometry.h"
#include "drivers/png/image_loader_png.h"
#include "drivers/png/resource_saver_png.h"

#ifdef TOOLS_ENABLED
#include "drivers/convex_decomp/b2d_decompose.h"
#endif

#ifdef TOOLS_ENABLED
#include "platform/windows/export/export.h"
#endif

static ImageLoaderPNG *image_loader_png;
static Ref<ResourceSaverPNG> resource_saver_png;

Expand All @@ -64,10 +55,6 @@ void unregister_core_driver_types() {
}

void register_driver_types() {

#ifdef TOOLS_ENABLED
Geometry::_decompose_func = b2d_decompose;
#endif
}

void unregister_driver_types() {
Expand Down
15 changes: 0 additions & 15 deletions thirdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@
- License: BSD-3-Clause


## b2d_convexdecomp

- Upstream: https://github.com/erincatto/Box2D/tree/master/Contributions/Utilities/ConvexDecomposition
- Version: git (25615e0, 2015) with modifications
- License: zlib

The files were adapted to Godot by removing the dependency on b2Math (replacing
it by b2Glue.h) and commenting out some verbose printf calls.
Upstream code has not changed in 10 years, no need to keep track of changes.

Important: Some files have Godot-made changes.
They are marked with `// -- GODOT start --` and `// -- GODOT end --`
comments.


## bullet

- Upstream: https://github.com/bulletphysics/bullet3
Expand Down
Loading

0 comments on commit f111d1a

Please sign in to comment.