KiCad PCB EDA Suite
|
#include <round_segment_2d.h>
Public Member Functions | |
ROUND_SEGMENT_2D (const SFVEC2F &aStart, const SFVEC2F &aEnd, float aWidth, const BOARD_ITEM &aBoardItem) | |
float | GetRadius () const |
float | GetRadiusSquared () const |
float | GetWidth () const |
float | GetLength () const |
const SFVEC2F & | GetStart () const |
const SFVEC2F & | GetEnd () const |
const SFVEC2F & | GetEnd_minus_Start () const |
const SFVEC2F & | GetLeftStar () const |
const SFVEC2F & | GetLeftEnd () const |
const SFVEC2F & | GetLeftEnd_minus_Start () const |
const SFVEC2F & | GetLeftDir () const |
const SFVEC2F & | GetRightStar () const |
const SFVEC2F & | GetRightEnd () const |
const SFVEC2F & | GetRightEnd_minus_Start () const |
const SFVEC2F & | GetRightDir () const |
bool | Overlaps (const BBOX_2D &aBBox) const override |
Test if the box overlaps the object. | |
bool | Intersects (const BBOX_2D &aBBox) const override |
a.Intersects(b) ⇔ !a.Disjoint(b) ⇔ !(a ∩ b = ∅) | |
bool | Intersect (const RAYSEG2D &aSegRay, float *aOutT, SFVEC2F *aNormalOut) const override |
INTERSECTION_RESULT | IsBBoxInside (const BBOX_2D &aBBox) const override |
Test this object if it's completely outside, intersects, or is completely inside aBBox. | |
bool | IsPointInside (const SFVEC2F &aPoint) const override |
const BOARD_ITEM & | GetBoardItem () const |
const BBOX_2D & | GetBBox () const |
const SFVEC2F & | GetCentroid () const |
OBJECT_2D_TYPE | GetObjectType () const |
Protected Attributes | |
BBOX_2D | m_bbox |
SFVEC2F | m_centroid |
OBJECT_2D_TYPE | m_obj_type |
const BOARD_ITEM & | m_boardItem |
Private Attributes | |
RAYSEG2D | m_segment |
SFVEC2F | m_leftStart |
SFVEC2F | m_leftEnd |
SFVEC2F | m_leftEndMinusStart |
SFVEC2F | m_leftDir |
SFVEC2F | m_rightStart |
SFVEC2F | m_rightEnd |
SFVEC2F | m_rightEndMinusStart |
SFVEC2F | m_rightDir |
float | m_radius |
float | m_radius_squared |
float | m_width |
Friends | |
class | ROUND_SEGMENT |
Definition at line 39 of file round_segment_2d.h.
ROUND_SEGMENT_2D::ROUND_SEGMENT_2D | ( | const SFVEC2F & | aStart, |
const SFVEC2F & | aEnd, | ||
float | aWidth, | ||
const BOARD_ITEM & | aBoardItem | ||
) |
Definition at line 33 of file round_segment_2d.cpp.
References BBOX_2D::GetCenter(), BBOX_2D::IsInitialized(), OBJECT_2D::m_bbox, OBJECT_2D::m_centroid, RAYSEG2D::m_Dir, m_leftDir, m_leftEnd, m_leftEndMinusStart, m_leftStart, m_radius, m_radius_squared, m_rightDir, m_rightEnd, m_rightEndMinusStart, m_rightStart, m_segment, m_width, BBOX_2D::Max(), BBOX_2D::Min(), BBOX_2D::Reset(), BBOX_2D::ScaleNextUp(), and BBOX_2D::Set().
|
inlineinherited |
Definition at line 103 of file object_2d.h.
References OBJECT_2D::m_bbox.
Referenced by CONTAINER_2D_BASE::Add(), RENDER_3D_RAYTRACE_BASE::createObject(), RENDER_3D_RAYTRACE_BASE::insertHole(), LAYER_ITEM::LAYER_ITEM(), LAYER_ITEM_2D::LAYER_ITEM_2D(), and BVH_CONTAINER_2D::recursiveBuild_MIDDLE_SPLIT().
|
inlineinherited |
Definition at line 66 of file object_2d.h.
References OBJECT_2D::m_boardItem.
Referenced by RENDER_3D_RAYTRACE_BASE::createItemsFromContainer().
|
inlineinherited |
Definition at line 105 of file object_2d.h.
References OBJECT_2D::m_centroid.
Referenced by LAYER_ITEM::LAYER_ITEM(), sortByCentroidX(), sortByCentroidY(), and sortByCentroidZ().
|
inline |
Definition at line 51 of file round_segment_2d.h.
References RAYSEG2D::m_End, and m_segment.
Referenced by RENDER_3D_OPENGL::addObjectTriangles().
|
inline |
Definition at line 52 of file round_segment_2d.h.
References RAYSEG2D::m_End_minus_start, and m_segment.
Referenced by DrawSegment().
|
inline |
Definition at line 57 of file round_segment_2d.h.
References m_leftDir.
Referenced by RENDER_3D_OPENGL::addObjectTriangles().
|
inline |
Definition at line 55 of file round_segment_2d.h.
References m_leftEnd.
Referenced by RENDER_3D_OPENGL::addObjectTriangles().
|
inline |
Definition at line 56 of file round_segment_2d.h.
References m_leftEndMinusStart.
|
inline |
Definition at line 54 of file round_segment_2d.h.
References m_leftStart.
Referenced by RENDER_3D_OPENGL::addObjectTriangles().
|
inline |
Definition at line 48 of file round_segment_2d.h.
References RAYSEG2D::m_Length, and m_segment.
Referenced by DrawSegment().
|
inlineinherited |
Definition at line 107 of file object_2d.h.
References OBJECT_2D::m_obj_type.
Referenced by RENDER_3D_OPENGL::createBoard(), RENDER_3D_RAYTRACE_BASE::createObject(), RENDER_3D_OPENGL::generateHoles(), RENDER_3D_OPENGL::generateLayerList(), RENDER_3D_OPENGL::generateViasAndPads(), and LAYER_ITEM_2D::Intersect().
|
inline |
Definition at line 45 of file round_segment_2d.h.
References m_radius.
Referenced by RENDER_3D_OPENGL::addObjectTriangles(), DrawSegment(), and ROUND_SEGMENT::ROUND_SEGMENT().
|
inline |
Definition at line 46 of file round_segment_2d.h.
References m_radius_squared.
Referenced by RENDER_3D_OPENGL::addObjectTriangles().
|
inline |
Definition at line 62 of file round_segment_2d.h.
References m_rightDir.
Referenced by RENDER_3D_OPENGL::addObjectTriangles().
|
inline |
Definition at line 60 of file round_segment_2d.h.
References m_rightEnd.
Referenced by RENDER_3D_OPENGL::addObjectTriangles().
|
inline |
Definition at line 61 of file round_segment_2d.h.
References m_rightEndMinusStart.
|
inline |
Definition at line 59 of file round_segment_2d.h.
References m_rightStart.
Referenced by RENDER_3D_OPENGL::addObjectTriangles().
|
inline |
Definition at line 50 of file round_segment_2d.h.
References m_segment, and RAYSEG2D::m_Start.
Referenced by RENDER_3D_OPENGL::addObjectTriangles(), and DrawSegment().
|
inline |
|
overridevirtual |
aOutT | a value between 0.0 and 1.0 in relation to the time of the hit of the segment. |
Implements OBJECT_2D.
Definition at line 127 of file round_segment_2d.cpp.
References RAYSEG2D::IntersectCircle(), RAYSEG2D::IntersectSegment(), IsPointInside(), RAYSEG2D::m_End, m_leftDir, m_leftEndMinusStart, m_leftStart, m_radius, m_rightDir, m_rightEndMinusStart, m_rightStart, m_segment, and RAYSEG2D::m_Start.
|
overridevirtual |
a.Intersects(b) ⇔ !a.Disjoint(b) ⇔ !(a ∩ b = ∅)
Implements OBJECT_2D.
Definition at line 68 of file round_segment_2d.cpp.
References BBOX_2D::Intersects(), IntersectSegment(), OBJECT_2D::m_bbox, RAYSEG2D::m_End, m_leftEndMinusStart, m_leftStart, m_radius_squared, m_rightEndMinusStart, m_rightStart, m_segment, RAYSEG2D::m_Start, BBOX_2D::Max(), and BBOX_2D::Min().
|
overridevirtual |
Test this object if it's completely outside, intersects, or is completely inside aBBox.
Implements OBJECT_2D.
Definition at line 296 of file round_segment_2d.cpp.
References BBOX_2D::Intersects(), IsPointInside(), OBJECT_2D::m_bbox, BBOX_2D::Max(), and BBOX_2D::Min().
|
overridevirtual |
Implements OBJECT_2D.
Definition at line 327 of file round_segment_2d.cpp.
References RAYSEG2D::DistanceToPointSquared(), m_radius_squared, and m_segment.
Referenced by Intersect(), and IsBBoxInside().
|
overridevirtual |
Test if the box overlaps the object.
Conformance Implements the Overlaps function from the OGC Simple Feature Specification at http://www.opengeospatial.org/standards/sfa. a.Overlaps(b) ⇔ ( dim(I(a)) = dim(I(b)) = dim(I(a) ∩ I(b))) ∧ (a ∩ b ≠ a) ∧ (a ∩ b ≠ b) It means that the result dimension of an overlap is the same dimensions of the bounding box (so the overlap cannot be a point or a line) and one of the boxes cannot full contain the other box.
aBBox | is the bounding box to test. |
Implements OBJECT_2D.
Definition at line 120 of file round_segment_2d.cpp.
|
friend |
Definition at line 71 of file round_segment_2d.h.
|
protectedinherited |
Definition at line 110 of file object_2d.h.
Referenced by DUMMY_BLOCK_2D::DUMMY_BLOCK_2D(), FILLED_CIRCLE_2D::FILLED_CIRCLE_2D(), OBJECT_2D::GetBBox(), POLYGON_4PT_2D::Intersects(), LAYER_ITEM_2D::Intersects(), POLYGON_2D::Intersects(), DUMMY_BLOCK_2D::Intersects(), Intersects(), TRIANGLE_2D::Intersects(), FILLED_CIRCLE_2D::IsBBoxInside(), IsBBoxInside(), TRIANGLE_2D::IsBBoxInside(), DUMMY_BLOCK_2D::IsPointInside(), LAYER_ITEM_2D::LAYER_ITEM_2D(), POLYGON_2D::POLYGON_2D(), POLYGON_4PT_2D::POLYGON_4PT_2D(), RING_2D::RING_2D(), ROUND_SEGMENT_2D(), and TRIANGLE_2D::TRIANGLE_2D().
|
protectedinherited |
Definition at line 114 of file object_2d.h.
Referenced by OBJECT_2D::GetBoardItem().
|
protectedinherited |
Definition at line 111 of file object_2d.h.
Referenced by DUMMY_BLOCK_2D::DUMMY_BLOCK_2D(), FILLED_CIRCLE_2D::FILLED_CIRCLE_2D(), OBJECT_2D::GetCentroid(), LAYER_ITEM_2D::LAYER_ITEM_2D(), POLYGON_2D::POLYGON_2D(), POLYGON_4PT_2D::POLYGON_4PT_2D(), RING_2D::RING_2D(), ROUND_SEGMENT_2D(), and TRIANGLE_2D::TRIANGLE_2D().
|
private |
Definition at line 78 of file round_segment_2d.h.
Referenced by GetLeftDir(), Intersect(), and ROUND_SEGMENT_2D().
|
private |
Definition at line 76 of file round_segment_2d.h.
Referenced by GetLeftEnd(), and ROUND_SEGMENT_2D().
|
private |
Definition at line 77 of file round_segment_2d.h.
Referenced by GetLeftEnd_minus_Start(), Intersect(), Intersects(), and ROUND_SEGMENT_2D().
|
private |
Definition at line 75 of file round_segment_2d.h.
Referenced by GetLeftStar(), Intersect(), Intersects(), and ROUND_SEGMENT_2D().
|
protectedinherited |
Definition at line 112 of file object_2d.h.
Referenced by OBJECT_2D::GetObjectType(), and OBJECT_2D::OBJECT_2D().
|
private |
Definition at line 85 of file round_segment_2d.h.
Referenced by GetRadius(), Intersect(), and ROUND_SEGMENT_2D().
|
private |
Definition at line 86 of file round_segment_2d.h.
Referenced by GetRadiusSquared(), Intersects(), IsPointInside(), and ROUND_SEGMENT_2D().
|
private |
Definition at line 83 of file round_segment_2d.h.
Referenced by GetRightDir(), Intersect(), and ROUND_SEGMENT_2D().
|
private |
Definition at line 81 of file round_segment_2d.h.
Referenced by GetRightEnd(), and ROUND_SEGMENT_2D().
|
private |
Definition at line 82 of file round_segment_2d.h.
Referenced by GetRightEnd_minus_Start(), Intersect(), Intersects(), and ROUND_SEGMENT_2D().
|
private |
Definition at line 80 of file round_segment_2d.h.
Referenced by GetRightStar(), Intersect(), Intersects(), and ROUND_SEGMENT_2D().
|
private |
Definition at line 73 of file round_segment_2d.h.
Referenced by GetEnd(), GetEnd_minus_Start(), GetLength(), GetStart(), Intersect(), Intersects(), IsPointInside(), and ROUND_SEGMENT_2D().
|
private |
Definition at line 87 of file round_segment_2d.h.
Referenced by GetWidth(), and ROUND_SEGMENT_2D().