@@ -37,7 +37,7 @@ public class BoxShape extends ConvexShape {
3737 /**
3838 * Instantiate a cubic shape with the specified half extents.
3939 *
40- * @param halfExtent the desired half extents (≥0.05 )
40+ * @param halfExtent the desired half extents (>0 )
4141 */
4242 public BoxShape (float halfExtent ) {
4343 this (halfExtent , halfExtent , halfExtent );
@@ -46,22 +46,18 @@ public BoxShape(float halfExtent) {
4646 /**
4747 * Instantiate a shape with the specified half extents.
4848 *
49- * @param xHalfExtent the desired half extents on the local X axis
50- * (≥0.05)
51- * @param yHalfExtent the desired half extents on the local Y axis
52- * (≥0.05)
53- * @param zHalfExtent the desired half extents on the local Z axis
54- * (≥0.05)
49+ * @param xHalfExtent the desired half extent on the local X axis (>0)
50+ * @param yHalfExtent the desired half extent on the local Y axis (>0)
51+ * @param zHalfExtent the desired half extent on the local Z axis (>0)
5552 */
5653 public BoxShape (float xHalfExtent , float yHalfExtent , float zHalfExtent ) {
57- float convexRadius = Jolt .cDefaultConvexRadius ;
58- assert xHalfExtent >= convexRadius : xHalfExtent ;
59- assert yHalfExtent >= convexRadius : yHalfExtent ;
60- assert zHalfExtent >= convexRadius : zHalfExtent ;
54+ assert xHalfExtent > 0f : xHalfExtent ;
55+ assert yHalfExtent > 0f : yHalfExtent ;
56+ assert zHalfExtent > 0f : zHalfExtent ;
6157
6258 long materialVa = 0L ;
6359 long shapeVa = createBoxShape (xHalfExtent , yHalfExtent , zHalfExtent ,
64- convexRadius , materialVa );
60+ Jolt . cDefaultConvexRadius , materialVa );
6561 setVirtualAddressAsCoOwner (shapeVa );
6662 }
6763
@@ -79,7 +75,7 @@ public BoxShape(float xHalfExtent, float yHalfExtent, float zHalfExtent) {
7975 * Instantiate a shape with the specified half extents.
8076 *
8177 * @param halfExtents the desired half extents on each local axis (not null,
82- * all components ≥0.05 , unaffected)
78+ * all components >0 , unaffected)
8379 */
8480 public BoxShape (Vec3Arg halfExtents ) {
8581 this (halfExtents , Jolt .cDefaultConvexRadius );
@@ -100,7 +96,7 @@ public BoxShape(Vec3Arg halfExtents, float convexRadius) {
10096 * Instantiate a shape with the specified parameters.
10197 *
10298 * @param halfExtents the desired half extents on each local axis (not null,
103- * all components ≥convexRadius , unaffected)
99+ * all components >0 , unaffected)
104100 * @param convexRadius the desired convex radius (default=0.05)
105101 * @param material the desired material (default=null)
106102 */
@@ -109,9 +105,9 @@ public BoxShape(Vec3Arg halfExtents, float convexRadius,
109105 float xHalfExtent = halfExtents .getX ();
110106 float yHalfExtent = halfExtents .getY ();
111107 float zHalfExtent = halfExtents .getZ ();
112- assert xHalfExtent >= convexRadius : xHalfExtent ;
113- assert yHalfExtent >= convexRadius : yHalfExtent ;
114- assert zHalfExtent >= convexRadius : zHalfExtent ;
108+ assert xHalfExtent > 0f : xHalfExtent ;
109+ assert yHalfExtent > 0f : yHalfExtent ;
110+ assert zHalfExtent > 0f : zHalfExtent ;
115111
116112 long materialVa = (material == null ) ? 0L : material .targetVa ();
117113 long shapeVa = createBoxShape (xHalfExtent , yHalfExtent , zHalfExtent ,
0 commit comments