From 9820b0bed6c3605d55b90458a744001a8e71e803 Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Mon, 18 Mar 2024 20:37:01 -0700 Subject: [PATCH] PhysicsDescriber: add detail to descriptions of {GImpact/mesh} shapes --- .../java/jme3utilities/minie/PhysicsDescriber.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/jme3utilities/minie/PhysicsDescriber.java b/src/main/java/jme3utilities/minie/PhysicsDescriber.java index ee3765a3..542dc9f9 100644 --- a/src/main/java/jme3utilities/minie/PhysicsDescriber.java +++ b/src/main/java/jme3utilities/minie/PhysicsDescriber.java @@ -177,8 +177,11 @@ public String describe(CollisionShape shape) { result.append(desc); } else if (shape instanceof GImpactCollisionShape) { - int numV = ((GImpactCollisionShape) shape).countMeshVertices(); - desc = String.format("[%d]", numV); + GImpactCollisionShape giShape = (GImpactCollisionShape) shape; + int numS = giShape.countSubmeshes(); + int numT = giShape.countMeshTriangles(); + int numV = giShape.countMeshVertices(); + desc = String.format("[numS=%s numT=%d numV=%d]", numS, numT, numV); result.append(desc); } else if (shape instanceof HeightfieldCollisionShape) { @@ -192,8 +195,11 @@ public String describe(CollisionShape shape) { result.append(desc); } else if (shape instanceof MeshCollisionShape) { - int numV = ((MeshCollisionShape) shape).countMeshVertices(); - desc = String.format("[%d]", numV); + MeshCollisionShape meshShape = (MeshCollisionShape) shape; + int numS = meshShape.countSubmeshes(); + int numT = meshShape.countMeshTriangles(); + int numV = meshShape.countMeshVertices(); + desc = String.format("[numS=%s numT=%d numV=%d]", numS, numT, numV); result.append(desc); } else if (shape instanceof MinkowskiSum) {