public Line(int index, MapLinedef linedef, Vec2F start, Vec2F end, Side front, Side back = null) { Index = index; Front = front; Back = new Optional <Side>(back); Segment = new Seg2F(start, end); Unpegged = ToUnpegged(linedef); front.Line = this; if (back != null) { back.Line = this; } }
/// <summary> /// Checks if the upper flag is set on this. /// </summary> /// <param name="unpegged">The unpegged value.</param> /// <returns>True if it has the upper flag set.</returns> public static bool HasUpper(this Unpegged unpegged) { return(unpegged == Unpegged.Upper || unpegged == Unpegged.UpperAndLower); }