Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible EPA Algorithm Issues #2 #3

Closed
kovertopz opened this issue Oct 7, 2014 · 2 comments
Closed

Possible EPA Algorithm Issues #2 #3

kovertopz opened this issue Oct 7, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@kovertopz
Copy link

There is one more issue with the EPA I've discovered and that is when case 4 falls through to case 3. When it attempts to fix the bad vertex (line 249) it will set it to a point that never exists (point #5). It never exists because we jumped to case 4 because we knew we got 4 points from the simplex. I'm not sure how C++ handles this if you would get a null pointer of if the array was initialized to contain all dummy objects. This case of it falling through from 4 into 3 only seems to happen for cylinders for me and is very rare so it is difficult to reproduce.

Got 3 from the simplex.
Case 3 is starting.
Case 3 is falling through breaking out of the switch.
Normal: (x= -6.16584E-5, y= -1.0, z= -8.335716E-6) Depth: 0.63282037
Got 4 from the simplex.
Case 4 is starting.
Case 4 had bad vertex 0.
Got 4 from the simplex.
Case 4 is starting.
Case 4 had bad vertex 0.
Got 4 from the simplex.
Case 4 is starting.
Case 4 had bad vertex 0.
Got 4 from the simplex.
Case 4 is starting.
Case 4 had bad vertex 0.
Got 4 from the simplex.
Case 4 is starting.
Case 4 had bad vertex 0.
Got 4 from the simplex.
Case 4 is starting.
Case 4 had bad vertex 0.
Got 4 from the simplex.
Case 4 is starting.
Case 4 had bad vertex 0.
Got 4 from the simplex.
Case 4 is starting.
Case 4 had bad vertex 0.
Got 4 from the simplex.
Case 4 is starting.
Case 4 had bad vertex 0.
Got 4 from the simplex.
Case 4 is starting.
Case 4 had bad vertex less 4: 1
Case 4 is falling through to case 3.
Case 3 is starting.
Oct 06, 2014 11:40:19 PM net.smert.jreactphysics3d.framework.Application$1 run
java.lang.NullPointerException
at net.smert.jreactphysics3d.mathematics.Vector3.subtract(Vector3.java:238)
at net.smert.jreactphysics3d.collision.narrowphase.EPA.EPAAlgorithm.computePenetrationDepthAndContactPoints(EPAAlgorithm.java:323)
at net.smert.jreactphysics3d.collision.narrowphase.GJK.GJKAlgorithm.computePenetrationDepthForEnlargedObjects(GJKAlgorithm.java:197)
at net.smert.jreactphysics3d.collision.narrowphase.GJK.GJKAlgorithm.testCollision(GJKAlgorithm.java:309)

@DanielChappuis DanielChappuis self-assigned this Oct 7, 2014
@DanielChappuis
Copy link
Owner

I think I have fixed this issue in the following commit : 54d8b85

This correction will be part of the next release of the library.

@DanielChappuis DanielChappuis added this to the Version 0.5.0 milestone Jan 19, 2015
@DanielChappuis
Copy link
Owner

This fix is now part of the last release of the library (version 0.5.0).

I will therefore close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants