diff options
author | UbitUmarov | 2016-12-12 19:16:51 +0000 |
---|---|---|
committer | UbitUmarov | 2016-12-12 19:16:51 +0000 |
commit | 7d8cb244d1148d70b43c51add04e095bd1160cd7 (patch) | |
tree | 3ebd42ee5b7f6757ac5fa325e9562d9543ef9d29 /OpenSim/Region/PhysicsModules/ubOdeMeshing | |
parent | ubOde simple spheres and boxes with type convex have no holes on physics(long... (diff) | |
download | opensim-SC-7d8cb244d1148d70b43c51add04e095bd1160cd7.zip opensim-SC-7d8cb244d1148d70b43c51add04e095bd1160cd7.tar.gz opensim-SC-7d8cb244d1148d70b43c51add04e095bd1160cd7.tar.bz2 opensim-SC-7d8cb244d1148d70b43c51add04e095bd1160cd7.tar.xz |
ubOde other convex type objects other than mesh and sculpt also don't have holes
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs index 2ae0881..7f0713a 100644 --- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | |||
@@ -349,7 +349,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
349 | } | 349 | } |
350 | else | 350 | else |
351 | { | 351 | { |
352 | if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, lod, out coords, out faces)) | 352 | if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, lod, convex, out coords, out faces)) |
353 | return null; | 353 | return null; |
354 | } | 354 | } |
355 | 355 | ||
@@ -942,7 +942,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
942 | /// <param name="faces">Faces are added to this list by the method.</param> | 942 | /// <param name="faces">Faces are added to this list by the method.</param> |
943 | /// <returns>true if coords and faces were successfully generated, false if not</returns> | 943 | /// <returns>true if coords and faces were successfully generated, false if not</returns> |
944 | private bool GenerateCoordsAndFacesFromPrimShapeData( | 944 | private bool GenerateCoordsAndFacesFromPrimShapeData( |
945 | string primName, PrimitiveBaseShape primShape, float lod, out List<Coord> coords, out List<Face> faces) | 945 | string primName, PrimitiveBaseShape primShape, float lod, bool convex, |
946 | out List<Coord> coords, out List<Face> faces) | ||
946 | { | 947 | { |
947 | PrimMesh primMesh; | 948 | PrimMesh primMesh; |
948 | coords = new List<Coord>(); | 949 | coords = new List<Coord>(); |
@@ -970,7 +971,9 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
970 | profileBegin = profileEnd - 0.02f; | 971 | profileBegin = profileEnd - 0.02f; |
971 | 972 | ||
972 | float profileHollow = (float)primShape.ProfileHollow * 2.0e-5f; | 973 | float profileHollow = (float)primShape.ProfileHollow * 2.0e-5f; |
973 | if (profileHollow > 0.95f) | 974 | if(convex) |
975 | profileHollow = 0.0f; | ||
976 | else if (profileHollow > 0.95f) | ||
974 | profileHollow = 0.95f; | 977 | profileHollow = 0.95f; |
975 | 978 | ||
976 | int sides = 4; | 979 | int sides = 4; |