Skip to content

Commit 90301b1

Browse files
committed
test003b: verify the properties of a SphericalSegment
1 parent e990371 commit 90301b1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/test/java/TestLibbulletjme.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
6363
import com.jme3.bullet.collision.shapes.PlaneCollisionShape;
6464
import com.jme3.bullet.collision.shapes.SimplexCollisionShape;
6565
import com.jme3.bullet.collision.shapes.SphereCollisionShape;
66+
import com.jme3.bullet.collision.shapes.SphericalSegment;
6667
import com.jme3.bullet.collision.shapes.infos.BoundingValueHierarchy;
6768
import com.jme3.bullet.collision.shapes.infos.IndexedMesh;
6869
import com.jme3.bullet.joints.New6Dof;
@@ -657,6 +658,20 @@ public void test003b() {
657658
buf = DebugShapeFactory.getDebugTriangles(
658659
sphere, DebugShapeFactory.lowResolution);
659660
Assert.assertEquals(720, buf.capacity());
661+
662+
// SphericalSegment
663+
SphericalSegment segment = new SphericalSegment(1f);
664+
verifyCollisionShapeDefaults(segment);
665+
Assert.assertEquals(0.04f, segment.getMargin(), 0f);
666+
Assert.assertEquals(19, segment.getShapeType());
667+
Assert.assertFalse(segment.isConcave());
668+
Assert.assertTrue(segment.isConvex());
669+
Assert.assertFalse(segment.isInfinite());
670+
Assert.assertFalse(segment.isNonMoving());
671+
Assert.assertFalse(segment.isPolyhedral());
672+
buf = DebugShapeFactory.getDebugTriangles(
673+
sphere, DebugShapeFactory.lowResolution);
674+
Assert.assertEquals(720, buf.capacity());
660675
}
661676

662677
/**

0 commit comments

Comments
 (0)