Skip to content

Commit

Permalink
PhysicsDescriber: add detail to descriptions of {GImpact/mesh} shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Mar 19, 2024
1 parent 57870ae commit 9820b0b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main/java/jme3utilities/minie/PhysicsDescriber.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 9820b0b

Please sign in to comment.