|
KiCad PCB EDA Suite
|
Immutable owning spatial snapshot of straight segments. More...
#include <segment_index.h>
Public Member Functions | |
| SEGMENT_INDEX (std::vector< SEG > aSegments) | |
| SEGMENT_INDEX (SEGMENT_INDEX &&) noexcept=default | |
| SEGMENT_INDEX & | operator= (SEGMENT_INDEX &&) noexcept=default |
| SEGMENT_INDEX (const SEGMENT_INDEX &)=delete | |
| SEGMENT_INDEX & | operator= (const SEGMENT_INDEX &)=delete |
| size_t | size () const |
| const SEG & | Segment (int aIndex) const |
| template<typename VISITOR> | |
| void | VisitCandidates (const SEG &aQuery, int aPadding, VISITOR &&aVisitor) const |
| Visit candidates overlapping aQuery's endpoint bounds expanded by aPadding. | |
Private Types | |
| using | TREE = KIRTREE::PACKED_RTREE<int, int, 2> |
Static Private Member Functions | |
| static int | clampCoordinate (int64_t aValue) |
Private Attributes | |
| std::vector< SEG > | m_segments |
| TREE | m_tree |
Immutable owning spatial snapshot of straight segments.
Candidate order is unspecified. Queries conservatively include every segment whose endpoint bounds overlap the padded query bounds. The owned snapshot is independent of its source and is safe for concurrent const queries. This is an internal geometry helper; its API is not stable.
Definition at line 40 of file segment_index.h.
|
private |
Definition at line 90 of file segment_index.h.
|
inlineexplicit |
Definition at line 43 of file segment_index.h.
References m_segments, and move.
Referenced by operator=(), operator=(), SEGMENT_INDEX(), and SEGMENT_INDEX().
|
defaultnoexcept |
References SEGMENT_INDEX().
|
delete |
References SEGMENT_INDEX().
|
inlinestaticprivate |
Definition at line 92 of file segment_index.h.
Referenced by VisitCandidates().
|
delete |
References SEGMENT_INDEX().
|
defaultnoexcept |
References SEGMENT_INDEX().
|
inline |
Definition at line 67 of file segment_index.h.
References m_segments.
|
inline |
Definition at line 65 of file segment_index.h.
References m_segments, and size().
Referenced by size().
|
inline |
Visit candidates overlapping aQuery's endpoint bounds expanded by aPadding.
Negative padding is treated as zero so the query never shrinks below the query bounds and stays conservative. The visitor receives the original segment index and returns true to continue or false to stop.
Definition at line 77 of file segment_index.h.
References SEG::A, SEG::B, clampCoordinate(), m_tree, VECTOR2< T >::x, and VECTOR2< T >::y.
|
private |
Definition at line 98 of file segment_index.h.
Referenced by Segment(), SEGMENT_INDEX(), and size().
|
private |
Definition at line 99 of file segment_index.h.
Referenced by VisitCandidates().