![]() |
Adventure at Umalu
22nd March, 2013
Rogue-like Dungeon Crawler, written in Java
|
Protected Member Functions | |
Collection< Coordinate > | calcViewField (World world, int x, int y, int r) |
Collection< Coordinate > | calcViewFieldplayer (World world, int x, int y, int r) |
Additional Inherited Members | |
![]() | |
final Collection< Coordinate > | getViewField (World world, int x, int y, int r) |
final Collection< Coordinate > | getViewFieldplayer (World world, int x, int y, int r) |
final Collection< Coordinate > | getViewField (World world, Coordinate coord, int r) |
Uses shadow casting to quickly calculate a view field. Shadow casting is more complicated than ray casting, but will only visit each tile once. This gives it a significant advantage over ray casting which revisits cells multiple times when the view field is large. For this reason, shadow casting is much more popular than the simpler ray casting.
|
protectedvirtual |
Calculates the field of view on the given
from the given (x, y) coordinates with the specified radius.
world | the World
|
x | the x value of the coordinate being queried |
y | the y value of the coordinate being queried |
r | the radius of the field of view |
Implements jade.fov.ViewField.