KiCad PCB EDA Suite
|
#include <ray.h>
Public Member Functions | |
RAYSEG2D (const SFVEC2F &s, const SFVEC2F &e) | |
bool | IntersectSegment (const SFVEC2F &aStart, const SFVEC2F &aEnd_minus_start, float *aOutT) const |
bool | IntersectCircle (const SFVEC2F &aCenter, float aRadius, float *aOutT0, float *aOutT1, SFVEC2F *aOutNormalT0, SFVEC2F *aOutNormalT1) const |
float | DistanceToPointSquared (const SFVEC2F &aPoint) const |
SFVEC2F | atNormalized (float t) const |
Return the position at t. | |
SFVEC2F | at (float t) const |
Public Attributes | |
SFVEC2F | m_Start |
SFVEC2F | m_End |
SFVEC2F | m_End_minus_start |
SFVEC2F | m_Dir |
SFVEC2F | m_InvDir |
float | m_Length |
float | m_DOT_End_minus_start |
dot( m_End_minus_start, m_End_minus_start) | |
Definition at line 243 of file ray.cpp.
References m_Dir, m_DOT_End_minus_start, m_End, m_End_minus_start, m_InvDir, m_Length, m_Start, and NextFloatDown().
|
inline |
Definition at line 137 of file ray.h.
References m_Dir, and m_Start.
Referenced by FILLED_CIRCLE_2D::Intersect(), RING_2D::Intersect(), and IntersectCircle().
|
inline |
Return the position at t.
t - value 0.0 ... 1.0
Definition at line 135 of file ray.h.
References m_End_minus_start, and m_Start.
Referenced by LAYER_ITEM_2D::Intersect().
float RAYSEG2D::DistanceToPointSquared | ( | const SFVEC2F & | aPoint | ) | const |
Definition at line 294 of file ray.cpp.
References m_DOT_End_minus_start, m_End, m_End_minus_start, and m_Start.
Referenced by ROUND_SEGMENT::Intersect(), ROUND_SEGMENT::IntersectP(), and ROUND_SEGMENT_2D::IsPointInside().
bool RAYSEG2D::IntersectSegment | ( | const SFVEC2F & | aStart, |
const SFVEC2F & | aEnd_minus_start, | ||
float * | aOutT | ||
) | const |
Definition at line 262 of file ray.cpp.
References std::abs(), m_End_minus_start, and m_Start.
Referenced by POLYGON_4PT_2D::Intersect(), and ROUND_SEGMENT_2D::Intersect().
SFVEC2F RAYSEG2D::m_Dir |
Definition at line 110 of file ray.h.
Referenced by at(), FILLED_CIRCLE_2D::Intersect(), RING_2D::Intersect(), IntersectCircle(), RAYSEG2D(), ROUND_SEGMENT::ROUND_SEGMENT(), and ROUND_SEGMENT_2D::ROUND_SEGMENT_2D().
float RAYSEG2D::m_DOT_End_minus_start |
dot( m_End_minus_start, m_End_minus_start)
Definition at line 113 of file ray.h.
Referenced by DistanceToPointSquared(), and RAYSEG2D().
SFVEC2F RAYSEG2D::m_End |
Definition at line 108 of file ray.h.
Referenced by DistanceToPointSquared(), ROUND_SEGMENT_2D::GetEnd(), ROUND_SEGMENT::Intersect(), LAYER_ITEM_2D::Intersect(), ROUND_SEGMENT_2D::Intersect(), ROUND_SEGMENT::IntersectP(), ROUND_SEGMENT_2D::Intersects(), RAYSEG2D(), BVH_CONTAINER_2D::recursiveIntersectAny(), and ROUND_SEGMENT::ROUND_SEGMENT().
SFVEC2F RAYSEG2D::m_End_minus_start |
Definition at line 109 of file ray.h.
Referenced by atNormalized(), DistanceToPointSquared(), ROUND_SEGMENT_2D::GetEnd_minus_Start(), POLYGON_2D::Intersect(), IntersectSegment(), and RAYSEG2D().
SFVEC2F RAYSEG2D::m_InvDir |
Definition at line 111 of file ray.h.
Referenced by BBOX_2D::Intersect(), and RAYSEG2D().
float RAYSEG2D::m_Length |
Definition at line 112 of file ray.h.
Referenced by ROUND_SEGMENT_2D::GetLength(), BBOX_2D::Intersect(), FILLED_CIRCLE_2D::Intersect(), LAYER_ITEM_2D::Intersect(), RING_2D::Intersect(), IntersectCircle(), RAYSEG2D(), and ROUND_SEGMENT::ROUND_SEGMENT().
SFVEC2F RAYSEG2D::m_Start |
Definition at line 107 of file ray.h.
Referenced by at(), atNormalized(), DistanceToPointSquared(), ROUND_SEGMENT_2D::GetStart(), ROUND_SEGMENT::Intersect(), BBOX_2D::Intersect(), FILLED_CIRCLE_2D::Intersect(), LAYER_ITEM_2D::Intersect(), POLYGON_2D::Intersect(), RING_2D::Intersect(), ROUND_SEGMENT_2D::Intersect(), IntersectCircle(), ROUND_SEGMENT::IntersectP(), ROUND_SEGMENT_2D::Intersects(), IntersectSegment(), RAYSEG2D(), BVH_CONTAINER_2D::recursiveIntersectAny(), and ROUND_SEGMENT::ROUND_SEGMENT().