Show / Hide Table of Contents

Class Lines.Algorithm

Various supported line-drawing algorithms.

Inheritance
Object
Lines.Algorithm
Namespace: SadRogue.Primitives
Assembly: TheSadRogue.Primitives.dll
Syntax
public sealed class Algorithm : Enum

Fields

Bresenham

Bresenham line algorithm. Points are guaranteed to be in order from start to finish.

Declaration
public const Lines.Algorithm Bresenham
Field Value
Type Description
Lines.Algorithm

DDA

Digital Differential Analyzer line algorithm. It will produce slightly different lines compared to Bresenham, and it takes approximately the same time as Bresenham (very slightly slower) for most inputs. Points are guaranteed to be in order from start to finish.

Declaration
public const Lines.Algorithm DDA
Field Value
Type Description
Lines.Algorithm

Orthogonal

Line algorithm that takes only orthogonal 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. Points are guaranteed to be in order from start to finish.

Declaration
public const Lines.Algorithm Orthogonal
Field Value
Type Description
Lines.Algorithm

value__

Declaration
public int value__
Field Value
Type Description
Int32

Extension Methods

PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>)
PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>, EventHandler<ValueChangedEventArgs<TProperty>>)
In This Article
Back to top Generated by DocFX