Enum Lines.Algorithm
Various supported line-drawing algorithms.
Namespace: GoRogue
Assembly: GoRogue.dll
Syntax
public enum Algorithm
Fields
Name | Description |
---|---|
BRESENHAM | Bresenham's line algorithm. |
BRESENHAM_ORDERED | Bresenham's line algorithm, with the points guaranteed to be in start to finish order. This may be significantly slower than BRESENHAM, so if you really need ordering, considerDDA instead, as it is both faster than Bresenham's and implicitly ordered. |
DDA | DDA line algorithm -- effectively an optimized algorithm for producing Brensham-like lines. There may be slight differences in appearance when compared to lines created with Bresenham's, however this algorithm may also be measurably faster. Based on the algorithm here, , as well as the Java library Squidlib's implementation. Points are guaranteed to be in order from start to finish. |
ORTHO | Line algorithm that takes only orthoganal steps (each grid location on the line returned is within one cardinal direction of the previous one). Potentially useful for LOS in games that use MANHATTAN distance. Based on the algorithm here. |