Skip to content

Commit

Permalink
PhysicsDescriber: describe spherical segments
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Apr 29, 2024
1 parent a08e13a commit e990371
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/java/jme3utilities/minie/PhysicsDescriber.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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('?');
}
Expand Down

0 comments on commit e990371

Please sign in to comment.