realbasic-games
[Top] [All Lists]

Re: Bug? LineSegmentIntersection

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Bug? LineSegmentIntersection
From: Lo Saeteurn <realbasic at miensoftware dot com>
Date: Wed, 21 Sep 2005 13:50:52 -0700
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <A62133C5-26E7-4F77-85C7-3CBD6D5AC3CA at miensoftware dot com> <a06200716bf573a7915d2 at [10 dot 0 dot 1 dot 4]> <DA804B0A-B054-436E-8DBD-B29A2DC27CBC at miensoftware dot com> <a06200719bf5744806f46 at [10 dot 0 dot 1 dot 4]> <F389409D-6517-41A7-9DA3-44D27731498B at miensoftware dot com> <a0620071cbf575de56299 at [10 dot 0 dot 1 dot 4]>
Here is the project showing the failure of RB's test and the success of mine:
http://www.miensoftware.com/files/testbug.zip

i wrote everything from scratch and is as simple as possible. Could it be the bounds themselves that were somehow miscalculated internally? But then again, it works with method 2! Though method 2 may incorrectly show success all the time.

Let me know what you find.

On Sep 21, 2005, at 12:03 PM, Joseph J. Strout wrote:

At 10:40 AM -0700 9/21/05, Lo Saeteurn wrote:


Yes that is possible, but I would need to create something that allows me to visibly see if there's a problem with the internal method.


No, you should only need to see if it indicates an intersection, and compare this with the correct answer (calculated by hand). Something like:

  Dim b as New Bounds3D
  b.Center = New Vector3D(53,0.5,42)
  b.Radius = 12.34
  if b.LineSegmentIntersection( New Vector3D(50, 0.5, 42), _
    New Vector3D(60, 0.5, 42) ) = nil then
    MsgBox "See?  It's broken!"
  end if

Visibility and so on is just extra complexity -- which may be where the real problem lies. That's why trying to isolate it to a particular function will be so useful; you'll either demonstrate a clear bug, or discover that the bug lies somewhere else.

At 11:38 AM -0700 9/21/05, Lo Saeteurn wrote:


So you see nothing wrong with the way I'm using it in my code?


I couldn't follow your code, at least in the time I had available to look at it.

Best,
- Joe

--
Joe Strout                          REAL Software, Inc.

Vote for REALbasic (twice!) in the LinuxWorld Reader's Choice Awards:
http://linux.sys-con.com/general/readerschoice.htm
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>