Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose a line of sight method to the Grid class #17

Open
Yonaba opened this issue Nov 4, 2013 · 3 comments
Open

Expose a line of sight method to the Grid class #17

Yonaba opened this issue Nov 4, 2013 · 3 comments

Comments

@Yonaba
Copy link
Owner

Yonaba commented Nov 4, 2013

Will check if a given node is visible from another given node.

-- Returns true if nodeB is visible from nodeA or vice versa
-- allowDiagonal will depend on the number of allowed directions when moving.
function Grid:lineOfSight(nodeA, nodeB)
@Yonaba
Copy link
Owner Author

Yonaba commented Jan 4, 2014

I will definitely have to try Eugen Dedu's Bresenham-based supercover line algorithm for the following reason:

@Yonaba
Copy link
Owner Author

Yonaba commented Feb 5, 2014

There is an implementation available.

@Yonaba
Copy link
Owner Author

Yonaba commented May 28, 2014

The following paper can also serve as reference: A fast voxel traversal algorithm for raytracing (direct pdf link)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant