Segment.testSegment() should not auto-cull backfaces.

I'm currently building a custom convex decomposition, and I am having a similar problem to this poster:

viewtopic.php?f=8&t=1437&p=14554&hilit=edge+intersection#p14554

Quote:
Collisions between an edge and the ray are ignored if the ray starts inside a rock loop (as the ray is coming from the wrong side of the edge). This is the same for a ray starting outside of a boundry loop.


...In truth, should Segment.testSegment() automatically assume that we want backface culling? As it applies to Box2d's existing functionality (in particular, edge shapes AFAIK), this is understandable, but the concept of a line segment is a generic one that should allow intersection testing that can return a true result irrespective of which side of the line we're coming from. So I don't really believe backface culling should be forced on users of the class, but rather that should be specified as a boolean parameter to the call, eg. cullBackface = true.

For me right now, this is forcing me to either create my own segment class to deal with the problem, or at least a static method to do so, when really I should be using what is already provided. I could (might) change the Box2d source myself, but I hate modifying code from third party libs as it can confuse issues up when updating from the repository.

I searched the most recent rev of JBox2d and see 17 places where a call to testSegment() is made, so it shouldn't be too tough to simply change the parameter list and put a conditional in before doing the backface culling.

Does this sound reasonable?
Yeah, but this doesn't exist in the current C++ version. My current plan for edge shapes is to make them 2 sided.

Should you be posting a different forum?
Moved to Java forum...

Original thread: https://box2d.org/forum/viewtopic.php?t=5314