KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER Class Reference

A dynamic state checking if a point lies within polygon with a dynamically built outline ( with each piece of the outline added by AddPolyline () More...

#include <shape_line_chain.h>

Public Member Functions

 POINT_INSIDE_TRACKER (const VECTOR2I &aPoint)
 
void AddPolyline (const SHAPE_LINE_CHAIN &aPolyline)
 
bool IsInside ()
 

Private Member Functions

bool processVertex (const VECTOR2I &ip, const VECTOR2I &ipNext)
 

Private Attributes

VECTOR2I m_point
 
VECTOR2I m_lastPoint
 
VECTOR2I m_firstPoint
 
bool m_finished
 
int m_state
 
int m_count
 

Detailed Description

A dynamic state checking if a point lies within polygon with a dynamically built outline ( with each piece of the outline added by AddPolyline ()

Definition at line 130 of file shape_line_chain.h.

Constructor & Destructor Documentation

◆ POINT_INSIDE_TRACKER()

SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::POINT_INSIDE_TRACKER ( const VECTOR2I & aPoint)

Definition at line 2927 of file shape_line_chain.cpp.

References m_count, m_finished, m_point, and m_state.

Member Function Documentation

◆ AddPolyline()

void SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::AddPolyline ( const SHAPE_LINE_CHAIN & aPolyline)

◆ IsInside()

bool SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::IsInside ( )

Definition at line 3021 of file shape_line_chain.cpp.

References m_firstPoint, m_lastPoint, m_state, and processVertex().

Referenced by PNS::SHOVE::checkShoveDirection().

◆ processVertex()

bool SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::processVertex ( const VECTOR2I & ip,
const VECTOR2I & ipNext )
private

Definition at line 2936 of file shape_line_chain.cpp.

References m_finished, m_point, m_state, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by AddPolyline(), and IsInside().

Member Data Documentation

◆ m_count

int SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::m_count
private

Definition at line 147 of file shape_line_chain.h.

Referenced by AddPolyline(), and POINT_INSIDE_TRACKER().

◆ m_finished

bool SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::m_finished
private

Definition at line 145 of file shape_line_chain.h.

Referenced by POINT_INSIDE_TRACKER(), and processVertex().

◆ m_firstPoint

VECTOR2I SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::m_firstPoint
private

Definition at line 144 of file shape_line_chain.h.

Referenced by AddPolyline(), and IsInside().

◆ m_lastPoint

VECTOR2I SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::m_lastPoint
private

Definition at line 143 of file shape_line_chain.h.

Referenced by AddPolyline(), and IsInside().

◆ m_point

VECTOR2I SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::m_point
private

Definition at line 142 of file shape_line_chain.h.

Referenced by POINT_INSIDE_TRACKER(), and processVertex().

◆ m_state

int SHAPE_LINE_CHAIN::POINT_INSIDE_TRACKER::m_state
private

Definition at line 146 of file shape_line_chain.h.

Referenced by IsInside(), POINT_INSIDE_TRACKER(), and processVertex().


The documentation for this class was generated from the following files: