KiCad PCB EDA Suite
|
#include <pns_mouse_trail_tracer.h>
Public Member Functions | |
MOUSE_TRAIL_TRACER () | |
~MOUSE_TRAIL_TRACER () | |
void | Clear () |
void | AddTrailPoint (const VECTOR2I &aP) |
void | SetTolerance (int toll) |
void | SetDefaultDirections (DIRECTION_45 aInitDirection, DIRECTION_45 aLastSegDir) |
DIRECTION_45 | GetPosture (const VECTOR2I &aP) |
void | FlipPosture () |
void | SetMouseDisabled (bool aDisabled=true) |
Disables the mouse-trail portion of the posture solver; leaving only the manual posture switch and the previous-segment posture algorithm. | |
bool | IsManuallyForced () const |
VECTOR2I | GetTrailLeadVector () const |
Private Attributes | |
SHAPE_LINE_CHAIN | m_trail |
int | m_tolerance |
DIRECTION_45 | m_direction |
DIRECTION_45 | m_lastSegDirection |
bool | m_forced |
bool | m_disableMouse |
bool | m_manuallyForced |
Definition at line 31 of file pns_mouse_trail_tracer.h.
PNS::MOUSE_TRAIL_TRACER::MOUSE_TRAIL_TRACER | ( | ) |
Definition at line 27 of file pns_mouse_trail_tracer.cpp.
References Clear(), m_disableMouse, and m_tolerance.
PNS::MOUSE_TRAIL_TRACER::~MOUSE_TRAIL_TRACER | ( | ) |
Definition at line 35 of file pns_mouse_trail_tracer.cpp.
void PNS::MOUSE_TRAIL_TRACER::AddTrailPoint | ( | const VECTOR2I & | aP | ) |
Definition at line 46 of file pns_mouse_trail_tracer.cpp.
References SHAPE_LINE_CHAIN::Append(), SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::CSegment(), CYAN, PNS::ROUTER_IFACE::GetDebugDecorator(), PNS::ROUTER::GetInstance(), PNS::ROUTER::GetInterface(), m_tolerance, m_trail, PNS_DBG, SHAPE_LINE_CHAIN::SegmentCount(), SHAPE_LINE_CHAIN::Simplify(), SHAPE_LINE_CHAIN::Slice(), and SEG::SquaredDistance().
Referenced by PNS::DRAGGER::Drag(), PNS::LINE_PLACER::FixRoute(), PNS::LINE_PLACER::Move(), PNS::LINE_PLACER::Start(), PNS::DRAGGER::Start(), and PNS::LINE_PLACER::UnfixRoute().
void PNS::MOUSE_TRAIL_TRACER::Clear | ( | ) |
Definition at line 38 of file pns_mouse_trail_tracer.cpp.
References SHAPE_LINE_CHAIN::Clear(), m_forced, m_manuallyForced, and m_trail.
Referenced by PNS::LINE_PLACER::FixRoute(), MOUSE_TRAIL_TRACER(), PNS::LINE_PLACER::SetLayer(), PNS::LINE_PLACER::Start(), PNS::DRAGGER::Start(), and PNS::LINE_PLACER::UnfixRoute().
void PNS::MOUSE_TRAIL_TRACER::FlipPosture | ( | ) |
Definition at line 270 of file pns_mouse_trail_tracer.cpp.
References m_direction, m_forced, m_manuallyForced, and DIRECTION_45::Right().
Referenced by PNS::LINE_PLACER::FlipPosture().
DIRECTION_45 PNS::MOUSE_TRAIL_TRACER::GetPosture | ( | const VECTOR2I & | aP | ) |
Definition at line 83 of file pns_mouse_trail_tracer.cpp.
References DIRECTION_45::ANG_ACUTE, DIRECTION_45::ANG_HALF_FULL, DIRECTION_45::ANG_OBTUSE, DIRECTION_45::ANG_RIGHT, DIRECTION_45::Angle(), SHAPE_LINE_CHAIN::Append(), SHAPE_LINE_CHAIN::Area(), BLUE, SHAPE_LINE_CHAIN::Clear(), SHAPE_LINE_CHAIN::CPoint(), SHAPE_LINE_CHAIN::CSegment(), DIRECTION_45::Format(), PNS::ROUTER_IFACE::GetDebugDecorator(), PNS::ROUTER::GetInstance(), PNS::ROUTER::GetInterface(), GREEN, DIRECTION_45::IsDiagonal(), SEG::Length(), m_direction, m_disableMouse, m_forced, m_lastSegDirection, m_manuallyForced, m_tolerance, m_trail, PNS_DBG, SHAPE_LINE_CHAIN::PointCount(), SHAPE_LINE_CHAIN::Reverse(), DIRECTION_45::Right(), SHAPE_LINE_CHAIN::SetClosed(), SHAPE_LINE_CHAIN::Simplify(), DIRECTION_45::UNDEFINED, and YELLOW.
Referenced by PNS::LINE_PLACER::buildInitialLine().
VECTOR2I PNS::MOUSE_TRAIL_TRACER::GetTrailLeadVector | ( | ) | const |
Definition at line 278 of file pns_mouse_trail_tracer.cpp.
References SHAPE_LINE_CHAIN::CPoint(), m_trail, and SHAPE_LINE_CHAIN::PointCount().
Referenced by PNS::DRAGGER::propagateViaForces().
|
inline |
Definition at line 59 of file pns_mouse_trail_tracer.h.
References m_manuallyForced.
Referenced by PNS::LINE_PLACER::FlipPosture(), PNS::LINE_PLACER::optimizeTailHeadTransition(), PNS::LINE_PLACER::rhShoveOnly(), and PNS::LINE_PLACER::rhWalkOnly().
|
inline |
Definition at line 43 of file pns_mouse_trail_tracer.h.
References m_direction, and m_lastSegDirection.
Referenced by PNS::LINE_PLACER::FixRoute(), PNS::LINE_PLACER::FlipPosture(), PNS::LINE_PLACER::Start(), and PNS::LINE_PLACER::UnfixRoute().
|
inline |
Disables the mouse-trail portion of the posture solver; leaving only the manual posture switch and the previous-segment posture algorithm.
Definition at line 57 of file pns_mouse_trail_tracer.h.
References m_disableMouse.
Referenced by PNS::LINE_PLACER::Start().
|
inline |
Definition at line 41 of file pns_mouse_trail_tracer.h.
References m_tolerance.
Referenced by PNS::LINE_PLACER::FixRoute(), and PNS::LINE_PLACER::Start().
|
private |
Definition at line 65 of file pns_mouse_trail_tracer.h.
Referenced by FlipPosture(), GetPosture(), and SetDefaultDirections().
|
private |
Definition at line 68 of file pns_mouse_trail_tracer.h.
Referenced by GetPosture(), MOUSE_TRAIL_TRACER(), and SetMouseDisabled().
|
private |
Definition at line 67 of file pns_mouse_trail_tracer.h.
Referenced by Clear(), FlipPosture(), and GetPosture().
|
private |
Definition at line 66 of file pns_mouse_trail_tracer.h.
Referenced by GetPosture(), and SetDefaultDirections().
|
private |
Definition at line 69 of file pns_mouse_trail_tracer.h.
Referenced by Clear(), FlipPosture(), GetPosture(), and IsManuallyForced().
|
private |
Definition at line 64 of file pns_mouse_trail_tracer.h.
Referenced by AddTrailPoint(), GetPosture(), MOUSE_TRAIL_TRACER(), and SetTolerance().
|
private |
Definition at line 63 of file pns_mouse_trail_tracer.h.
Referenced by AddTrailPoint(), Clear(), GetPosture(), and GetTrailLeadVector().