From e990371f528383f153392a72adfb577d28b705dc Mon Sep 17 00:00:00 2001 From: stephengold Date: Sun, 28 Apr 2024 17:47:42 -0700 Subject: [PATCH] PhysicsDescriber: describe spherical segments --- .../java/jme3utilities/minie/PhysicsDescriber.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/jme3utilities/minie/PhysicsDescriber.java b/src/main/java/jme3utilities/minie/PhysicsDescriber.java index c62e7f5e..eff7575b 100644 --- a/src/main/java/jme3utilities/minie/PhysicsDescriber.java +++ b/src/main/java/jme3utilities/minie/PhysicsDescriber.java @@ -49,6 +49,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE import com.jme3.bullet.collision.shapes.PlaneCollisionShape; import com.jme3.bullet.collision.shapes.SimplexCollisionShape; import com.jme3.bullet.collision.shapes.SphereCollisionShape; +import com.jme3.bullet.collision.shapes.SphericalSegment; import com.jme3.bullet.joints.Anchor; import com.jme3.bullet.joints.Constraint; import com.jme3.bullet.joints.JointEnd; @@ -280,6 +281,19 @@ public String describe(CollisionShape shape) { float radius = sphere.getRadius(); result.append(MyString.describe(radius)); + } else if (shape instanceof SphericalSegment) { + SphericalSegment segment = (SphericalSegment) shape; + result.append(" r="); + float radius = segment.sphereRadius(); + result.append(MyString.describe(radius)); + result.append(" y["); + float yMin = segment.yMin(); + result.append(MyString.describe(yMin)); + result.append(' '); + float yMax = segment.yMax(); + result.append(MyString.describe(yMax)); + result.append(']'); + } else if (!(shape instanceof CustomConvexShape)) { result.append('?'); }