KiCad PCB EDA Suite
|
#include <cring2d.h>
Public Member Functions | |
const SFVEC2F & | GetCenter () const |
float | GetInnerRadius () const |
float | GetOuterRadius () const |
float | GetInnerRadiusSquared () const |
float | GetOuterRadiusSquared () const |
CRING2D (const SFVEC2F &aCenter, float aInnerRadius, float aOuterRadius, const BOARD_ITEM &aBoardItem) | |
bool | Overlaps (const CBBOX2D &aBBox) const override |
Function Overlaps. More... | |
bool | Intersects (const CBBOX2D &aBBox) const override |
Function Intersects. More... | |
bool | Intersect (const RAYSEG2D &aSegRay, float *aOutT, SFVEC2F *aNormalOut) const override |
Function Intersect. More... | |
INTERSECTION_RESULT | IsBBoxInside (const CBBOX2D &aBBox) const override |
Function IsBBoxInside. More... | |
bool | IsPointInside (const SFVEC2F &aPoint) const override |
const BOARD_ITEM & | GetBoardItem () const |
const CBBOX2D & | GetBBox () const |
const SFVEC2F & | GetCentroid () const |
OBJECT2D_TYPE | GetObjectType () const |
Protected Attributes | |
CBBOX2D | m_bbox |
SFVEC2F | m_centroid |
OBJECT2D_TYPE | m_obj_type |
const BOARD_ITEM & | m_boardItem |
Private Attributes | |
SFVEC2F | m_center |
float | m_inner_radius |
float | m_outer_radius |
float | m_inner_radius_squared |
float | m_outer_radius_squared |
CRING2D::CRING2D | ( | const SFVEC2F & | aCenter, |
float | aInnerRadius, | ||
float | aOuterRadius, | ||
const BOARD_ITEM & | aBoardItem | ||
) |
Definition at line 35 of file cring2d.cpp.
References CBBOX2D::GetCenter(), CBBOX2D::IsInitialized(), COBJECT2D::m_bbox, m_center, COBJECT2D::m_centroid, m_inner_radius, m_inner_radius_squared, m_outer_radius, m_outer_radius_squared, CBBOX2D::Reset(), CBBOX2D::ScaleNextUp(), and CBBOX2D::Set().
|
inlineinherited |
Definition at line 121 of file cobject2d.h.
References COBJECT2D::m_bbox.
Referenced by CGENERICCONTAINER2D::Add(), CITEMLAYERCSG2D::CITEMLAYERCSG2D(), CLAYERITEM::CLAYERITEM(), C3D_RENDER_RAYTRACING::create_3d_object_from(), C3D_RENDER_RAYTRACING::insert3DPadHole(), CBVHCONTAINER2D::recursiveBuild_MIDDLE_SPLIT(), and C3D_RENDER_RAYTRACING::reload().
|
inlineinherited |
Definition at line 75 of file cobject2d.h.
References COBJECT2D::Intersect(), COBJECT2D::Intersects(), COBJECT2D::IsBBoxInside(), COBJECT2D::IsPointInside(), COBJECT2D::m_boardItem, and COBJECT2D::Overlaps().
Referenced by C3D_RENDER_RAYTRACING::reload().
|
inline |
Definition at line 38 of file cring2d.h.
References m_center.
Referenced by C3D_RENDER_OGL_LEGACY::add_object_to_triangle_layer().
|
inlineinherited |
Definition at line 123 of file cobject2d.h.
References COBJECT2D::m_centroid.
Referenced by CLAYERITEM::CLAYERITEM(), C3D_RENDER_RAYTRACING::reload(), sortByCentroid_X(), sortByCentroid_Y(), and sortByCentroid_Z().
|
inline |
Definition at line 39 of file cring2d.h.
References m_inner_radius.
Referenced by C3D_RENDER_OGL_LEGACY::add_object_to_triangle_layer().
|
inline |
|
inlineinherited |
Definition at line 125 of file cobject2d.h.
References COBJECT2D::m_obj_type.
Referenced by C3D_RENDER_RAYTRACING::create_3d_object_from(), C3D_RENDER_OGL_LEGACY::generate_3D_Vias_and_Pads(), C3D_RENDER_OGL_LEGACY::generate_holes_display_list(), CITEMLAYERCSG2D::Intersect(), C3D_RENDER_OGL_LEGACY::reload(), and C3D_RENDER_RAYTRACING::reload().
|
inline |
Definition at line 40 of file cring2d.h.
References m_outer_radius.
Referenced by C3D_RENDER_OGL_LEGACY::add_object_to_triangle_layer().
|
inline |
|
overridevirtual |
Function Intersect.
Intersect
aSegRay | |
aOutT | a value between 0.0 and 1.0 in relation to the time of the hit of the segment |
aNormalOut |
Implements COBJECT2D.
Definition at line 72 of file cring2d.cpp.
References RAYSEG2D::at(), m_center, RAYSEG2D::m_Dir, m_inner_radius, m_inner_radius_squared, RAYSEG2D::m_Length, m_outer_radius, m_outer_radius_squared, and RAYSEG2D::m_Start.
|
overridevirtual |
Function Intersects.
Intersects - a.Intersects(b) ⇔ !a.Disjoint(b) ⇔ !(a ∩ b = ∅) It intersects if the result intersection is not null
aBBox |
Implements COBJECT2D.
Definition at line 65 of file cring2d.cpp.
References CBBOX2D::Intersects(), m_center, and m_outer_radius_squared.
|
overridevirtual |
Function IsBBoxInside.
Tests if the bouding is out, intersects or is complety inside
aBBox | - The bounding box to test |
Implements COBJECT2D.
Definition at line 140 of file cring2d.cpp.
References INTR_MISSES.
|
overridevirtual |
Implements COBJECT2D.
Definition at line 185 of file cring2d.cpp.
References m_center, m_inner_radius_squared, and m_outer_radius_squared.
|
overridevirtual |
Function Overlaps.
Test if the box overlaps the object Conformance The function overlaps implements function Overlaps from the OGC Simple Feature Specification. 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 dimentions 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 | - The bounding box to test |
Implements COBJECT2D.
Definition at line 58 of file cring2d.cpp.
|
protectedinherited |
Definition at line 65 of file cobject2d.h.
Referenced by CDUMMYBLOCK2D::CDUMMYBLOCK2D(), CFILLEDCIRCLE2D::CFILLEDCIRCLE2D(), CITEMLAYERCSG2D::CITEMLAYERCSG2D(), CPOLYGON4PTS2D::CPOLYGON4PTS2D(), CPOLYGONBLOCK2D::CPOLYGONBLOCK2D(), CRING2D(), CROUNDSEGMENT2D::CROUNDSEGMENT2D(), CTRIANGLE2D::CTRIANGLE2D(), COBJECT2D::GetBBox(), CTRIANGLE2D::Intersects(), CPOLYGON4PTS2D::Intersects(), CROUNDSEGMENT2D::Intersects(), CITEMLAYERCSG2D::Intersects(), CPOLYGONBLOCK2D::Intersects(), CDUMMYBLOCK2D::Intersects(), CFILLEDCIRCLE2D::IsBBoxInside(), CTRIANGLE2D::IsBBoxInside(), CROUNDSEGMENT2D::IsBBoxInside(), and CDUMMYBLOCK2D::IsPointInside().
|
protectedinherited |
Definition at line 69 of file cobject2d.h.
Referenced by COBJECT2D::GetBoardItem().
|
private |
Definition at line 46 of file cring2d.h.
Referenced by CRING2D(), GetCenter(), Intersect(), Intersects(), and IsPointInside().
|
protectedinherited |
Definition at line 66 of file cobject2d.h.
Referenced by CDUMMYBLOCK2D::CDUMMYBLOCK2D(), CFILLEDCIRCLE2D::CFILLEDCIRCLE2D(), CITEMLAYERCSG2D::CITEMLAYERCSG2D(), CPOLYGON4PTS2D::CPOLYGON4PTS2D(), CPOLYGONBLOCK2D::CPOLYGONBLOCK2D(), CRING2D(), CROUNDSEGMENT2D::CROUNDSEGMENT2D(), CTRIANGLE2D::CTRIANGLE2D(), and COBJECT2D::GetCentroid().
|
private |
Definition at line 47 of file cring2d.h.
Referenced by CRING2D(), GetInnerRadius(), and Intersect().
|
private |
Definition at line 49 of file cring2d.h.
Referenced by CRING2D(), GetInnerRadiusSquared(), Intersect(), and IsPointInside().
|
protectedinherited |
Definition at line 67 of file cobject2d.h.
Referenced by COBJECT2D::COBJECT2D(), and COBJECT2D::GetObjectType().
|
private |
Definition at line 48 of file cring2d.h.
Referenced by CRING2D(), GetOuterRadius(), and Intersect().
|
private |
Definition at line 50 of file cring2d.h.
Referenced by CRING2D(), GetOuterRadiusSquared(), Intersect(), Intersects(), and IsPointInside().