// Copyright (c) 2013-2014 Robert Rouhani and other contributors (see CONTRIBUTORS file). // Licensed under the MIT License - https://raw.github.com/Robmaister/SharpNav/master/LICENSE using System.Runtime.InteropServices; namespace SharpNav { /// /// A span is a range of integers which represents a range of voxels in a . /// [StructLayout(LayoutKind.Sequential)] public struct Span { /// /// The lowest value in the span. /// public int Minimum; /// /// The highest value in the span. /// public int Maximum; /// /// The span area id /// public Area Area; /// /// Initializes a new instance of the struct. /// /// The lowest value in the span. /// The highest value in the span. public Span(int min, int max) { Minimum = min; Maximum = max; Area = Area.Null; } /// /// Initializes a new instance of the struct. /// /// The lowest value in the span. /// The highest value in the span. /// The area flags for the span. public Span(int min, int max, Area area) { Minimum = min; Maximum = max; Area = area; } /// /// Gets the height of the span. /// public int Height { get { return Maximum - Minimum; } } } }