Skip to content

Commit

Permalink
TestLibbulletjme: test V-HACD on a well-behaved mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Feb 9, 2025
1 parent 42c63c3 commit a33f76e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/java/TestLibbulletjme.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2020-2024 Stephen Gold
Copyright (c) 2020-2025 Stephen Gold
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -198,7 +198,7 @@ public void test002() {
2f, 1f, 0f,
1f, 1f, 0f,
1f, 3f, 0f,
0f, 3f, 1f,
0f, 3f, 0f,
0f, 0f, 1f,
2f, 0f, 1f,
2f, 1f, 1f,
Expand Down Expand Up @@ -237,7 +237,7 @@ public void test002() {
parameters4.setMaxRecursion(2);
List<Vhacd4Hull> vhacd4Hulls
= Vhacd4.compute(positionArray, indexArray, parameters4);
Assert.assertEquals(6, vhacd4Hulls.size());
Assert.assertEquals(3, vhacd4Hulls.size());

CompoundCollisionShape compound = new CompoundCollisionShape();
int numHullVertices = 0;
Expand All @@ -246,7 +246,7 @@ public void test002() {
numHullVertices += hullShape.countHullVertices();
compound.addChildShape(hullShape);
}
Assert.assertEquals(72, numHullVertices);
Assert.assertEquals(24, numHullVertices);

// Verify the VHACDParameters defaults.
VHACDParameters parameters = new VHACDParameters();
Expand All @@ -273,7 +273,7 @@ public void test002() {
numHullVertices += hullShape.countHullVertices();
compound.addChildShape(hullShape);
}
Assert.assertEquals(25, numHullVertices);
Assert.assertEquals(16, numHullVertices);

vhacd4Hulls = null;
vhacdHulls = null;
Expand Down

0 comments on commit a33f76e

Please sign in to comment.