Isle
|
[AI] Represents a vertical span—a 1D range plus a set of contained horizontal segments, used as a row (span) of contiguous horizontal regions. More...
#include <mxregion.h>
Public Member Functions | |
MxSpan (MxS32 p_min, MxS32 p_max) | |
[AI] Constructs a span along the vertical axis with specified bounds. More... | |
MxSpan (MxRect32 &p_rect) | |
[AI] Constructs a span from a rectangle, vertically from top to bottom of the rectangle, containing one segment equal to the rectangle's horizontal span. More... | |
~MxSpan () | |
[AI] Destructor; releases the segment list and owned segments inside this span. More... | |
MxS32 | GetMin () |
[AI] Returns the vertical lower boundary of the span. More... | |
void | SetMin (MxS32 p_min) |
[AI] Sets the vertical lower boundary of the span. More... | |
MxS32 | GetMax () |
[AI] Returns the vertical upper boundary of the span. More... | |
void | SetMax (MxS32 p_max) |
[AI] Sets the vertical upper boundary of the span. More... | |
MxSpan * | Clone () |
[AI] Deep copies this span, including all its attached segments. More... | |
void | Compact () |
[AI] Compact this span, potentially merging adjacent or overlapping segments for optimal storage. More... | |
MxBool | Combine (MxSpan &p_span) |
[AI] Tries to merge this span with another, if possible (must be adjacent and have matching segments). More... | |
MxBool | Adjacent (MxSpan &p_span) |
[AI] Checks if this span is vertically adjacent to another (end-to-end). More... | |
MxBool | HasSameSegments (MxSpan &p_span) |
[AI] Checks for pointwise segment equivalence between two spans. More... | |
MxBool | IntersectsV (MxRect32 &p_rect) |
[AI] Check if this span vertically intersects a rectangle (vertical ranges overlap). More... | |
MxBool | IntersectsH (MxRect32 &p_rect) |
[AI] Checks if any segment in this span horizontally overlaps with the given rectangle. More... | |
void | AddSegment (MxS32 p_min, MxS32 p_max) |
[AI] Adds a horizontal segment to this span, merging with adjacent segments if required to maintain compactness. More... | |
MxBool | operator== (MxSpan &p_span) |
[AI] Tests for equality (vertical bounds and segments) with another span. More... | |
MxBool | operator!= (MxSpan &p_span) |
[AI] Tests for inequality with another span. More... | |
Protected Attributes | |
MxS32 | m_min |
[AI] Lower vertical boundary (usually 'top'). [AI] More... | |
MxS32 | m_max |
[AI] Upper vertical boundary (usually 'bottom'). [AI] More... | |
MxSegmentList * | m_segList |
[AI] List of horizontal segments covered by this vertical span. [AI] More... | |
Friends | |
class | MxRegionCursor |
[AI] Represents a vertical span—a 1D range plus a set of contained horizontal segments, used as a row (span) of contiguous horizontal regions.
This is foundational for complex region (polygon) representation by decomposing 2D space into vertical strips, each with 1D segment lists.
Definition at line 141 of file mxregion.h.
[AI] Constructs a span along the vertical axis with specified bounds.
p_min | Lower vertical boundary. [AI] |
p_max | Upper vertical boundary. [AI] |
Definition at line 396 of file mxregion.cpp.
MxSpan::MxSpan | ( | MxRect32 & | p_rect | ) |
[AI] Constructs a span from a rectangle, vertically from top to bottom of the rectangle, containing one segment equal to the rectangle's horizontal span.
[AI]
p_rect | Rectangle whose top/bottom form the span and whose left/right constitute its initial segment. [AI] |
Definition at line 405 of file mxregion.cpp.
|
inline |
[AI] Destructor; releases the segment list and owned segments inside this span.
Definition at line 164 of file mxregion.h.
[AI] Adds a horizontal segment to this span, merging with adjacent segments if required to maintain compactness.
p_min | Leftmost coordinate of the new segment. [AI] |
p_max | Rightmost coordinate of the new segment. [AI] |
Definition at line 417 of file mxregion.cpp.
[AI] Checks if this span is vertically adjacent to another (end-to-end).
p_span | Span to check adjacency against. [AI] |
Definition at line 211 of file mxregion.h.
MxSpan * MxSpan::Clone | ( | ) |
[AI] Deep copies this span, including all its attached segments.
Definition at line 464 of file mxregion.cpp.
[AI] Tries to merge this span with another, if possible (must be adjacent and have matching segments).
[AI]
p_span | Span to merge. [AI] |
void MxSpan::Compact | ( | ) |
[AI] Compact this span, potentially merging adjacent or overlapping segments for optimal storage.
[AI]
|
inline |
[AI] Returns the vertical upper boundary of the span.
Definition at line 180 of file mxregion.h.
|
inline |
[AI] Returns the vertical lower boundary of the span.
Definition at line 169 of file mxregion.h.
[AI] Checks for pointwise segment equivalence between two spans.
[AI]
p_span | Span to compare with. [AI] |
[AI] Checks if any segment in this span horizontally overlaps with the given rectangle.
[AI]
p_rect | Rectangle to test horizontal overlap. [AI] |
Definition at line 480 of file mxregion.cpp.
[AI] Check if this span vertically intersects a rectangle (vertical ranges overlap).
p_rect | Rectangle to check against. [AI] |
Definition at line 225 of file mxregion.h.
[AI] Tests for inequality with another span.
p_span | Span to compare. [AI] |
Definition at line 256 of file mxregion.h.
[AI] Tests for equality (vertical bounds and segments) with another span.
p_span | Span to test equality against. [AI] |
Definition at line 246 of file mxregion.h.
|
inline |
[AI] Sets the vertical upper boundary of the span.
p_max | New upper boundary value. [AI] |
Definition at line 186 of file mxregion.h.
|
inline |
[AI] Sets the vertical lower boundary of the span.
p_min | New lower boundary value. [AI] |
Definition at line 175 of file mxregion.h.
|
friend |
Definition at line 258 of file mxregion.h.
|
protected |
[AI] Upper vertical boundary (usually 'bottom'). [AI]
Definition at line 144 of file mxregion.h.
|
protected |
[AI] Lower vertical boundary (usually 'top'). [AI]
Definition at line 143 of file mxregion.h.
|
protected |
[AI] List of horizontal segments covered by this vertical span. [AI]
Definition at line 145 of file mxregion.h.