Skip to content

Commit cdc8db7

Browse files
committed
Add compiled shared libs to Unity project
1 parent dd9f3e0 commit cdc8db7

5 files changed

Lines changed: 8 additions & 6 deletions

File tree

com.unity.robotics.vhacd/Runtime/VHACD.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ public enum FillMode
1818
}
1919

2020
[Serializable]
21+
[StructLayout(LayoutKind.Sequential)]
2122
public unsafe struct Parameters
2223
{
2324
public void Init()
2425
{
2526
m_callback = null;
2627
m_logger = null;
2728
m_taskRunner = null;
28-
m_maxConvexHulls = 32; // Performance sensitive: adding more MeshColliders slows down Unity at runtime.
29-
m_resolution = 100000; // Higher value increases generation time.
30-
m_minimumVolumePercentErrorAllowed = 1; // Lower value increases generation time.
31-
m_maxRecursionDepth = 10; // Higher value increases generation time.
29+
m_maxConvexHulls = 32;
30+
m_resolution = 100000;
31+
m_minimumVolumePercentErrorAllowed = 1;
32+
m_maxRecursionDepth = 10;
3233
m_shrinkWrap = true;
3334
m_fillMode = FillMode.FLOOD_FILL;
3435
m_maxNumVerticesPerCH = 64;
@@ -41,7 +42,7 @@ public void Init()
4142
public void* m_logger;
4243
public void* m_taskRunner;
4344

44-
[Tooltip("The maximum number of convex hulls to produce. Performance sensitive.")]
45+
[Tooltip("The maximum number of convex hulls to produce. Performance sensitive: adding more MeshColliders slows down Unity at runtime.")]
4546
[Range(1, 2048)]
4647
public uint m_maxConvexHulls;
4748

@@ -80,6 +81,7 @@ public void Init()
8081
public bool m_findBestPlane;
8182
}
8283

84+
[StructLayout(LayoutKind.Sequential)]
8385
unsafe struct ConvexHull
8486
{
8587
public double* m_points;
-466 KB
Binary file not shown.
-469 KB
Binary file not shown.
-127 KB
Binary file not shown.

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ include_directories(${CMAKE_SOURCE_DIR}/VHACD_Lib)
3232
add_library(libvhacd SHARED ${CMAKE_SOURCE_DIR}/dll/dll.cpp)
3333

3434
# VHACD.h is a header-only library. Implementation needs this define flag.
35-
target_compile_definitions(libvhacd PRIVATE ENABLE_VHACD_IMPLEMENTATION=1)
35+
target_compile_definitions(libvhacd PRIVATE ENABLE_VHACD_IMPLEMENTATION=1)

0 commit comments

Comments
 (0)