From d95a6b58175fee072b13550d510179d9f2e5919c Mon Sep 17 00:00:00 2001 From: Alexander Filippov Date: Sun, 8 Dec 2024 06:35:15 +0100 Subject: [PATCH] Decorative changes. --- LICENSE.md.meta | 7 +++++++ Runtime/VHACD.cs | 26 ++++++++++++++------------ Runtime/vhacd.asmdef | 15 +++++++++++---- package.json | 19 ++++++++++++++----- 4 files changed, 46 insertions(+), 21 deletions(-) create mode 100644 LICENSE.md.meta diff --git a/LICENSE.md.meta b/LICENSE.md.meta new file mode 100644 index 0000000..d9a457c --- /dev/null +++ b/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1cd39da8a5283a746bbb0c7f6eb50757 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/VHACD.cs b/Runtime/VHACD.cs index 8f06f79..86a1ac8 100644 --- a/Runtime/VHACD.cs +++ b/Runtime/VHACD.cs @@ -1,11 +1,14 @@ -using System.Collections; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using UnityEngine; +using Utils; namespace MeshProcess { +#if UTILS + [HideScriptField] +#endif public class VHACD : MonoBehaviour { [System.Serializable] @@ -31,42 +34,42 @@ namespace MeshProcess m_projectHullVertices = true; // This will project the output convex hull vertices onto the original source mesh to increase the floating point accuracy of the results } - [Tooltip("maximum concavity")] + [Tooltip("Maximum concavity")] [Range(0, 1)] public double m_concavity; - [Tooltip("controls the bias toward clipping along symmetry planes")] + [Tooltip("Controls the bias toward clipping along symmetry planes.")] [Range(0, 1)] public double m_alpha; - [Tooltip("controls the bias toward clipping along revolution axes")] + [Tooltip("Controls the bias toward clipping along revolution axes.")] [Range(0, 1)] public double m_beta; - [Tooltip("controls the adaptive sampling of the generated convex-hulls")] + [Tooltip("Controls the adaptive sampling of the generated convex-hulls.")] [Range(0, 0.01f)] public double m_minVolumePerCH; public void* m_callback; public void* m_logger; - [Tooltip("maximum number of voxels generated during the voxelization stage")] + [Tooltip("Maximum number of voxels generated during the voxelization stage.")] [Range(10000, 64000000)] public uint m_resolution; - [Tooltip("controls the maximum number of triangles per convex-hull")] + [Tooltip("Controls the maximum number of triangles per convex-hull.")] [Range(4, 1024)] public uint m_maxNumVerticesPerCH; - [Tooltip("controls the granularity of the search for the \"best\" clipping plane")] + [Tooltip("Controls the granularity of the search for the \"best\" clipping plane")] [Range(1, 16)] public uint m_planeDownsampling; - [Tooltip("controls the precision of the convex-hull generation process during the clipping plane selection stage")] + [Tooltip("Controls the precision of the convex-hull generation process during the clipping plane selection stage.")] [Range(1, 16)] public uint m_convexhullDownsampling; - [Tooltip("enable/disable normalizing the mesh before applying the convex decomposition")] + [Tooltip("Enable/disable normalizing the mesh before applying the convex decomposition.")] [Range(0, 1)] public uint m_pca; @@ -82,7 +85,7 @@ namespace MeshProcess public uint m_maxConvexHulls; - [Tooltip("This will project the output convex hull vertices onto the original source mesh to increase the floating point accuracy of the results")] + [Tooltip("This will project the output convex hull vertices onto the original source mesh to increase the floating point accuracy of the results.")] public bool m_projectHullVertices; }; @@ -130,7 +133,6 @@ namespace MeshProcess public VHACD() { m_parameters.Init(); } - [ContextMenu("Generate Convex Meshes")] public unsafe List GenerateConvexMeshes(Mesh mesh = null) { if (mesh == null) diff --git a/Runtime/vhacd.asmdef b/Runtime/vhacd.asmdef index 89cacbd..e52834c 100644 --- a/Runtime/vhacd.asmdef +++ b/Runtime/vhacd.asmdef @@ -1,15 +1,22 @@ { "name": "vhacd", - "rootNamespace": "VHACD", - "references": [], - "includePlatforms": [ + "rootNamespace": "MeshProcess", + "references": [ + "GUID:80ed647da8ce73c45b66c239eba0365a" ], + "includePlatforms": [], "excludePlatforms": [], "allowUnsafeCode": true, "overrideReferences": false, "precompiledReferences": [], "autoReferenced": true, "defineConstraints": [], - "versionDefines": [], + "versionDefines": [ + { + "name": "ru.shazbot.utils", + "expression": "", + "define": "UTILS" + } + ], "noEngineReferences": false } \ No newline at end of file diff --git a/package.json b/package.json index 718e1a0..0994f51 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,18 @@ { - "name": "com.unity.robotics.vhacd", - "version": "0.0.1-preview", + "name": "ru.shazbot.vhacd", + "version": "1.0.0", "displayName": "VHACD", - "description": "", + "description": "Based on https://github.com/Unity-Technologies/VHACD", + "licensesUrl": "https://git.well-placed.de/InnoLab/VHACD/src/LICENSE.md", "unity": "2020.3", "unityRelease": "19f1", - "_fingerprint": "d52fd80370d9257cb417999c6f5eab56604b3da9" -} + "keywords": [ + "vhacd" + ], + "author": { + "name": "Alexander Filippov", + "email": "alexander@shazbot.ru", + "url": "https://shazbot.ru/" + }, + "dependencies": { } +} \ No newline at end of file