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

RayCast Edge Polygons #28

Closed
GoogleCodeExporter opened this issue Apr 10, 2015 · 3 comments
Closed

RayCast Edge Polygons #28

GoogleCodeExporter opened this issue Apr 10, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Make an edge polygon
2. Trace a ray through it


What is the expected output? What do you see instead?
Test should always pass, but it passes only sometimes.

What version of the product are you using? On what operating system?
rev22, Windows, VC++2008

Please provide any additional information below.
The bug is between the 249 and 252 lines of b2PolygonShape.cpp

        if (upper < lower)
        {
            return;
        }

In case of edged polygon upper is equal to lower excluding floating point 
error. Due to this error the test passes/fails randomly

Possible solution is to use "upper - level < EPSILON" or to process the 
case of 2 vertices (an edge) separately.

Original issue reported on code.google.com by dipya...@gmail.com on 15 Oct 2009 at 9:49

@GoogleCodeExporter
Copy link
Author

A little mistake - it should be "upper - level < -EPSILON"

Original comment by dipya...@gmail.com on 15 Oct 2009 at 9:56

@GoogleCodeExporter
Copy link
Author

Original comment by erinca...@gmail.com on 20 Nov 2009 at 7:42

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Fixed, thanks!

Original comment by erinca...@gmail.com on 20 Nov 2009 at 8:30

  • Changed state: Fixed

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

No branches or pull requests

1 participant