Web Wargaming

Web Wargaming Home  Line of Sight
LOS

a simple array will store the hexpartX and hexpartY coordinates of the los line.

Three different los methods are used depending on the los line type.

The setupZigZagLos method is used for a odd numbered bearing.
This method uses the geometry distance of a point from a line function.
one of my personal favorite hexpart math tricks!

The setupStraightLos method is used for a even numbered bearing
easiest one, just step thru the straight los line.

The setupCornerLos method is used for a even numbered bearing that requires checking from the hexagon corner resulting in doubled hexagons.
Again, just step thru the los line, but every other hexagon check selects 2 side by side hexagons


copyright (c) 1998-2007
These programs are free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.