diff options
author | Robert Adams | 2015-01-25 13:24:09 -0800 |
---|---|---|
committer | Robert Adams | 2015-01-25 13:24:09 -0800 |
commit | de7611662472ffcae3c18976037a87a384864308 (patch) | |
tree | 78fe350779030f4d145069f1e4423df4816b7482 /OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |
parent | Revert "In GetDisplayNames, if user last name is Resident then only send firs... (diff) | |
download | opensim-SC-de7611662472ffcae3c18976037a87a384864308.zip opensim-SC-de7611662472ffcae3c18976037a87a384864308.tar.gz opensim-SC-de7611662472ffcae3c18976037a87a384864308.tar.bz2 opensim-SC-de7611662472ffcae3c18976037a87a384864308.tar.xz |
BulletSim: add parameters and parameter definitions for VHACD
addition coming.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSParam.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs index ef75e3f..6d46fe6 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |||
@@ -183,6 +183,7 @@ public static class BSParam | |||
183 | public static bool VehicleEnableAngularBanking { get; private set; } | 183 | public static bool VehicleEnableAngularBanking { get; private set; } |
184 | 184 | ||
185 | // Convex Hulls | 185 | // Convex Hulls |
186 | // Parameters for convex hull routine that ships with Bullet | ||
186 | public static int CSHullMaxDepthSplit { get; private set; } | 187 | public static int CSHullMaxDepthSplit { get; private set; } |
187 | public static int CSHullMaxDepthSplitForSimpleShapes { get; private set; } | 188 | public static int CSHullMaxDepthSplitForSimpleShapes { get; private set; } |
188 | public static float CSHullConcavityThresholdPercent { get; private set; } | 189 | public static float CSHullConcavityThresholdPercent { get; private set; } |
@@ -198,6 +199,22 @@ public static class BSParam | |||
198 | public static bool BHullAddNeighboursDistPoints { get; private set; } // false | 199 | public static bool BHullAddNeighboursDistPoints { get; private set; } // false |
199 | public static bool BHullAddFacesPoints { get; private set; } // false | 200 | public static bool BHullAddFacesPoints { get; private set; } // false |
200 | public static bool BHullShouldAdjustCollisionMargin { get; private set; } // false | 201 | public static bool BHullShouldAdjustCollisionMargin { get; private set; } // false |
202 | public static float WhichHACD { get; private set; } // zero if Bullet HACD, non-zero says VHACD | ||
203 | // Parameters for VHACD 2.0: http://code.google.com/p/v-hacd | ||
204 | // To enable, set both ShouldUseBulletHACD=true and WhichHACD=1 | ||
205 | // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html | ||
206 | public static float VHACDresolution { get; private set; } // 100,000 max number of voxels generated during voxelization stage | ||
207 | public static float VHACDdepth { get; private set; } // 20 max number of clipping stages | ||
208 | public static float VHACDconcavity { get; private set; } // 0.0025 maximum concavity | ||
209 | public static float VHACDplaneDownsampling { get; private set; } // 4 granularity of search for best clipping plane | ||
210 | public static float VHACDconvexHullDownsampling { get; private set; } // 4 precision of hull gen process | ||
211 | public static float VHACDalpha { get; private set; } // 0.05 bias toward clipping along symmetry planes | ||
212 | public static float VHACDbeta { get; private set; } // 0.05 bias toward clipping along revolution axis | ||
213 | public static float VHACDgamma { get; private set; } // 0.00125 max concavity when merging | ||
214 | public static float VHACDpca { get; private set; } // 0 on/off normalizing mesh before decomp | ||
215 | public static float VHACDmode { get; private set; } // 0 0:voxel based, 1: tetrahedron based | ||
216 | public static float VHACDmaxNumVerticesPerCH { get; private set; } // 64 max triangles per convex hull | ||
217 | public static float VHACDminVolumePerCH { get; private set; } // 0.0001 sampling of generated convex hulls | ||
201 | 218 | ||
202 | // Linkset implementation parameters | 219 | // Linkset implementation parameters |
203 | public static float LinksetImplementation { get; private set; } | 220 | public static float LinksetImplementation { get; private set; } |
@@ -749,6 +766,33 @@ public static class BSParam | |||
749 | new ParameterDefn<bool>("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin", | 766 | new ParameterDefn<bool>("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin", |
750 | false ), | 767 | false ), |
751 | 768 | ||
769 | new ParameterDefn<float>("WhichHACD", "zero if Bullet HACD, non-zero says VHACD", | ||
770 | 0f ), | ||
771 | new ParameterDefn<float>("VHACDresolution", "max number of voxels generated during voxelization stage", | ||
772 | 100000f ), | ||
773 | new ParameterDefn<float>("VHACDdepth", "max number of clipping stages", | ||
774 | 20f ), | ||
775 | new ParameterDefn<float>("VHACDconcavity", "maximum concavity", | ||
776 | 0.0025f ), | ||
777 | new ParameterDefn<float>("VHACDplaneDownsampling", "granularity of search for best clipping plane", | ||
778 | 4f ), | ||
779 | new ParameterDefn<float>("VHACDconvexHullDownsampling", "precision of hull gen process", | ||
780 | 4f ), | ||
781 | new ParameterDefn<float>("VHACDalpha", "bias toward clipping along symmetry planes", | ||
782 | 0.05f ), | ||
783 | new ParameterDefn<float>("VHACDbeta", "bias toward clipping along revolution axis", | ||
784 | 0.05f ), | ||
785 | new ParameterDefn<float>("VHACDgamma", "max concavity when merging", | ||
786 | 0.00125f ), | ||
787 | new ParameterDefn<float>("VHACDpca", "on/off normalizing mesh before decomp", | ||
788 | 0f ), | ||
789 | new ParameterDefn<float>("VHACDmode", "0:voxel based, 1: tetrahedron based", | ||
790 | 0f ), | ||
791 | new ParameterDefn<float>("VHACDmaxNumVerticesPerCH", "max triangles per convex hull", | ||
792 | 64f ), | ||
793 | new ParameterDefn<float>("VHACDminVolumePerCH", "sampling of generated convex hulls", | ||
794 | 0.0001f ), | ||
795 | |||
752 | new ParameterDefn<float>("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)", | 796 | new ParameterDefn<float>("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)", |
753 | (float)BSLinkset.LinksetImplementation.Compound ), | 797 | (float)BSLinkset.LinksetImplementation.Compound ), |
754 | new ParameterDefn<bool>("LinksetOffsetCenterOfMass", "If 'true', compute linkset center-of-mass and offset linkset position to account for same", | 798 | new ParameterDefn<bool>("LinksetOffsetCenterOfMass", "If 'true', compute linkset center-of-mass and offset linkset position to account for same", |