![]() |
KiCad PCB EDA Suite
|
#include <cmath>
#include <limits.h>
#include <geometry/seg.h>
#include <geometry/shape.h>
#include <geometry/shape_arc.h>
#include <geometry/shape_line_chain.h>
#include <geometry/shape_circle.h>
#include <geometry/shape_rect.h>
#include <geometry/shape_segment.h>
#include <geometry/shape_compound.h>
#include <math/vector2d.h>
Go to the source code of this file.
Typedefs | |
typedef VECTOR2I::extended_type | ecoord |
Functions | |
static bool | Collide (const SHAPE_CIRCLE &aA, const SHAPE_CIRCLE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_RECT &aA, const SHAPE_CIRCLE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static VECTOR2I | pushoutForce (const SHAPE_CIRCLE &aA, const SEG &aB, int aClearance) |
static bool | Collide (const SHAPE_CIRCLE &aA, const SHAPE_LINE_CHAIN_BASE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_CIRCLE &aA, const SHAPE_SEGMENT &aSeg, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_LINE_CHAIN_BASE &aA, const SHAPE_LINE_CHAIN_BASE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_RECT &aA, const SHAPE_LINE_CHAIN_BASE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_RECT &aA, const SHAPE_SEGMENT &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_SEGMENT &aA, const SHAPE_SEGMENT &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_LINE_CHAIN_BASE &aA, const SHAPE_SEGMENT &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_RECT &aA, const SHAPE_RECT &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_ARC &aA, const SHAPE_RECT &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_ARC &aA, const SHAPE_CIRCLE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_ARC &aA, const SHAPE_LINE_CHAIN &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_ARC &aA, const SHAPE_SEGMENT &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_ARC &aA, const SHAPE_LINE_CHAIN_BASE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | Collide (const SHAPE_ARC &aA, const SHAPE_ARC &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
template<class T_a , class T_b > | |
bool | CollCase (const SHAPE *aA, const SHAPE *aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
template<class T_a , class T_b > | |
bool | CollCaseReversed (const SHAPE *aA, const SHAPE *aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | collideSingleShapes (const SHAPE *aA, const SHAPE *aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
static bool | collideShapes (const SHAPE *aA, const SHAPE *aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV) |
typedef VECTOR2I::extended_type ecoord |
Definition at line 39 of file shape_collisions.cpp.
|
inline |
Definition at line 533 of file shape_collisions.cpp.
References Collide().
|
inline |
Definition at line 543 of file shape_collisions.cpp.
References Collide().
|
inlinestatic |
Definition at line 42 of file shape_collisions.cpp.
References SHAPE_CIRCLE::GetCenter(), SHAPE_CIRCLE::GetRadius(), VECTOR2< T >::Resize(), and VECTOR2< T >::SquaredEuclideanNorm().
Referenced by BOOST_AUTO_TEST_CASE(), CollCase(), CollCaseReversed(), and Collide().
|
inlinestatic |
Definition at line 69 of file shape_collisions.cpp.
References VECTOR2< T >::ECOORD_MAX, SHAPE_CIRCLE::GetCenter(), SHAPE_RECT::GetPosition(), SHAPE_CIRCLE::GetRadius(), SHAPE_RECT::GetSize(), SEG::NearestPoint(), VECTOR2< T >::Resize(), SEG::Square(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
inlinestatic |
Definition at line 174 of file shape_collisions.cpp.
References SHAPE_CIRCLE::Collide(), SEG::Distance(), SHAPE_CIRCLE::GetCenter(), SHAPE_CIRCLE::GetRadius(), SHAPE_LINE_CHAIN_BASE::GetSegment(), SHAPE_LINE_CHAIN_BASE::GetSegmentCount(), SHAPE_LINE_CHAIN_BASE::IsClosed(), SEG::NearestPoint(), SHAPE_LINE_CHAIN_BASE::PointInside(), pushoutForce(), and SHAPE_CIRCLE::SetCenter().
|
inlinestatic |
Definition at line 271 of file shape_collisions.cpp.
References SHAPE_CIRCLE::Collide(), SHAPE_SEGMENT::GetSeg(), SHAPE_SEGMENT::GetWidth(), and pushoutForce().
|
inlinestatic |
Definition at line 289 of file shape_collisions.cpp.
References SHAPE_LINE_CHAIN_BASE::Collide(), Format(), SHAPE_LINE_CHAIN_BASE::GetPoint(), SHAPE_LINE_CHAIN_BASE::GetPointCount(), SHAPE_LINE_CHAIN_BASE::GetSegment(), SHAPE_LINE_CHAIN_BASE::GetSegmentCount(), SHAPE_LINE_CHAIN_BASE::IsClosed(), SHAPE_LINE_CHAIN_BASE::PointInside(), and SHAPE_BASE::Type().
|
inlinestatic |
Definition at line 346 of file shape_collisions.cpp.
References SHAPE::Centre(), SHAPE_RECT::Collide(), Format(), SHAPE_LINE_CHAIN_BASE::GetSegment(), SHAPE_LINE_CHAIN_BASE::GetSegmentCount(), SHAPE_LINE_CHAIN_BASE::IsClosed(), SHAPE_LINE_CHAIN_BASE::PointInside(), and SHAPE_BASE::Type().
|
inlinestatic |
Definition at line 403 of file shape_collisions.cpp.
References SHAPE_RECT::Collide(), Format(), SHAPE_SEGMENT::GetSeg(), SHAPE_SEGMENT::GetWidth(), and SHAPE_BASE::Type().
|
inlinestatic |
Definition at line 422 of file shape_collisions.cpp.
References SHAPE_SEGMENT::Collide(), Format(), SHAPE_SEGMENT::GetSeg(), SHAPE_SEGMENT::GetWidth(), and SHAPE_BASE::Type().
|
inlinestatic |
Definition at line 441 of file shape_collisions.cpp.
References SHAPE_LINE_CHAIN_BASE::Collide(), Format(), SHAPE_SEGMENT::GetSeg(), SHAPE_SEGMENT::GetWidth(), and SHAPE_BASE::Type().
|
inlinestatic |
Definition at line 460 of file shape_collisions.cpp.
References Collide(), and SHAPE_RECT::Outline().
|
inlinestatic |
Definition at line 467 of file shape_collisions.cpp.
References Collide(), SHAPE_ARC::ConvertToPolyline(), SHAPE_ARC::GetWidth(), and SHAPE_RECT::Outline().
|
inlinestatic |
Definition at line 477 of file shape_collisions.cpp.
References Collide(), SHAPE_ARC::ConvertToPolyline(), and SHAPE_ARC::GetWidth().
|
inlinestatic |
Definition at line 491 of file shape_collisions.cpp.
References Collide(), SHAPE_ARC::ConvertToPolyline(), and SHAPE_ARC::GetWidth().
|
inlinestatic |
Definition at line 501 of file shape_collisions.cpp.
References Collide(), SHAPE_ARC::ConvertToPolyline(), and SHAPE_ARC::GetWidth().
|
inlinestatic |
Definition at line 511 of file shape_collisions.cpp.
References Collide(), SHAPE_ARC::ConvertToPolyline(), and SHAPE_ARC::GetWidth().
|
inlinestatic |
Definition at line 521 of file shape_collisions.cpp.
References Collide(), SHAPE_ARC::ConvertToPolyline(), and SHAPE_ARC::GetWidth().
|
static |
Definition at line 756 of file shape_collisions.cpp.
References collideSingleShapes(), SH_COMPOUND, SHAPE_COMPOUND::Shapes(), VECTOR2< T >::SquaredEuclideanNorm(), and SHAPE_BASE::Type().
Referenced by SHAPE::Collide().
|
static |
Definition at line 556 of file shape_collisions.cpp.
References Format(), SH_ARC, SH_CIRCLE, SH_LINE_CHAIN, SH_NULL, SH_POLY_SET_TRIANGLE, SH_RECT, SH_SEGMENT, SH_SIMPLE, SHAPE_TYPE_asString(), and SHAPE_BASE::Type().
Referenced by collideShapes().
|
static |
Definition at line 147 of file shape_collisions.cpp.
References SEG::Distance(), EuclideanNorm(), SHAPE_CIRCLE::GetCenter(), SHAPE_CIRCLE::GetRadius(), and SEG::NearestPoint().
Referenced by Collide().