olp-cpp-sdk
1.23.1
|
Implements Bresenham's line algorithm with a square sliding window. More...
#include <PathTiling.h>
Classes | |
struct | State |
Holds the state of the line traversal. More... | |
Static Public Member Functions | |
static TileKey | Value (const State &state) |
Evaluates the current tile key from the given state. More... | |
static bool | Iterate (State &state) |
Iterates the state towards the end of the line. More... | |
static State | Init (const TileKey start_tile, const TileKey end_tile, const int32_t sliding_window_half_size) |
Initializes the line state between two tiles. More... | |
Implements Bresenham's line algorithm with a square sliding window.
This class provides a way to iterate over a line while considering a sliding window to enable line width.
|
inlinestatic |
Initializes the line state between two tiles.
start_tile | The starting tile. |
end_tile | The ending tile. |
sliding_window_half_size | The half-size of the sliding window. |
|
inlinestatic |
Iterates the state towards the end of the line.
state | The current state of the line traversal. |
Evaluates the current tile key from the given state.
state | The current state of the line traversal. |