Skip to content

Update V-HACD library to version 4.1#18

Merged
DanielaOrtner merged 3 commits into
RebelToolbox:mainfrom
madmiraal:update-v-hacd
Nov 27, 2023
Merged

Update V-HACD library to version 4.1#18
DanielaOrtner merged 3 commits into
RebelToolbox:mainfrom
madmiraal:update-v-hacd

Conversation

@madmiraal
Copy link
Copy Markdown
Contributor

Fixes build errors caused by missing #include stdint.h in old version of V-HACD:

In file included from thirdparty/vhacd/src/vhacdICHull.cpp:15:
thirdparty/vhacd/inc/vhacdICHull.h:46:31: error: unknown type name 'uint32_t'
    ICHullError Process(const uint32_t nPointsCH, const double minVolume = 0.0);
                              ^
thirdparty/vhacd/inc/vhacdICHull.h:76:24: error: unknown type name 'uint32_t'
    bool CleanVertices(uint32_t& addedPoints);
                       ^
thirdparty/vhacd/inc/vhacdICHull.h:80:18: error: unknown type name 'uint32_t'
    bool CleanUp(uint32_t& addedPoints);
                 ^
thirdparty/vhacd/src/vhacdICHull.cpp:56:5: error: unknown type name 'uint32_t'
    uint32_t addedPoints = 0;
    ^
thirdparty/vhacd/src/vhacdICHull.cpp:174:35: error: unknown type name 'uint32_t'
ICHullError ICHull::Process(const uint32_t nPointsCH,
                                  ^
thirdparty/vhacd/src/vhacdICHull.cpp:177:5: error: unknown type name 'uint32_t'
    uint32_t addedPoints = 0;
    ^
thirdparty/vhacd/src/vhacdICHull.cpp:585:22: error: unknown type name 'uint32_t'
bool ICHull::CleanUp(uint32_t& addedPoints)
                     ^
thirdparty/vhacd/src/vhacdICHull.cpp:629:28: error: unknown type name 'uint32_t'
bool ICHull::CleanVertices(uint32_t& addedPoints)

Includes patches submitted upstream to fix a compilation warning and a compilation error:

Which fix:

./thirdparty/vhacd/include/VHACD.h:5698:9: warning: private field 'count' is not used [-Wunused-private-field]
 5698 |     int count;
      |         ^
In file included from modules/vhacd/register_types.cpp:35:
./thirdparty/vhacd/include/VHACD.h: In member function 'void VHACD::VHACDImpl::PerformConvexDecomposition()':
./thirdparty/vhacd/include/VHACD.h:7610:38: error: declaration of 't' shadows a previous local [-Werror=shadow=local]
 7610 |                             CostTask t;
      |                                      ^
./thirdparty/vhacd/include/VHACD.h:7546:23: note: shadowed declaration is here
 7546 |                 Timer t;
      |                       ^

Fixes: godotengine/godot#29971

@madmiraal madmiraal self-assigned this Nov 27, 2023
@DanielaOrtner DanielaOrtner self-requested a review November 27, 2023 16:09
Copy link
Copy Markdown
Contributor

@DanielaOrtner DanielaOrtner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see fixes coming through :)

@DanielaOrtner DanielaOrtner merged commit 5fd5a51 into RebelToolbox:main Nov 27, 2023
@madmiraal madmiraal deleted the update-v-hacd branch November 27, 2023 17:02
@madmiraal madmiraal added PR Type: Bug Fix Your current game should now work as expected. and removed bug labels May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR Type: Bug Fix Your current game should now work as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convex decomposition leads to inaccurate shape for simple meshes

2 participants