From 7d8cb244d1148d70b43c51add04e095bd1160cd7 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Mon, 12 Dec 2016 19:16:51 +0000
Subject: ubOde other convex type objects other than mesh and sculpt also don't
have holes
---
OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/PhysicsModules/ubOdeMeshing')
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
}
else
{
- if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, lod, out coords, out faces))
+ if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, lod, convex, out coords, out faces))
return null;
}
@@ -942,7 +942,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
/// Faces are added to this list by the method.
/// true if coords and faces were successfully generated, false if not
private bool GenerateCoordsAndFacesFromPrimShapeData(
- string primName, PrimitiveBaseShape primShape, float lod, out List coords, out List faces)
+ string primName, PrimitiveBaseShape primShape, float lod, bool convex,
+ out List coords, out List faces)
{
PrimMesh primMesh;
coords = new List();
@@ -970,7 +971,9 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
profileBegin = profileEnd - 0.02f;
float profileHollow = (float)primShape.ProfileHollow * 2.0e-5f;
- if (profileHollow > 0.95f)
+ if(convex)
+ profileHollow = 0.0f;
+ else if (profileHollow > 0.95f)
profileHollow = 0.95f;
int sides = 4;
--
cgit v1.1