KiCad PCB EDA Suite
|
#include <object_2d.h>
Public Member Functions | |
OBJECT_2D (OBJECT_2D_TYPE aObjType, const BOARD_ITEM &aBoardItem) | |
virtual | ~OBJECT_2D () |
const BOARD_ITEM & | GetBoardItem () const |
virtual bool | Overlaps (const BBOX_2D &aBBox) const =0 |
Test if the box overlaps the object. | |
virtual bool | Intersects (const BBOX_2D &aBBox) const =0 |
a.Intersects(b) ⇔ !a.Disjoint(b) ⇔ !(a ∩ b = ∅) | |
virtual bool | Intersect (const RAYSEG2D &aSegRay, float *aOutT, SFVEC2F *aNormalOut) const =0 |
virtual INTERSECTION_RESULT | IsBBoxInside (const BBOX_2D &aBBox) const =0 |
Test this object if it's completely outside, intersects, or is completely inside aBBox. | |
virtual bool | IsPointInside (const SFVEC2F &aPoint) const =0 |
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 |
Definition at line 60 of file object_2d.h.
OBJECT_2D::OBJECT_2D | ( | OBJECT_2D_TYPE | aObjType, |
const BOARD_ITEM & | aBoardItem | ||
) |
Definition at line 31 of file object_2d.cpp.
References OBJECT_2D_STATS::AddOne(), OBJECT_2D_STATS::Instance(), and m_obj_type.
|
inlinevirtual |
Definition at line 64 of file object_2d.h.
|
inline |
Definition at line 103 of file object_2d.h.
References 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().
|
inline |
Definition at line 66 of file object_2d.h.
References m_boardItem.
Referenced by RENDER_3D_RAYTRACE_BASE::createItemsFromContainer().
|
inline |
Definition at line 105 of file object_2d.h.
References m_centroid.
Referenced by LAYER_ITEM::LAYER_ITEM(), sortByCentroidX(), sortByCentroidY(), and sortByCentroidZ().
|
inline |
Definition at line 107 of file object_2d.h.
References 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().
|
pure virtual |
aOutT | a value between 0.0 and 1.0 in relation to the time of the hit of the segment. |
Implemented in POLYGON_4PT_2D, FILLED_CIRCLE_2D, LAYER_ITEM_2D, POLYGON_2D, DUMMY_BLOCK_2D, RING_2D, ROUND_SEGMENT_2D, and TRIANGLE_2D.
Referenced by LAYER_ITEM::Intersect(), LAYER_ITEM_2D::Intersect(), LAYER_ITEM::IntersectP(), and BVH_CONTAINER_2D::recursiveIntersectAny().
|
pure virtual |
a.Intersects(b) ⇔ !a.Disjoint(b) ⇔ !(a ∩ b = ∅)
Implemented in POLYGON_4PT_2D, FILLED_CIRCLE_2D, LAYER_ITEM_2D, POLYGON_2D, DUMMY_BLOCK_2D, RING_2D, ROUND_SEGMENT_2D, and TRIANGLE_2D.
Referenced by RENDER_3D_RAYTRACE_BASE::insertHole(), LAYER_ITEM::Intersects(), and BVH_CONTAINER_2D::recursiveGetListObjectsIntersects().
|
pure virtual |
Test this object if it's completely outside, intersects, or is completely inside aBBox.
Implemented in POLYGON_4PT_2D, FILLED_CIRCLE_2D, LAYER_ITEM_2D, POLYGON_2D, DUMMY_BLOCK_2D, RING_2D, ROUND_SEGMENT_2D, and TRIANGLE_2D.
|
pure virtual |
Implemented in POLYGON_4PT_2D, FILLED_CIRCLE_2D, LAYER_ITEM_2D, POLYGON_2D, DUMMY_BLOCK_2D, RING_2D, ROUND_SEGMENT_2D, and TRIANGLE_2D.
Referenced by LAYER_ITEM::Intersect(), LAYER_ITEM_2D::Intersect(), LAYER_ITEM::IntersectP(), LAYER_ITEM_2D::IsPointInside(), and BVH_CONTAINER_2D::recursiveIntersectAny().
|
pure virtual |
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. |
Implemented in POLYGON_4PT_2D, FILLED_CIRCLE_2D, LAYER_ITEM_2D, POLYGON_2D, DUMMY_BLOCK_2D, RING_2D, ROUND_SEGMENT_2D, and TRIANGLE_2D.
|
protected |
Definition at line 110 of file object_2d.h.
Referenced by DUMMY_BLOCK_2D::DUMMY_BLOCK_2D(), FILLED_CIRCLE_2D::FILLED_CIRCLE_2D(), GetBBox(), POLYGON_4PT_2D::Intersects(), LAYER_ITEM_2D::Intersects(), POLYGON_2D::Intersects(), DUMMY_BLOCK_2D::Intersects(), ROUND_SEGMENT_2D::Intersects(), TRIANGLE_2D::Intersects(), FILLED_CIRCLE_2D::IsBBoxInside(), ROUND_SEGMENT_2D::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::ROUND_SEGMENT_2D(), and TRIANGLE_2D::TRIANGLE_2D().
|
protected |
Definition at line 114 of file object_2d.h.
Referenced by GetBoardItem().
|
protected |
Definition at line 111 of file object_2d.h.
Referenced by DUMMY_BLOCK_2D::DUMMY_BLOCK_2D(), FILLED_CIRCLE_2D::FILLED_CIRCLE_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::ROUND_SEGMENT_2D(), and TRIANGLE_2D::TRIANGLE_2D().
|
protected |
Definition at line 112 of file object_2d.h.
Referenced by GetObjectType(), and OBJECT_2D().