Raytracing

After viewing the raytracing demos, I decided to use raytracing in my simulation of multiple robots. Unfortunately, I have a little trouble understanding the proper implementation of it. I could not find any documentation on the raytracing classes, and the code is not entirely commented. Is there somewhere I can look to in order to find the documentation, or maybe does someone have another, more thoroughly documented simulation I could look at for reference?

I appreciate any help!

~Moto

Raytracing

The raytrace method should be documented in the Real class. I didn't write that particular method and haven't used it myself, but it looks fairly straightforward to me from the description and the demo.

For an agent X that wants to try to scan for agent Y, in direction D:

Y raytrace from-location (X get-location) with-direction D.

It's a little confusing I suppose, since the "target" of the ray is the one executing the method. The return value of the function is the vector distance between Y and the start location.

- jon

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.