[Pogamut-list] Raytracing Bug

jacob.schrum pogamut-forum at diana.ms.mff.cuni.cz
Mon May 24 22:45:09 CEST 2010


Raytracing Bug

Author: jacob.schrum

There seems to be a bug with raytracing. I was using the RaycastingBot to learn about rays, and I noticed that although this bot defines 5 AutoTraceRays, it only references 3 of them in the flagChanged method of the listener that checks the rays. If you change the body of that method from:
---------------------------
left = raycasting.getRay(LEFT45);
front = raycasting.getRay(FRONT);
right = raycasting.getRay(RIGHT45);
----------------------------
to
----------------------------
System.out.println("traces");
AutoTraceRay temp = raycasting.getRay(LEFT90);
left = raycasting.getRay(LEFT45);
front = raycasting.getRay(FRONT);
right = raycasting.getRay(RIGHT45);
temp = raycasting.getRay(RIGHT90);
System.out.println("finished");
----------------------------

Then the method hangs forever. I know this because the "finished" at the end never gets printed. Finding this bug was pretty annoying. This was all in 3.0.11 by the way.

On a related note, why isn't there a method like getAutoTraces() anymore that simply returns the current state of all previously defined autotraces?

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_parentId=194#form>





More information about the Pogamut-list mailing list