From a617159f8b7aeb79cc484126f081f53e1b5f1627 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 4 Jan 2015 13:52:14 -0800 Subject: [PATCH] BulletSim: correct some of the debugging input and output of PrimitiveBaseShape. Whoever defined that structure was really into esoteric coding. --- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 6 ++++-- OpenSim/Region/Physics/BulletSPlugin/Tests/HullCreation.cs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 238fcc2adf..f8e8f572d9 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -953,8 +953,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters float pathShearY = pbs.PathShearY < 128 ? (float)pbs.PathShearY * 0.01f : (float)(pbs.PathShearY - 256) * 0.01f; float pathBegin = (float)pbs.PathBegin * 2.0e-5f; float pathEnd = 1.0f - (float)pbs.PathEnd * 2.0e-5f; - float pathScaleX = (float)(pbs.PathScaleX - 100) * 0.01f; - float pathScaleY = (float)(pbs.PathScaleY - 100) * 0.01f; + float pathScaleX = (float)(200 - pbs.PathScaleX) * 0.01f; + float pathScaleY = (float)(200 - pbs.PathScaleY) * 0.01f; + float pathTaperX = pbs.PathTaperX * 0.01f; + float pathTaperY = pbs.PathTaperY * 0.01f; float profileBegin = (float)pbs.ProfileBegin * 2.0e-5f; float profileEnd = 1.0f - (float)pbs.ProfileEnd * 2.0e-5f; diff --git a/OpenSim/Region/Physics/BulletSPlugin/Tests/HullCreation.cs b/OpenSim/Region/Physics/BulletSPlugin/Tests/HullCreation.cs index 4bec062fe7..608a6e64b2 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/Tests/HullCreation.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/Tests/HullCreation.cs @@ -135,6 +135,8 @@ public class HullCreation : OpenSimTestCase pbs = PrimitiveBaseShape.CreateSphere(); pbs.ProfileShape = (byte)ProfileShape.Circle; pbs.PathCurve = (byte)Extrusion.Curve1; + pbs.PathScaleX = 100; // default hollow info as set in the viewer + pbs.PathScaleY = 25; pos = new Vector3(120.0f, 120.0f, 0f); pos.Z = PhysicsScene.TerrainManager.GetTerrainHeightAtXYZ(pos) + 10f; ObjectInitPosition = pos; @@ -182,8 +184,8 @@ public class HullCreation : OpenSimTestCase prim.PhysScene.DetailLog("{0}, mesh, shapeInfo={1}", prim.Name, mShape.shapeInfo); break; case "OpenSim.Region.Physics.BulletSPlugin.BSShapeHull": - // BSShapeHull hShape = physShape as BSShapeHull; - // prim.PhysScene.DetailLog("{0}, hull, shapeInfo={1}", prim.Name, hShape.shapeInfo); + BSShapeHull hShape = physShape as BSShapeHull; + prim.PhysScene.DetailLog("{0}, hull, shapeInfo={1}", prim.Name, hShape.shapeInfo); break; case "OpenSim.Region.Physics.BulletSPlugin.BSShapeConvexHull": BSShapeConvexHull chShape = physShape as BSShapeConvexHull;