CodePlexProject Hosting for Open Source Software

1

Vote
Hello,

First of all thank you for this beautiful library!

I'm not sure if I'm using the library in the correct way, but with the following code I get wrong results:

if a segment from point A to point B intersects the plane, also the segment from B to A should intersect, but I get false from the first test.

// z = 0

Plane plane = new Plane(Vector3F.ZAxis, 0);

Vector3F pointA = new Vector3F(0, 0, -10);

Vector3F pointB = new Vector3F(0, 0, 10);

Segment segmentAB = new Segment(pointA, pointB);

Segment segmentBA = new Segment(pointB, pointA);

IntersectionPair intersection = IntersectionMethods.Intersects(segmentAB, plane);

Console.WriteLine(intersection.IntersectionOccurred);

intersection = IntersectionMethods.Intersects(segmentBA, plane);

Console.WriteLine(intersection.IntersectionOccurred);

Many thanks,

Stenio Brunetta

First of all thank you for this beautiful library!

I'm not sure if I'm using the library in the correct way, but with the following code I get wrong results:

if a segment from point A to point B intersects the plane, also the segment from B to A should intersect, but I get false from the first test.

// z = 0

Plane plane = new Plane(Vector3F.ZAxis, 0);

Vector3F pointA = new Vector3F(0, 0, -10);

Vector3F pointB = new Vector3F(0, 0, 10);

Segment segmentAB = new Segment(pointA, pointB);

Segment segmentBA = new Segment(pointB, pointA);

IntersectionPair intersection = IntersectionMethods.Intersects(segmentAB, plane);

Console.WriteLine(intersection.IntersectionOccurred);

intersection = IntersectionMethods.Intersects(segmentBA, plane);

Console.WriteLine(intersection.IntersectionOccurred);

Many thanks,

Stenio Brunetta

No files are attached

## comments

stenio wrote Aug 20, 2007 at 3:36 PM

another issue:

There should be no intersection with the segment because its end points have a positive z.

stenio wrote Aug 21, 2007 at 2:54 PM

Regards,Stenio

Saint_Grey wrote Feb 8, 2010 at 7:44 PM

The original code is:

But the return statement should be the following:

wrote Feb 14, 2013 at 12:40 AM