KiCad PCB EDA Suite
Loading...
Searching...
No Matches
BOX2< Vec > Class Template Reference

A 2D bounding box built on top of an origin point and size vector. More...

#include <box2.h>

Public Types

typedef Vec::coord_type coord_type
 
typedef Vec::extended_type size_type
 
typedef Vec::extended_type ecoord_type
 
typedef VECTOR2< size_typeSizeVec
 
typedef std::numeric_limits< coord_typecoord_limits
 

Public Member Functions

constexpr BOX2 ()
 
constexpr BOX2 (const Vec &aPos, const SizeVec &aSize=SizeVec(0, 0))
 
constexpr void SetMaximum ()
 
constexpr Vec Centre () const
 
template<class Container >
void Compute (const Container &aPointList)
 Compute the bounding box from a given list of points.
 
constexpr void Move (const Vec &aMoveVector)
 Move the rectangle by the aMoveVector.
 
constexpr BOX2< Vec > & Normalize ()
 Ensure that the height and width are positive.
 
constexpr bool Contains (const Vec &aPoint) const
 
constexpr bool Contains (coord_type x, coord_type y) const
 
constexpr bool Contains (const BOX2< Vec > &aRect) const
 
constexpr const SizeVecGetSize () const
 
constexpr coord_type GetX () const
 
constexpr coord_type GetY () const
 
constexpr const Vec & GetOrigin () const
 
constexpr const Vec & GetPosition () const
 
constexpr const Vec GetEnd () const
 
constexpr size_type GetWidth () const
 
constexpr size_type GetHeight () const
 
constexpr coord_type GetRight () const
 
constexpr coord_type GetBottom () const
 
constexpr coord_type GetLeft () const
 
constexpr coord_type GetTop () const
 
constexpr const Vec GetCenter () const
 
constexpr int GetSizeMax () const
 
constexpr void SetOrigin (const Vec &pos)
 
constexpr void SetOrigin (coord_type x, coord_type y)
 
constexpr void SetSize (const SizeVec &size)
 
constexpr void SetSize (size_type w, size_type h)
 
constexpr void Offset (coord_type dx, coord_type dy)
 
constexpr void Offset (const Vec &offset)
 
constexpr BOX2< Vec > GetWithOffset (const Vec &aMoveVector) const
 
constexpr void SetX (coord_type val)
 
constexpr void SetY (coord_type val)
 
constexpr void SetWidth (size_type val)
 
constexpr void SetHeight (size_type val)
 
constexpr void SetEnd (coord_type x, coord_type y)
 
constexpr void SetEnd (const Vec &pos)
 
constexpr bool Intersects (const BOX2< Vec > &aRect) const
 
constexpr BOX2< Vec > Intersect (const BOX2< Vec > &aRect)
 
bool Intersects (const Vec &aPoint1, const Vec &aPoint2) const
 
bool Intersects (const BOX2< Vec > &aRect, const EDA_ANGLE &aRotation) const
 
bool IntersectsCircle (const Vec &aCenter, const int aRadius) const
 
bool IntersectsCircleEdge (const Vec &aCenter, const int aRadius, const int aWidth) const
 
const std::string Format () const
 
constexpr BOX2< Vec > & Inflate (coord_type dx, coord_type dy)
 Inflates the rectangle horizontally by dx and vertically by dy.
 
constexpr BOX2< Vec > & Inflate (coord_type aDelta)
 Inflate the rectangle horizontally and vertically by aDelta.
 
constexpr BOX2< Vec > GetInflated (coord_type aDx, coord_type aDy) const
 Get a new rectangle that is this one, inflated by aDx and aDy.
 
constexpr BOX2< Vec > GetInflated (coord_type aDelta) const
 Get a new rectangle that is this one, inflated by aDelta.
 
constexpr BOX2< Vec > & Merge (const BOX2< Vec > &aRect)
 Modify the position and size of the rectangle in order to contain aRect.
 
constexpr BOX2< Vec > & Merge (const Vec &aPoint)
 Modify the position and size of the rectangle in order to contain the given point.
 
const BOX2< Vec > GetBoundingBoxRotated (const VECTOR2I &aRotCenter, const EDA_ANGLE &aAngle) const
 Useful to calculate bounding box of rotated items, when rotation is not cardinal.
 
constexpr ecoord_type GetArea () const
 Return the area of the rectangle.
 
ecoord_type Diagonal () const
 Return the length of the diagonal of the rectangle.
 
constexpr ecoord_type SquaredDiagonal () const
 Return the square of the length of the diagonal of the rectangle.
 
constexpr ecoord_type SquaredDistance (const Vec &aP) const
 
ecoord_type Distance (const Vec &aP) const
 
constexpr ecoord_type SquaredDistance (const BOX2< Vec > &aBox) const
 Return the square of the minimum distance between self and box aBox.
 
ecoord_type Distance (const BOX2< Vec > &aBox) const
 Return the minimum distance between self and aBox.
 
constexpr Vec ClosestPointTo (const Vec &aPoint) const
 Return the point in this rect that is closest to the provided point.
 
constexpr Vec FarthestPointTo (const Vec &aPoint) const
 Return the point in this rect that is farthest from the provided point.
 
constexpr bool operator== (const BOX2< Vec > &aOther) const
 
constexpr bool operator!= (const BOX2< Vec > &aOther) const
 
constexpr bool IsValid () const
 

Static Public Member Functions

static constexpr BOX2< Vec > ByCorners (const Vec &aCorner1, const Vec &aCorner2)
 
static constexpr BOX2< Vec > ByCenter (const Vec &aCenter, const SizeVec &aSize)
 

Private Attributes

Vec m_Pos
 
SizeVec m_Size
 
bool m_init
 

Detailed Description

template<class Vec>
class BOX2< Vec >

A 2D bounding box built on top of an origin point and size vector.

Definition at line 43 of file box2.h.

Member Typedef Documentation

◆ coord_limits

template<class Vec >
typedef std::numeric_limits<coord_type> BOX2< Vec >::coord_limits

Definition at line 50 of file box2.h.

◆ coord_type

template<class Vec >
typedef Vec::coord_type BOX2< Vec >::coord_type

Definition at line 46 of file box2.h.

◆ ecoord_type

template<class Vec >
typedef Vec::extended_type BOX2< Vec >::ecoord_type

Definition at line 48 of file box2.h.

◆ size_type

template<class Vec >
typedef Vec::extended_type BOX2< Vec >::size_type

Definition at line 47 of file box2.h.

◆ SizeVec

template<class Vec >
typedef VECTOR2<size_type> BOX2< Vec >::SizeVec

Definition at line 49 of file box2.h.

Constructor & Destructor Documentation

◆ BOX2() [1/2]

template<class Vec >
constexpr BOX2< Vec >::BOX2 ( )
inlineconstexpr

Definition at line 52 of file box2.h.

Referenced by BOX2< Vec >::ByCenter(), and BOX2< Vec >::ByCorners().

◆ BOX2() [2/2]

template<class Vec >
constexpr BOX2< Vec >::BOX2 ( const Vec &  aPos,
const SizeVec aSize = SizeVec(0, 0) 
)
inlineconstexpr

Member Function Documentation

◆ ByCenter()

template<class Vec >
static constexpr BOX2< Vec > BOX2< Vec >::ByCenter ( const Vec &  aCenter,
const SizeVec aSize 
)
inlinestaticconstexpr

Definition at line 75 of file box2.h.

References BOX2< Vec >::BOX2().

◆ ByCorners()

template<class Vec >
static constexpr BOX2< Vec > BOX2< Vec >::ByCorners ( const Vec &  aCorner1,
const Vec &  aCorner2 
)
inlinestaticconstexpr

Definition at line 70 of file box2.h.

References BOX2< Vec >::BOX2().

◆ Centre()

template<class Vec >
constexpr Vec BOX2< Vec >::Centre ( ) const
inlineconstexpr

Definition at line 97 of file box2.h.

References BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by SHAPE::Centre(), SCH_EDIT_TOOL::ChangeTextType(), PCB_GRID_HELPER::computeAnchors(), COMMON_TOOLS::doCenter(), PCB_SELECTION_TOOL::doSyncSelection(), COMMON_TOOLS::doZoomFit(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), DRAWING_TOOL::DrawDimension(), BOARD_PRINTOUT::DrawPage(), BOARD_NETLIST_UPDATER::estimateFootprintInsertionPosition(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), AUTOPLACER::fieldBoxPlacement(), AUTOPLACER::fieldHPlacement(), DESIGN_BLOCK_PREVIEW_WIDGET::fitOnDrawArea(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), PCB_BASE_FRAME::FocusOnItems(), GENDRILL_WRITER_BASE::genDrillMapFile(), EDA_SHAPE::getCenter(), BOX2< Vec >::GetCenter(), GERBVIEW_SELECTION::GetCenter(), PCB_GROUP::GetPosition(), SELECTION::GetReferencePoint(), GERBER_DRAW_ITEM::HitTest(), initializePlotter(), BOARD_ADAPTER::InitSettings(), BOX2< Vec >::Intersects(), SCH_FIELD::IsHorizJustifyFlipped(), SCH_FIELD::IsVertJustifyFlipped(), CADSTAR_SCH_ARCHIVE_LOADER::Load(), SCH_IO_EAGLE::loadSheet(), SCH_EDIT_TOOL::Mirror(), PCB_EDIT_FRAME::OnExportIDF3(), SCH_EDIT_FRAME::onNetNavigatorSelection(), DIALOG_PIN_PROPERTIES::OnPaintShowPanel(), SCH_FIELD::Plot(), SCH_TEXT::Plot(), BRDITEMS_PLOTTER::PlotPadNumber(), SCH_FIELD::Print(), SCH_TEXT::Print(), SCH_PRINTOUT::PrintPage(), KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetViewport(), EE_SELECTION_TOOL::SyncSelection(), DRC_TEST_PROVIDER_MISC::testOutline(), KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars(), PANEL_EESCHEMA_COLOR_SETTINGS::zoomFitPreview(), PANEL_PCBNEW_COLOR_SETTINGS::zoomFitPreview(), PANEL_ZONE_GAL::ZoomFitScreen(), and PCB_SELECTION_TOOL::zoomFitSelection().

◆ ClosestPointTo()

template<class Vec >
constexpr Vec BOX2< Vec >::ClosestPointTo ( const Vec &  aPoint) const
inlineconstexpr

Return the point in this rect that is closest to the provided point.

Definition at line 851 of file box2.h.

References BOX2< Vec >::GetBottom(), BOX2< Vec >::GetLeft(), BOX2< Vec >::GetRight(), BOX2< Vec >::GetTop(), and BOX2< Vec >::Normalize().

Referenced by BOX2< Vec >::IntersectsCircle(), and PNS::LINE_PLACER::rhMarkObstacles().

◆ Compute()

template<class Vec >
template<class Container >
void BOX2< Vec >::Compute ( const Container &  aPointList)
inline

Compute the bounding box from a given list of points.

Parameters
aPointListis the list points of the object.

Definition at line 109 of file box2.h.

References BOX2< Vec >::SetOrigin(), and BOX2< Vec >::SetSize().

Referenced by SHAPE_LINE_CHAIN::BBox(), SHAPE_LINE_CHAIN::GenerateBBoxCache(), and SHAPE_ARC::update_values().

◆ Contains() [1/3]

template<class Vec >
constexpr bool BOX2< Vec >::Contains ( const BOX2< Vec > &  aRect) const
inlineconstexpr
Parameters
aRectis the the area to test.
Returns
true if aRect is contained. A common edge is seen as contained.

Definition at line 201 of file box2.h.

References BOX2< Vec >::Contains(), BOX2< Vec >::GetEnd(), and BOX2< Vec >::GetOrigin().

◆ Contains() [2/3]

template<class Vec >
constexpr bool BOX2< Vec >::Contains ( const Vec &  aPoint) const
inlineconstexpr
Parameters
aPointis the point to test.
Returns
true if aPoint is inside the boundary box. A point on a edge is seen as inside.

Definition at line 168 of file box2.h.

References BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, and VECTOR2< T >::x.

Referenced by AR_AUTOPLACER::AutoplaceFootprints(), KIGEOM::BoxHitTest(), LABEL_MANAGER::boxMtv(), PNS::AREA_CONSTRAINT::Check(), CN_VISITOR::checkZoneZoneConnection(), SHAPE_RECT::Collide(), BOX2< Vec >::Contains(), drawBacksideTicks(), DRAWING_TOOL::DrawDimension(), SCH_DRAWING_TOOLS::DrawSheet(), drawTicksAlongLine(), PCB_SELECTION_TOOL::FilterCollectorForFootprints(), PCB_SELECTION_TOOL::FindItem(), EDA_DRAW_FRAME::FocusOnLocation(), EE_SELECTION_TOOL::GuessSelectionCandidates(), PCB_TUNING_PATTERN::HitTest(), EDA_SHAPE::hitTest(), SCH_BUS_ENTRY_BASE::HitTest(), SCH_JUNCTION::HitTest(), SCH_LINE::HitTest(), SCH_NO_CONNECT::HitTest(), DS_DRAW_ITEM_BASE::HitTest(), DS_DRAW_ITEM_POLYPOLYGONS::HitTest(), DS_DRAW_ITEM_RECT::HitTest(), PAD::HitTest(), PCB_DIMENSION_BASE::HitTest(), PCB_TARGET::HitTest(), PCB_TRACK::HitTest(), PCB_VIA::HitTest(), PCB_ARC::HitTest(), ZONE::HitTest(), SCH_SHEET::HitTest(), PCB_TEXTBOX::HitTest(), SCH_FIELD::HitTest(), SCH_LABEL_BASE::HitTest(), SCH_PIN::HitTest(), SCH_SHEET_PIN::HitTest(), SCH_SYMBOL::HitTest(), SCH_TABLE::HitTest(), SCH_TEXT::HitTest(), SCH_TEXTBOX::HitTest(), DS_DRAW_ITEM_BITMAP::HitTest(), FOOTPRINT::HitTest(), PCB_TABLE::HitTest(), GERBER_DRAW_ITEM::HitTest(), MARKER_BASE::HitTestMarker(), BOX2< Vec >::Intersects(), EE_SELECTION_TOOL::Main(), AR_AUTOPLACER::nearestPad(), PNS::NODE::QueryJoints(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), EE_SELECTION_TOOL::selectionContains(), PL_SELECTION_TOOL::selectionContains(), PCB_SELECTION_TOOL::selectionContains(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectPoint(), KIGFX::VIEW::SetCenter(), KIGFX::WX_VIEW_CONTROLS::SetCrossHairCursorPosition(), PCB_TEXT::TextHitTest(), EDA_TEXT::TextHitTest(), ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::updateOrthogonalDimension(), and KIGFX::WX_VIEW_CONTROLS::WarpMouseCursor().

◆ Contains() [3/3]

template<class Vec >
constexpr bool BOX2< Vec >::Contains ( coord_type  x,
coord_type  y 
) const
inlineconstexpr
Parameters
xis the x coordinate of the point to test.
yis the x coordinate of the point to test.
Returns
true if point is inside the boundary box. A point on a edge is seen as inside.

Definition at line 194 of file box2.h.

References BOX2< Vec >::Contains().

Referenced by BOX2< Vec >::Contains().

◆ Diagonal()

template<class Vec >
ecoord_type BOX2< Vec >::Diagonal ( ) const
inline

Return the length of the diagonal of the rectangle.

Returns
The length of the rectangle diagonal.

Definition at line 771 of file box2.h.

References VECTOR2< T >::EuclideanNorm(), and BOX2< Vec >::m_Size.

◆ Distance() [1/2]

template<class Vec >
ecoord_type BOX2< Vec >::Distance ( const BOX2< Vec > &  aBox) const
inline

Return the minimum distance between self and aBox.

Parameters
aBoxis the other box to get the distance from.
Returns
The distance from aBox.

Definition at line 843 of file box2.h.

References BOX2< Vec >::SquaredDistance().

◆ Distance() [2/2]

template<class Vec >
ecoord_type BOX2< Vec >::Distance ( const Vec &  aP) const
inline

◆ FarthestPointTo()

template<class Vec >
constexpr Vec BOX2< Vec >::FarthestPointTo ( const Vec &  aPoint) const
inlineconstexpr

Return the point in this rect that is farthest from the provided point.

Definition at line 867 of file box2.h.

References BOX2< Vec >::GetBottom(), BOX2< Vec >::GetCenter(), BOX2< Vec >::GetLeft(), BOX2< Vec >::GetRight(), BOX2< Vec >::GetTop(), and BOX2< Vec >::Normalize().

Referenced by BOX2< Vec >::IntersectsCircleEdge().

◆ Format()

template<class Vec >
const std::string BOX2< Vec >::Format ( ) const
inline

Definition at line 545 of file box2.h.

References BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ GetArea()

template<class Vec >
constexpr ecoord_type BOX2< Vec >::GetArea ( ) const
inlineconstexpr

Return the area of the rectangle.

Returns
The area of the rectangle.

Definition at line 761 of file box2.h.

References BOX2< Vec >::GetHeight(), and BOX2< Vec >::GetWidth().

Referenced by PNS::TOPOLOGY::AssembleCluster(), SCH_SYMBOL::operator<(), and SpreadFootprints().

◆ GetBottom()

template<class Vec >
constexpr coord_type BOX2< Vec >::GetBottom ( ) const
inlineconstexpr

Definition at line 222 of file box2.h.

References BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, and VECTOR2< T >::y.

Referenced by SHAPE_INDEX< T >::Add(), AR_AUTOPLACER::addPad(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), FOOTPRINT::AutoPositionFields(), BOX2ISafe(), KIGEOM::BoxToSegs(), PCB_TEXT::buildBoundingHull(), CN_ZONE_LAYER::BuildRTree(), SCH_EDIT_TOOL::ChangeTextType(), DRC_RTREE::CheckColliding(), ClipLine(), clipOutCode(), BOX2< Vec >::ClosestPointTo(), KIGEOM::CollectBoxCorners(), CN_ZONE_LAYER::Collide(), TEST_BOARD_ITEM_FIXTURE::CompareItems(), TEST_EE_ITEM_FIXTURE::CompareItems(), EE_RTREE::contains(), ConvertPolygonToBlocks(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), KIGFX::SCH_PAINTER::draw(), DRAWING_TOOL::DrawDimension(), DRC_RTREE::DRC_LAYER::DRC_LAYER(), EE_RTREE::EE_TYPE::EE_TYPE(), PDF_PLOTTER::EndPlot(), BOARD_NETLIST_UPDATER::estimateFootprintInsertionPosition(), BOX2< Vec >::FarthestPointTo(), AR_AUTOPLACER::fillMatrix(), formatBBox(), GENDRILL_WRITER_BASE::genDrillMapFile(), AR_AUTOPLACER::genModuleOnRoutingMatrix(), PLACE_FILE_EXPORTER::GenReportData(), PCB_TEXTBOX::GetAnchorAndOppositeCorner(), PCB_DIMENSION_BASE::GetBoundingBox(), PCB_TRACK::GetBoundingBox(), KIFONT::OUTLINE_FONT::getBoundingBox(), SCH_TEXTBOX::GetDrawPos(), BOX2< Vec >::GetEnd(), SCH_SHEET::GetMinHeight(), EDIT_TOOL::getSafeMovement(), KIGEOM::GetSegsInDirection(), GRAPHICS_IMPORTER_BUFFER::ImportTo(), DRC_RTREE::Insert(), EE_RTREE::insert(), CN_RTREE< T >::Insert(), KIGFX::VIEW_RTREE::Insert(), BOX2< Vec >::Intersects(), IsBOX2Safe(), KIGFX::knockoutText(), SCH_IO_EAGLE::loadSchematic(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef(), PNS::NODE::NearestObstacle(), DIALOG_MOVE_EXACT::OnTextChanged(), PlotStandardLayer(), BRDITEMS_PLOTTER::PlotText(), CN_RTREE< T >::Query(), KIGFX::VIEW_RTREE::Query(), SHAPE_INDEX< T >::Query(), DRC_RTREE::QueryColliding(), DRC_RTREE::QueryCollidingPairs(), DIALOG_PAD_PROPERTIES::redraw(), SHAPE_INDEX< T >::Reindex(), EE_RTREE::remove(), CN_RTREE< T >::Remove(), SHAPE_INDEX< T >::Remove(), KIGFX::VIEW_RTREE::Remove(), KIGFX::VIEW::SetCenter(), SHAPE_POLY_SET::SHAPE_POLY_SET(), PNS::WALKAROUND::singleStep(), PIN_LAYOUT_CACHE::transformBoxForPin(), RECTANGLE_POINT_EDIT_BEHAVIOR::UpdateItem(), and ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::updateOrthogonalDimension().

◆ GetBoundingBoxRotated()

template<class Vec >
const BOX2< Vec > BOX2< Vec >::GetBoundingBoxRotated ( const VECTOR2I aRotCenter,
const EDA_ANGLE aAngle 
) const
inline

Useful to calculate bounding box of rotated items, when rotation is not cardinal.

Returns
the bounding box of this, after rotation.

Definition at line 720 of file box2.h.

References BOX2< Vec >::GetEnd(), BOX2< Vec >::GetOrigin(), RotatePoint(), BOX2< Vec >::SetEnd(), BOX2< Vec >::SetOrigin(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PCB_TEXT::GetBoundingBox(), KIGFX::GetTextExtents(), and API_HANDLER_COMMON::handleGetTextExtents().

◆ GetCenter()

◆ GetEnd()

template<class Vec >
constexpr const Vec BOX2< Vec >::GetEnd ( ) const
inlineconstexpr

Definition at line 212 of file box2.h.

References BOX2< Vec >::GetBottom(), and BOX2< Vec >::GetRight().

Referenced by EDA_DATA::AddPackage(), BOOST_AUTO_TEST_CASE(), LABEL_MANAGER::boxMtv(), KIGFX::boxText(), buildBoardBoundingBoxPoly(), BuildBoardPolygonOutlines(), AR_AUTOPLACER::buildFpAreas(), AR_AUTOPLACER::calculateKeepOutArea(), SCH_EDIT_TOOL::ChangeTextType(), PDF_PLOTTER::ClosePage(), AR_MATRIX::ComputeMatrixSize(), BOX2< Vec >::Contains(), KIGFX::DS_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::SCH_PAINTER::drawItemBoundingBox(), KIGFX::GAL::DrawRectangle(), FillNegativeKnockout(), SCH_LABEL::GetBodyBoundingBox(), SCH_FIELD::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), GERBER_DRAW_ITEM::GetBoundingBox(), PCB_DIMENSION_BASE::GetBoundingBox(), BOX2< Vec >::GetBoundingBoxRotated(), NL_SCHEMATIC_PLUGIN_IMPL::GetModelExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetModelExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetModelExtents(), NL_PCBNEW_PLUGIN_IMPL::GetModelExtents(), AR_AUTOPLACER::getOptimalFPPlacement(), KIFONT::STROKE_FONT::GetTextAsGlyphs(), BOX2< Vec >::Intersects(), BOX2< Vec >::Merge(), PCB_SHAPE::Normalize(), SCH_SHEET::Plot(), SCH_SYMBOL::PlotDNP(), PlotStandardLayer(), primitiveNeedsUpdate(), SCH_SHEET::Print(), SCH_SYMBOL::Print(), SVG_PLOTTER::Rect(), EDIT_TOOL::Rotate(), KIGFX::VIEW::SetBoundary(), shapeNeedsUpdate(), AR_AUTOPLACER::testRectangle(), TRANSFORM::TransformCoordinate(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), and PCB_DIM_LEADER::updateGeometry().

◆ GetHeight()

template<class Vec >
constexpr size_type BOX2< Vec >::GetHeight ( ) const
inlineconstexpr

Definition at line 215 of file box2.h.

References BOX2< Vec >::m_Size, and VECTOR2< T >::y.

Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), GERBER_JOBFILE_WRITER::addJSONGeneralSpecs(), AUTOPLACE_TOOL::autoplace(), LABEL_MANAGER::boxMtv(), buildBoardBoundingBoxPoly(), BuildBoardPolygonOutlines(), PNS::DP_GATEWAYS::BuildFromPrimitivePair(), ZONE_FILLER::buildThermalSpokes(), PCB_IO_EAGLE::centerBoard(), AUTOPLACER::computeFBoxSize(), AR_MATRIX::ComputeMatrixSize(), PNS::ConvexHull(), GENCAD_EXPORTER::CreateComponentsSection(), PNS::OPTIMIZER::customBreakouts(), COMMON_TOOLS::doCenter(), PAD::doCheckPad(), EESCHEMA_JOBS_HANDLER::doSymExportSvg(), PCB_SELECTION_TOOL::doSyncSelection(), COMMON_TOOLS::doZoomFit(), KIGFX::PCB_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), DRAWING_TOOL::DrawBoardCharacteristics(), DRAWING_TOOL::DrawDimension(), BOARD_PRINTOUT::DrawPage(), HPGL_PLOTTER::EndPlot(), BOARD_NETLIST_UPDATER::estimateFootprintInsertionPosition(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), AUTOPLACER::fieldBoxPlacement(), AUTOPLACER::fieldVPlacement(), PCB_SELECTION_TOOL::FindItem(), DESIGN_BLOCK_PREVIEW_WIDGET::fitOnDrawArea(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), PCB_BASE_FRAME::FocusOnItems(), GENDRILL_WRITER_BASE::genDrillMapFile(), AR_AUTOPLACER::genPlacementRoutingMatrix(), DS_DRAW_ITEM_TEXT::GetApproxBBox(), BOX2< Vec >::GetArea(), FOOTPRINT::GetArea(), PANEL_ZONE_GAL::GetBoardBoundingBox(), PCB_BASE_FRAME::GetBoardBoundingBox(), GERBER_DRAW_ITEM::GetBoundingBox(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), PCB_REFERENCE_IMAGE::GetEffectiveShape(), BOARD::GetFootprint(), NL_SCHEMATIC_PLUGIN_IMPL::GetModelExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetModelExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetModelExtents(), NL_PCBNEW_PLUGIN_IMPL::GetModelExtents(), AUTOPLACER::getPreferredSides(), D_CODE::GetShapeDim(), EDA_TEXT::GetTextBox(), KIGFX::GetTextExtents(), NL_SCHEMATIC_PLUGIN_IMPL::GetViewExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetViewExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetViewExtents(), NL_PCBNEW_PLUGIN_IMPL::GetViewExtents(), EE_SELECTION_TOOL::GuessSelectionCandidates(), PCB_SELECTION_TOOL::GuessSelectionCandidates(), SCH_JUNCTION::HitTest(), PCB_SELECTION_TOOL::hitTestDistance(), BOARD_ADAPTER::InitSettings(), BOX2< Vec >::Intersects(), PCB_IO_CADSTAR_ARCHIVE::LoadBoard(), PCB_IO_EAGLE::loadPlain(), SCH_IO_EAGLE::loadSchematic(), DSN::SPECCTRA_DB::makePADSTACK(), SIM_MODEL::MigrateSimModel(), LABEL_MANAGER::nearestBoxCorner(), SCH_TEXT::NormalizeJustification(), DIALOG_PIN_PROPERTIES::OnPaintShowPanel(), ALTIUM_PCB::Parse(), SCH_IO_LTSPICE_PARSER::Parse(), ALTIUM_PCB::ParsePolygons6Data(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSchematic(), partitionPolyIntoRegularCellGrid(), EXPORT_SVG::Plot(), SCH_SHEET::Plot(), SCH_TEXT::Plot(), SCH_SYMBOL::PlotDNP(), PlotInteractiveLayer(), SCH_SHEET::Print(), SCH_SYMBOL::Print(), SCH_TEXT::Print(), SCH_PRINTOUT::PrintPage(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), PNS_LOG_VIEWER_FRAME::SetBoard2(), KIGFX::VIEW::SetCenter(), DS_DATA_ITEM_TEXT::SetConstrainedTextSize(), PNS_LOG_VIEWER_FRAME::SetLogFile(), DIALOG_TABLE_PROPERTIES::sizeGridToTable(), SpreadFootprints(), EE_SELECTION_TOOL::SyncSelection(), POLYGON_TRIANGULATION::TesselatePolygon(), ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::updateOrthogonalDimension(), KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars(), PANEL_PCBNEW_COLOR_SETTINGS::zoomFitPreview(), PANEL_ZONE_GAL::ZoomFitScreen(), PCB_SELECTION_TOOL::zoomFitSelection(), and VERTEX_SET::zOrder().

◆ GetInflated() [1/2]

template<class Vec >
constexpr BOX2< Vec > BOX2< Vec >::GetInflated ( coord_type  aDelta) const
inlineconstexpr

Get a new rectangle that is this one, inflated by aDelta.

Definition at line 648 of file box2.h.

References BOX2< Vec >::GetInflated().

◆ GetInflated() [2/2]

template<class Vec >
constexpr BOX2< Vec > BOX2< Vec >::GetInflated ( coord_type  aDx,
coord_type  aDy 
) const
inlineconstexpr

Get a new rectangle that is this one, inflated by aDx and aDy.

Definition at line 638 of file box2.h.

References BOX2< Vec >::Inflate().

Referenced by BOOST_AUTO_TEST_CASE(), KIGEOM::BoxHitTest(), MULTICHANNEL_TOOL::buildRAOutline(), BOX2< Vec >::GetInflated(), MARKER_BASE::HitTestMarker(), and EDA_TEXT::TextHitTest().

◆ GetLeft()

template<class Vec >
constexpr coord_type BOX2< Vec >::GetLeft ( ) const
inlineconstexpr

Definition at line 228 of file box2.h.

References BOX2< Vec >::GetX().

Referenced by AR_AUTOPLACER::addPad(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), BOX2ISafe(), KIGEOM::BoxToSegs(), SCH_EDIT_TOOL::ChangeTextType(), BOX2< Vec >::ClosestPointTo(), KIGEOM::CollectBoxCorners(), TEST_BOARD_ITEM_FIXTURE::CompareItems(), TEST_EE_ITEM_FIXTURE::CompareItems(), ConvertPolygonToBlocks(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), KIGFX::SCH_PAINTER::draw(), DRAWING_TOOL::DrawDimension(), PDF_PLOTTER::EndPlot(), BOX2< Vec >::FarthestPointTo(), AUTOPLACER::fieldHPlacement(), formatBBox(), PCB_TEXTBOX::GetAnchorAndOppositeCorner(), PCB_TRACK::GetBoundingBox(), SCH_TEXTBOX::GetDrawPos(), SCH_SHEET::GetMinWidth(), EDIT_TOOL::getSafeMovement(), KIGEOM::GetSegsInDirection(), PL_SELECTION::GetTopLeftItem(), GRAPHICS_IMPORTER_BUFFER::ImportTo(), BOX2< Vec >::Intersects(), IsBOX2Safe(), KIGFX::knockoutText(), SCH_IO_EAGLE::loadSchematic(), CADSTAR_SCH_ARCHIVE_LOADER::loadSymdef(), PNS::NODE::NearestObstacle(), DIALOG_MOVE_EXACT::OnTextChanged(), SCH_IO_LTSPICE_PARSER::Parse(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSchematic(), PlotStandardLayer(), BRDITEMS_PLOTTER::PlotText(), DIALOG_PAD_PROPERTIES::redraw(), KIGFX::VIEW::SetCenter(), SHAPE_POLY_SET::SHAPE_POLY_SET(), PNS::WALKAROUND::singleStep(), PIN_LAYOUT_CACHE::transformBoxForPin(), RECTANGLE_POINT_EDIT_BEHAVIOR::UpdateItem(), ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::updateOrthogonalDimension(), KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars(), DS_PROXY_VIEW_ITEM::ViewDraw(), and KIGFX::ANCHOR_DEBUG::ViewDraw().

◆ GetOrigin()

template<class Vec >
constexpr const Vec & BOX2< Vec >::GetOrigin ( ) const
inlineconstexpr

Definition at line 210 of file box2.h.

References BOX2< Vec >::m_Pos.

Referenced by PNS_PCBNEW_DEBUG_DECORATOR::AddShape(), boost_test_print_type(), KIFONT::OUTLINE_GLYPH::BoundingBox(), KIGFX::boxText(), buildBoardBoundingBoxPoly(), BuildBoardPolygonOutlines(), PCB_TEXT::buildBoundingHull(), AR_AUTOPLACER::buildFpAreas(), AR_AUTOPLACER::calculateKeepOutArea(), SCH_EDIT_TOOL::ChangeTextType(), BOX2< Vec >::Contains(), PNS::ConvexHull(), SCH_IO_LTSPICE_PARSER::CreateKicadSYMBOLs(), KIGFX::DS_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::SCH_PAINTER::drawItemBoundingBox(), KIGFX::GAL::DrawRectangle(), drawShapes(), SYMBOL_EDITOR_CONTROL::ExportSymbolAsSVG(), FillNegativeKnockout(), PCB_SELECTION_TOOL::FindItem(), FOOTPRINT_PREVIEW_PANEL::fitToCurrentFootprint(), PCB_BASE_FRAME::FocusOnItems(), SCH_LABEL::GetBodyBoundingBox(), SCH_FIELD::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), GERBER_DRAW_ITEM::GetBoundingBox(), PCB_DIMENSION_BASE::GetBoundingBox(), BOX2< Vec >::GetBoundingBoxRotated(), AR_MATRIX::GetBrdCoordOrigin(), NL_SCHEMATIC_PLUGIN_IMPL::GetModelExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetModelExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetModelExtents(), NL_PCBNEW_PLUGIN_IMPL::GetModelExtents(), AR_AUTOPLACER::getOptimalFPPlacement(), idf_export_outline(), GRAPHICS_IMPORTER_BUFFER::ImportTo(), BOX2< Vec >::Intersects(), KiROUND(), LTSPICE_SCHEMATIC::Load(), EDIT_TOOL::PackAndMoveFootprints(), kiapi::common::PackBox2(), SCH_IO_LTSPICE_PARSER::Parse(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), playground_main_func(), EXPORT_SVG::Plot(), SCH_SHEET::Plot(), SCH_SYMBOL::PlotDNP(), PlotStandardLayer(), primitiveNeedsUpdate(), SCH_SHEET::Print(), SCH_SYMBOL::Print(), SVG_PLOTTER::Rect(), KIGFX::VIEW::SetBoundary(), shapeNeedsUpdate(), SpreadFootprints(), AR_AUTOPLACER::testRectangle(), TRANSFORM::TransformCoordinate(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), PCB_DIM_LEADER::updateGeometry(), and PAD::ViewBBox().

◆ GetPosition()

◆ GetRight()

template<class Vec >
constexpr coord_type BOX2< Vec >::GetRight ( ) const
inlineconstexpr

Definition at line 217 of file box2.h.

References BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, and VECTOR2< T >::x.

Referenced by SHAPE_INDEX< T >::Add(), AR_AUTOPLACER::addPad(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), BOX2ISafe(), KIGEOM::BoxToSegs(), PCB_TEXT::buildBoundingHull(), CN_ZONE_LAYER::BuildRTree(), SCH_EDIT_TOOL::ChangeTextType(), DRC_RTREE::CheckColliding(), ClipLine(), clipOutCode(), BOX2< Vec >::ClosestPointTo(), KIGEOM::CollectBoxCorners(), CN_ZONE_LAYER::Collide(), TEST_BOARD_ITEM_FIXTURE::CompareItems(), TEST_EE_ITEM_FIXTURE::CompareItems(), EE_RTREE::contains(), ConvertPolygonToBlocks(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), KIGFX::SCH_PAINTER::draw(), DRAWING_TOOL::DrawDimension(), DRC_RTREE::DRC_LAYER::DRC_LAYER(), EE_RTREE::EE_TYPE::EE_TYPE(), PDF_PLOTTER::EndPlot(), BOX2< Vec >::FarthestPointTo(), AUTOPLACER::fieldBoxPlacement(), AUTOPLACER::fieldHPlacement(), formatBBox(), AR_AUTOPLACER::genModuleOnRoutingMatrix(), PLACE_FILE_EXPORTER::GenReportData(), PCB_TEXTBOX::GetAnchorAndOppositeCorner(), PCB_DIMENSION_BASE::GetBoundingBox(), PCB_TRACK::GetBoundingBox(), KIFONT::OUTLINE_FONT::getBoundingBox(), SCH_TEXTBOX::GetDrawPos(), BOX2< Vec >::GetEnd(), SCH_SHEET::GetMinWidth(), EDIT_TOOL::getSafeMovement(), KIGEOM::GetSegsInDirection(), GRAPHICS_IMPORTER_BUFFER::ImportTo(), DRC_RTREE::Insert(), EE_RTREE::insert(), CN_RTREE< T >::Insert(), KIGFX::VIEW_RTREE::Insert(), BOX2< Vec >::Intersects(), IsBOX2Safe(), KIGFX::knockoutText(), PNS::NODE::NearestObstacle(), DIALOG_MOVE_EXACT::OnTextChanged(), PlotStandardLayer(), BRDITEMS_PLOTTER::PlotText(), CN_RTREE< T >::Query(), KIGFX::VIEW_RTREE::Query(), SHAPE_INDEX< T >::Query(), DRC_RTREE::QueryColliding(), DRC_RTREE::QueryCollidingPairs(), DIALOG_PAD_PROPERTIES::redraw(), SHAPE_INDEX< T >::Reindex(), EE_RTREE::remove(), CN_RTREE< T >::Remove(), SHAPE_INDEX< T >::Remove(), KIGFX::VIEW_RTREE::Remove(), KIGFX::VIEW::SetCenter(), SHAPE_POLY_SET::SHAPE_POLY_SET(), PNS::WALKAROUND::singleStep(), PIN_LAYOUT_CACHE::transformBoxForPin(), RECTANGLE_POINT_EDIT_BEHAVIOR::UpdateItem(), ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::updateOrthogonalDimension(), and KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars().

◆ GetSize()

template<class Vec >
constexpr const SizeVec & BOX2< Vec >::GetSize ( ) const
inlineconstexpr

◆ GetSizeMax()

template<class Vec >
constexpr int BOX2< Vec >::GetSizeMax ( ) const
inlineconstexpr
Returns
the width or height, whichever is greater.

Definition at line 235 of file box2.h.

References BOX2< Vec >::m_Size, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BOARD_ADAPTER::addShape(), SCH_LABEL_BASE::AutoplaceFields(), and ZONE_FILLER::fillCopperZone().

◆ GetTop()

template<class Vec >
constexpr coord_type BOX2< Vec >::GetTop ( ) const
inlineconstexpr

Definition at line 229 of file box2.h.

References BOX2< Vec >::GetY().

Referenced by AR_AUTOPLACER::addPad(), CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings(), FOOTPRINT::AutoPositionFields(), BOX2ISafe(), KIGEOM::BoxToSegs(), SCH_EDIT_TOOL::ChangeTextType(), BOX2< Vec >::ClosestPointTo(), KIGEOM::CollectBoxCorners(), TEST_BOARD_ITEM_FIXTURE::CompareItems(), TEST_EE_ITEM_FIXTURE::CompareItems(), ConvertPolygonToBlocks(), PLACEFILE_GERBER_WRITER::CreatePlaceFile(), AUTOPLACER::DoAutoplace(), KIGFX::SCH_PAINTER::draw(), DRAWING_TOOL::DrawDimension(), PDF_PLOTTER::EndPlot(), BOX2< Vec >::FarthestPointTo(), AUTOPLACER::fieldBoxPlacement(), formatBBox(), PCB_TEXTBOX::GetAnchorAndOppositeCorner(), PCB_TRACK::GetBoundingBox(), SCH_TEXTBOX::GetDrawPos(), SCH_SHEET::GetMinHeight(), EDIT_TOOL::getSafeMovement(), KIGEOM::GetSegsInDirection(), PL_SELECTION::GetTopLeftItem(), GRAPHICS_IMPORTER_BUFFER::ImportTo(), BOX2< Vec >::Intersects(), IsBOX2Safe(), KIGFX::knockoutText(), PNS::NODE::NearestObstacle(), KIGFX::WX_VIEW_CONTROLS::onScroll(), DIALOG_MOVE_EXACT::OnTextChanged(), SCH_IO_LTSPICE_PARSER::Parse(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSchematic(), PlotStandardLayer(), BRDITEMS_PLOTTER::PlotText(), DIALOG_PAD_PROPERTIES::redraw(), KIGFX::VIEW::SetCenter(), SHAPE_POLY_SET::SHAPE_POLY_SET(), PNS::WALKAROUND::singleStep(), PIN_LAYOUT_CACHE::transformBoxForPin(), RECTANGLE_POINT_EDIT_BEHAVIOR::UpdateItem(), ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::updateOrthogonalDimension(), KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars(), DS_PROXY_VIEW_ITEM::ViewDraw(), and KIGFX::ANCHOR_DEBUG::ViewDraw().

◆ GetWidth()

template<class Vec >
constexpr size_type BOX2< Vec >::GetWidth ( ) const
inlineconstexpr

Definition at line 214 of file box2.h.

References BOX2< Vec >::m_Size, and VECTOR2< T >::x.

Referenced by ZONE_FILLER::addHatchFillTypeOnZone(), GERBER_JOBFILE_WRITER::addJSONGeneralSpecs(), AUTOPLACE_TOOL::autoplace(), BOOST_AUTO_TEST_CASE(), LABEL_MANAGER::boxMtv(), buildBoardBoundingBoxPoly(), BuildBoardPolygonOutlines(), PNS::DP_GATEWAYS::BuildFromPrimitivePair(), ZONE_FILLER::buildThermalSpokes(), PCB_IO_EAGLE::centerBoard(), AUTOPLACER::computeFBoxSize(), AR_MATRIX::ComputeMatrixSize(), PNS::ConvexHull(), GENCAD_EXPORTER::CreateComponentsSection(), SCH_GLOBALLABEL::CreateGraphicShape(), PNS::OPTIMIZER::customBreakouts(), COMMON_TOOLS::doCenter(), PAD::doCheckPad(), EESCHEMA_JOBS_HANDLER::doSymExportSvg(), PCB_SELECTION_TOOL::doSyncSelection(), COMMON_TOOLS::doZoomFit(), KIGFX::PCB_PAINTER::draw(), DRAWING_TOOL::DrawBoardCharacteristics(), DRAWING_TOOL::DrawDimension(), BOARD_PRINTOUT::DrawPage(), HPGL_PLOTTER::EndPlot(), BOARD_NETLIST_UPDATER::estimateFootprintInsertionPosition(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), AUTOPLACER::fieldBoxPlacement(), PCB_SELECTION_TOOL::FindItem(), DESIGN_BLOCK_PREVIEW_WIDGET::fitOnDrawArea(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), PCB_BASE_FRAME::FocusOnItems(), EDA_DRAW_FRAME::FocusOnLocation(), GENDRILL_WRITER_BASE::genDrillMapFile(), AR_AUTOPLACER::genPlacementRoutingMatrix(), DS_DRAW_ITEM_TEXT::GetApproxBBox(), BOX2< Vec >::GetArea(), FOOTPRINT::GetArea(), PANEL_ZONE_GAL::GetBoardBoundingBox(), PCB_BASE_FRAME::GetBoardBoundingBox(), SCH_HIERLABEL::GetBodyBoundingBox(), GERBER_DRAW_ITEM::GetBoundingBox(), DIALOG_BOARD_STATISTICS::getDataFromPCB(), PCB_REFERENCE_IMAGE::GetEffectiveShape(), EDA_TEXT::GetEffectiveTextShape(), BOARD::GetFootprint(), NL_SCHEMATIC_PLUGIN_IMPL::GetModelExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetModelExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetModelExtents(), NL_PCBNEW_PLUGIN_IMPL::GetModelExtents(), AUTOPLACER::getPreferredSides(), D_CODE::GetShapeDim(), EDA_TEXT::GetTextBox(), KIGFX::GetTextExtents(), NL_SCHEMATIC_PLUGIN_IMPL::GetViewExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetViewExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetViewExtents(), NL_PCBNEW_PLUGIN_IMPL::GetViewExtents(), EE_SELECTION_TOOL::GuessSelectionCandidates(), PCB_SELECTION_TOOL::GuessSelectionCandidates(), SCH_JUNCTION::HitTest(), PCB_SELECTION_TOOL::hitTestDistance(), BOARD_ADAPTER::InitSettings(), BOX2< Vec >::Intersects(), PCB_IO_CADSTAR_ARCHIVE::LoadBoard(), PCB_IO_EAGLE::loadPlain(), SCH_IO_EAGLE::loadSchematic(), DSN::SPECCTRA_DB::makePADSTACK(), SIM_MODEL::MigrateSimModel(), LABEL_MANAGER::nearestBoxCorner(), NL_PCBNEW_PLUGIN_IMPL::NL_PCBNEW_PLUGIN_IMPL(), SCH_TEXT::NormalizeJustification(), DIALOG_PIN_PROPERTIES::OnPaintShowPanel(), ALTIUM_PCB::Parse(), SCH_IO_LTSPICE_PARSER::Parse(), ALTIUM_PCB::ParsePolygons6Data(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSchematic(), partitionPolyIntoRegularCellGrid(), EXPORT_SVG::Plot(), SCH_SHEET::Plot(), SCH_SYMBOL::PlotDNP(), PlotInteractiveLayer(), SCH_SHEET::Print(), SCH_SYMBOL::Print(), SCH_PRINTOUT::PrintPage(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), PNS_LOG_VIEWER_FRAME::SetBoard2(), NL_SCHEMATIC_PLUGIN_IMPL::SetCanvas(), NL_GERBVIEW_PLUGIN_IMPL::SetCanvas(), NL_PL_EDITOR_PLUGIN_IMPL::SetCanvas(), KIGFX::VIEW::SetCenter(), DS_DATA_ITEM_TEXT::SetConstrainedTextSize(), PNS_LOG_VIEWER_FRAME::SetLogFile(), NL_SCHEMATIC_PLUGIN_IMPL::SetViewExtents(), NL_GERBVIEW_PLUGIN_IMPL::SetViewExtents(), NL_PL_EDITOR_PLUGIN_IMPL::SetViewExtents(), NL_PCBNEW_PLUGIN_IMPL::SetViewExtents(), DIALOG_TABLE_PROPERTIES::sizeGridToTable(), SpreadFootprints(), EE_SELECTION_TOOL::SyncSelection(), POLYGON_TRIANGULATION::TesselatePolygon(), PCB_DIM_LEADER::updateGeometry(), ALIGNED_DIMENSION_POINT_EDIT_BEHAVIOR::updateOrthogonalDimension(), KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars(), DS_PROXY_VIEW_ITEM::ViewDraw(), GERBER_DRAW_ITEM::ViewGetLOD(), EE_SELECTION_TOOL::ZoomFitCrossProbeBBox(), PCB_SELECTION_TOOL::ZoomFitCrossProbeBBox(), PANEL_PCBNEW_COLOR_SETTINGS::zoomFitPreview(), PANEL_ZONE_GAL::ZoomFitScreen(), PCB_SELECTION_TOOL::zoomFitSelection(), and VERTEX_SET::zOrder().

◆ GetWithOffset()

template<class Vec >
constexpr BOX2< Vec > BOX2< Vec >::GetWithOffset ( const Vec &  aMoveVector) const
inlineconstexpr

Definition at line 270 of file box2.h.

References BOX2< Vec >::Move().

Referenced by BOOST_AUTO_TEST_CASE().

◆ GetX()

◆ GetY()

◆ Inflate() [1/2]

template<class Vec >
constexpr BOX2< Vec > & BOX2< Vec >::Inflate ( coord_type  aDelta)
inlineconstexpr

Inflate the rectangle horizontally and vertically by aDelta.

If aDelta is negative the rectangle is deflated.

Definition at line 629 of file box2.h.

References BOX2< Vec >::Inflate().

◆ Inflate() [2/2]

template<class Vec >
constexpr BOX2< Vec > & BOX2< Vec >::Inflate ( coord_type  dx,
coord_type  dy 
)
inlineconstexpr

Inflates the rectangle horizontally by dx and vertically by dy.

If dx and/or dy is negative the rectangle is deflated.

Definition at line 558 of file box2.h.

References BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by AR_AUTOPLACER::addPad(), FOOTPRINT::AutoPositionFields(), SHAPE_ARC::BBox(), SHAPE_LINE_CHAIN::BBox(), SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI::BBox(), SHAPE_POLY_SET::BBox(), SHAPE_SEGMENT::BBox(), BOOST_AUTO_TEST_CASE(), KIGFX::boxText(), buildBoardBoundingBoxPoly(), BuildBoardPolygonOutlines(), ZONE_FILLER::buildCopperItemClearances(), AR_AUTOPLACER::buildFpAreas(), ZONE_FILLER::buildThermalSpokes(), PNS::LINE::ChangedArea(), SCH_EDIT_TOOL::ChangeTextType(), DRC_RTREE::CheckColliding(), EE_RTREE::contains(), KIGFX::SCH_PAINTER::draw(), drawBacksideTicks(), drawShapes(), drawTicksAlongLine(), DRAWING_TOOL::DrawVia(), SYMBOL_EDITOR_CONTROL::ExportSymbolAsSVG(), ZONE_FILLER::Fill(), FillNegativeKnockout(), EDA_DRAW_FRAME::FocusOnLocation(), SHAPE_LINE_CHAIN::GenerateBBoxCache(), AR_AUTOPLACER::genModuleOnRoutingMatrix(), DS_DRAW_ITEM_TEXT::GetApproxBBox(), SCH_LABEL_BASE::GetBodyBoundingBox(), SCH_SHEET::GetBodyBoundingBox(), SCH_LABEL::GetBodyBoundingBox(), BITMAP_BASE::GetBoundingBox(), EDA_SHAPE::getBoundingBox(), SCH_BUS_ENTRY_BASE::GetBoundingBox(), SCH_JUNCTION::GetBoundingBox(), SCH_NO_CONNECT::GetBoundingBox(), GERBER_DRAW_ITEM::GetBoundingBox(), PCB_DIMENSION_BASE::GetBoundingBox(), PCB_GROUP::GetBoundingBox(), PCB_TEXT::GetBoundingBox(), FOOTPRINT::GetBoundingBox(), FOOTPRINT_EDIT_FRAME::GetDocumentExtents(), BOX2< Vec >::GetInflated(), ZONE::GetInteractingZones(), SCH_SCREEN::GetItem(), PIN_LAYOUT_CACHE::GetPinBoundingBox(), EE_SELECTION_TOOL::GuessSelectionCandidates(), PCB_TUNING_PATTERN::HitTest(), EDA_SHAPE::hitTest(), SCH_BUS_ENTRY_BASE::HitTest(), SCH_JUNCTION::HitTest(), SCH_LINE::HitTest(), SCH_NO_CONNECT::HitTest(), DS_DRAW_ITEM_BASE::HitTest(), DS_DRAW_ITEM_POLYPOLYGONS::HitTest(), DS_DRAW_ITEM_RECT::HitTest(), PAD::HitTest(), PCB_DIMENSION_BASE::HitTest(), PCB_TARGET::HitTest(), PCB_TRACK::HitTest(), PCB_VIA::HitTest(), PCB_ARC::HitTest(), ZONE::HitTest(), SCH_SHEET::HitTest(), PCB_TEXTBOX::HitTest(), SCH_FIELD::HitTest(), SCH_LABEL_BASE::HitTest(), SCH_PIN::HitTest(), SCH_SHEET_PIN::HitTest(), SCH_SYMBOL::HitTest(), SCH_TABLE::HitTest(), SCH_TEXT::HitTest(), SCH_TEXTBOX::HitTest(), DS_DRAW_ITEM_BITMAP::HitTest(), FOOTPRINT::HitTest(), PCB_TABLE::HitTest(), BOX2< Vec >::Inflate(), BOARD_ADAPTER::InitSettings(), DRC_RTREE::Insert(), EE_RTREE::insert(), BOX2< Vec >::Intersects(), ZONE_FILLER::knockoutThermalReliefs(), EE_SELECTION_TOOL::Main(), DIALOG_PIN_PROPERTIES::OnPaintShowPanel(), EE_RTREE::Overlapping(), DRC_RTREE::Overlapping(), SCH_LINE::Plot(), SCH_SHEET::Plot(), SCH_SYMBOL::PlotDNP(), PlotInteractiveLayer(), SCH_SHEET::Print(), SCH_SYMBOL::Print(), SHAPE_INDEX< T >::Query(), DRC_RTREE::QueryColliding(), DRC_RTREE::QueryCollidingPairs(), DIALOG_PAD_PROPERTIES::redraw(), PCB_EDIT_FRAME::redrawNetnames(), EE_RTREE::remove(), EE_SELECTION_TOOL::selectionContains(), PL_SELECTION_TOOL::selectionContains(), PCB_SELECTION_TOOL::selectionContains(), PNS_LOG_VIEWER_FRAME::SetBoard2(), PNS_LOG_VIEWER_FRAME::SetLogFile(), SpreadFootprints(), KIFONT::FONT::StringBoundaryLimits(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances(), AR_AUTOPLACER::testFootprintOnBoard(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testKnockoutTextAgainstZone(), DRC_TEST_PROVIDER_SOLDER_MASK::testMaskItemAgainstZones(), AR_AUTOPLACER::testRectangle(), PCB_TEXT::TextHitTest(), PCB_DIM_ALIGNED::updateGeometry(), PCB_DIM_ORTHOGONAL::updateGeometry(), PCB_DIM_RADIAL::updateGeometry(), PCB_DIM_LEADER::updateGeometry(), FOOTPRINT::ViewBBox(), PCB_SHAPE::ViewBBox(), PCB_TRACK::ViewBBox(), ROUTER_PREVIEW_ITEM::ViewBBox(), EE_SELECTION_TOOL::ZoomFitCrossProbeBBox(), and PCB_SELECTION_TOOL::ZoomFitCrossProbeBBox().

◆ Intersect()

template<class Vec >
constexpr BOX2< Vec > BOX2< Vec >::Intersect ( const BOX2< Vec > &  aRect)
inlineconstexpr
Returns
true if this rectangle intersects aRect.

Definition at line 347 of file box2.h.

References BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, BOX2< Vec >::Normalize(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ Intersects() [1/3]

template<class Vec >
constexpr bool BOX2< Vec >::Intersects ( const BOX2< Vec > &  aRect) const
inlineconstexpr
Returns
true if the argument rectangle intersects this rectangle. (i.e. if the 2 rectangles have at least a common point)

Definition at line 311 of file box2.h.

References left, BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, BOX2< Vec >::Normalize(), right, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BOOST_AUTO_TEST_CASE(), KIGEOM::BoxHitTest(), LABEL_MANAGER::boxMtv(), ZONE_FILLER::buildCopperItemClearances(), ZONE_FILLER::buildThermalSpokes(), CN_VISITOR::checkZoneZoneConnection(), Collide(), enclosedByAreaFunc(), ZONE_FILLER::Fill(), AUTOPLACER::filterCollisions(), PCB_TUNING_PATTERN::HitTest(), EDA_SHAPE::hitTest(), SCH_BUS_ENTRY_BASE::HitTest(), SCH_FIELD::HitTest(), SCH_LABEL_BASE::HitTest(), SCH_LINE::HitTest(), SCH_NO_CONNECT::HitTest(), SCH_PIN::HitTest(), SCH_SHEET::HitTest(), SCH_SYMBOL::HitTest(), SCH_TABLE::HitTest(), SCH_TEXT::HitTest(), SCH_TEXTBOX::HitTest(), DS_DRAW_ITEM_BASE::HitTest(), DS_DRAW_ITEM_POLYPOLYGONS::HitTest(), DS_DRAW_ITEM_RECT::HitTest(), FOOTPRINT::HitTest(), PAD::HitTest(), PCB_DIMENSION_BASE::HitTest(), PCB_TABLE::HitTest(), PCB_TARGET::HitTest(), PCB_TEXTBOX::HitTest(), PCB_TRACK::HitTest(), PCB_ARC::HitTest(), ZONE::HitTest(), MARKER_BASE::HitTestMarker(), SHAPE_LINE_CHAIN::Intersect(), BOX2< Vec >::Intersects(), intersectsAreaFunc(), ZONE_FILLER::knockoutThermalReliefs(), FABMASTER::loadZones(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testKnockoutTextAgainstZone(), DRC_TEST_PROVIDER_SOLDER_MASK::testMaskItemAgainstZones(), BOARD::TestZoneIntersection(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones(), EDA_TEXT::TextHitTest(), PCB_TEXT::TextHitTest(), and DS_PROXY_VIEW_ITEM::ViewDraw().

◆ Intersects() [2/3]

template<class Vec >
bool BOX2< Vec >::Intersects ( const BOX2< Vec > &  aRect,
const EDA_ANGLE aRotation 
) const
inline

◆ Intersects() [3/3]

template<class Vec >
bool BOX2< Vec >::Intersects ( const Vec &  aPoint1,
const Vec &  aPoint2 
) const
inline
Returns
true if this rectangle intersects a line from aPoint1 to aPoint2

Definition at line 375 of file box2.h.

References BOX2< Vec >::Contains(), BOX2< Vec >::GetEnd(), BOX2< Vec >::GetOrigin(), and SegmentIntersectsSegment().

◆ IntersectsCircle()

template<class Vec >
bool BOX2< Vec >::IntersectsCircle ( const Vec &  aCenter,
const int  aRadius 
) const
inline
Returns
true if this rectangle intersects the circle defined by aCenter and aRadius.

Definition at line 504 of file box2.h.

References BOX2< Vec >::ClosestPointTo(), and BOX2< Vec >::m_init.

Referenced by PCB_VIA::HitTest(), and BOX2< Vec >::IntersectsCircleEdge().

◆ IntersectsCircleEdge()

template<class Vec >
bool BOX2< Vec >::IntersectsCircleEdge ( const Vec &  aCenter,
const int  aRadius,
const int  aWidth 
) const
inline
Returns
true if this rectangle intersects the edge of a circle defined by aCenter and aRadius.

Definition at line 523 of file box2.h.

References BOX2< Vec >::FarthestPointTo(), BOX2< Vec >::IntersectsCircle(), BOX2< Vec >::m_init, and BOX2< Vec >::Normalize().

Referenced by EDA_SHAPE::hitTest().

◆ IsValid()

template<class Vec >
constexpr bool BOX2< Vec >::IsValid ( ) const
inlineconstexpr

◆ Merge() [1/2]

template<class Vec >
constexpr BOX2< Vec > & BOX2< Vec >::Merge ( const BOX2< Vec > &  aRect)
inlineconstexpr

Modify the position and size of the rectangle in order to contain aRect.

Parameters
aRectis the rectangle to merge with this rectangle.

Definition at line 658 of file box2.h.

References BOX2< Vec >::GetEnd(), BOX2< Vec >::GetPosition(), BOX2< Vec >::GetSize(), BOX2< Vec >::m_init, BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, BOX2< Vec >::Normalize(), and BOX2< Vec >::SetEnd().

Referenced by SHAPE_LINE_CHAIN::Append(), HPGL_PLOTTER::Arc(), PNS::TOPOLOGY::AssembleCluster(), SHAPE_COMPOUND::BBox(), SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI::BBox(), SHAPE_POLY_SET::BBox(), SHAPE_POLY_SET::BBoxFromCaches(), PAD::BuildEffectiveShapes(), PNS::ARC::ChangedArea(), PNS::VIA::ChangedArea(), HPGL_PLOTTER::Circle(), EDA_SHAPE::computeArcBBox(), GBR_LAYOUT::ComputeBoundingBox(), BOARD::ComputeBoundingBox(), DESIGN_BLOCK_PREVIEW_WIDGET::DisplayDesignBlock(), SCH_SYMBOL::doGetBoundingBox(), EDIT_TOOL::doMoveSelection(), drawMarkup(), drawShapes(), HPGL_PLOTTER::EndPlot(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), PNS::extendBox(), AUTOPLACER::fieldBoxPlacement(), ZONE_FILLER::fillCopperZone(), SCH_LABEL_BASE::GetBodyBoundingBox(), SCH_LABEL::GetBodyBoundingBox(), LIB_SYMBOL::GetBodyBoundingBox(), EDA_SHAPE::getBoundingBox(), SELECTION::GetBoundingBox(), IMPORTED_LINE::GetBoundingBox(), IMPORTED_CIRCLE::GetBoundingBox(), IMPORTED_ARC::GetBoundingBox(), IMPORTED_POLYGON::GetBoundingBox(), IMPORTED_TEXT::GetBoundingBox(), IMPORTED_SPLINE::GetBoundingBox(), SCH_LABEL_BASE::GetBoundingBox(), SCH_SHEET::GetBoundingBox(), SCH_TABLE::GetBoundingBox(), EE_SELECTION::GetBoundingBox(), NETINFO_ITEM::GetBoundingBox(), PCB_GROUP::GetBoundingBox(), PCB_MARKER::GetBoundingBox(), PCB_TABLE::GetBoundingBox(), PCB_SELECTION::GetBoundingBox(), FOOTPRINT::GetBoundingBox(), SCH_TABLE::GetCenter(), SELECTION::GetCenter(), GERBVIEW_SELECTION::GetCenter(), SCH_EDIT_FRAME::GetDocumentExtents(), FOOTPRINT::GetFpPadsLocalBbox(), SVG_IMPORT_PLUGIN::GetImageBBox(), FOOTPRINT::GetLayerBoundingBox(), PIN_LAYOUT_CACHE::GetPinBoundingBox(), AUTOPLACER::getPossibleCollisions(), getSheetBbox(), PNS_TEST_DEBUG_DECORATOR::GetStageExtents(), KIFONT::OUTLINE_FONT::getTextAsGlyphsUnlocked(), LIB_SYMBOL::GetUnitBoundingBox(), PCB_ARC::HitTest(), GRAPHICS_IMPORTER_BUFFER::ImportTo(), CADSTAR_SCH_ARCHIVE_LOADER::Load(), EDIT_TOOL::PackAndMoveFootprints(), SCH_IO_LTSPICE_PARSER::Parse(), PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), SCH_EASYEDAPRO_PARSER::ParseSchematic(), SCH_EASYEDA_PARSER::ParseSchematic(), HPGL_PLOTTER::PenTo(), playground_main_func(), EDIT_TOOL::Rotate(), SHAPE_LINE_CHAIN::Slice(), SpreadFootprints(), LTSPICE_SCHEMATIC::StructureBuilder(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::testCourtyardClearances(), SCH_EDIT_FRAME::TrimWire(), EDIT_TOOL::updateModificationPoint(), GERBVIEW_SELECTION::ViewBBox(), EDIT_POINTS::ViewBBox(), KIGFX::VIEW_GROUP::ViewBBox(), PCB_DIMENSION_BASE::ViewBBox(), and ROUTER_PREVIEW_ITEM::ViewBBox().

◆ Merge() [2/2]

template<class Vec >
constexpr BOX2< Vec > & BOX2< Vec >::Merge ( const Vec &  aPoint)
inlineconstexpr

Modify the position and size of the rectangle in order to contain the given point.

Parameters
aPointis the point to merge with the rectangle.

Definition at line 692 of file box2.h.

References BOX2< Vec >::GetEnd(), BOX2< Vec >::m_init, BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, BOX2< Vec >::Normalize(), and BOX2< Vec >::SetEnd().

◆ Move()

◆ Normalize()

template<class Vec >
constexpr BOX2< Vec > & BOX2< Vec >::Normalize ( )
inlineconstexpr

Ensure that the height and width are positive.

Definition at line 146 of file box2.h.

References BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by BOOST_AUTO_TEST_CASE(), BOX2< Vec >::BOX2(), LABEL_MANAGER::boxMtv(), BOX2< Vec >::ClosestPointTo(), GBR_LAYOUT::ComputeBoundingBox(), PNS::ConvexHull(), SCH_SYMBOL::doGetBoundingBox(), BOX2< Vec >::FarthestPointTo(), PCB_TEXTBOX::GetAnchorAndOppositeCorner(), SCH_LABEL_BASE::GetBodyBoundingBox(), SCH_LABEL::GetBodyBoundingBox(), SCH_HIERLABEL::GetBodyBoundingBox(), EDA_SHAPE::getBoundingBox(), SCH_BUS_ENTRY_BASE::GetBoundingBox(), SCH_FIELD::GetBoundingBox(), SCH_LABEL_BASE::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), GERBER_DRAW_ITEM::GetBoundingBox(), PCB_DIMENSION_BASE::GetBoundingBox(), PCB_DIM_CENTER::GetBoundingBox(), KIFONT::OUTLINE_FONT::getBoundingBox(), SCH_TEXTBOX::GetDrawPos(), NL_SCHEMATIC_PLUGIN_IMPL::GetModelExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetModelExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetModelExtents(), NL_PCBNEW_PLUGIN_IMPL::GetModelExtents(), PIN_LAYOUT_CACHE::GetPinBoundingBox(), KIFONT::STROKE_FONT::GetTextAsGlyphs(), EDA_TEXT::GetTextBox(), KIGFX::GetTextExtents(), KIGFX::VIEW::GetViewport(), EDA_SHAPE::hitTest(), PAD::HitTest(), ZONE::HitTest(), BOX2< Vec >::Intersect(), BOX2< Vec >::Intersects(), BOX2< Vec >::IntersectsCircleEdge(), BOX2< Vec >::Merge(), PCB_SHAPE::Normalize(), EDIT_TOOL::PackAndMoveFootprints(), primitiveNeedsUpdate(), SVG_PLOTTER::Rect(), KIGFX::VIEW::Redraw(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectTableCells(), EE_SELECTION_TOOL::selectTableCells(), shapeNeedsUpdate(), STROKE_PARAMS::Stroke(), KIGFX::PREVIEW::SELECTION_AREA::ViewBBox(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), EE_SELECTION_TOOL::ZoomFitCrossProbeBBox(), and PCB_SELECTION_TOOL::ZoomFitCrossProbeBBox().

◆ Offset() [1/2]

template<class Vec >
constexpr void BOX2< Vec >::Offset ( const Vec &  offset)
inlineconstexpr

Definition at line 265 of file box2.h.

References BOX2< Vec >::Offset().

◆ Offset() [2/2]

◆ operator!=()

template<class Vec >
constexpr bool BOX2< Vec >::operator!= ( const BOX2< Vec > &  aOther) const
inlineconstexpr

Definition at line 900 of file box2.h.

◆ operator==()

template<class Vec >
constexpr bool BOX2< Vec >::operator== ( const BOX2< Vec > &  aOther) const
inlineconstexpr

Definition at line 891 of file box2.h.

◆ SetEnd() [1/2]

template<class Vec >
constexpr void BOX2< Vec >::SetEnd ( const Vec &  pos)
inlineconstexpr

Definition at line 302 of file box2.h.

References BOX2< Vec >::m_Pos, and BOX2< Vec >::SetSize().

◆ SetEnd() [2/2]

◆ SetHeight()

◆ SetMaximum()

◆ SetOrigin() [1/2]

template<class Vec >
constexpr void BOX2< Vec >::SetOrigin ( const Vec &  pos)
inlineconstexpr

Definition at line 237 of file box2.h.

References BOX2< Vec >::m_init, and BOX2< Vec >::m_Pos.

Referenced by LABEL_MANAGER::Add(), BOOST_AUTO_TEST_CASE(), SCH_EDIT_TOOL::ChangeTextType(), PDF_PLOTTER::ClosePage(), BOX2< Vec >::Compute(), EDA_SHAPE::computeArcBBox(), AUTOPLACER::fitFieldsBetweenWires(), PANEL_ZONE_GAL::GetBoardBoundingBox(), PCB_BASE_FRAME::GetBoardBoundingBox(), SCH_LABEL::GetBodyBoundingBox(), EDA_SHAPE::getBoundingBox(), SCH_FIELD::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), GERBER_DRAW_ITEM::GetBoundingBox(), DS_DRAW_ITEM_BITMAP::GetBoundingBox(), KIFONT::OUTLINE_FONT::getBoundingBox(), BOX2< Vec >::GetBoundingBoxRotated(), DXF_IMPORT_PLUGIN::GetImageBBox(), SVG_IMPORT_PLUGIN::GetImageBBox(), SCH_SCREEN::GetItem(), AR_AUTOPLACER::getOptimalFPPlacement(), KIFONT::OUTLINE_FONT::GetTextAsGlyphs(), KIFONT::STROKE_FONT::GetTextAsGlyphs(), EDA_TEXT::GetTextBox(), KIGFX::VIEW::GetViewport(), KIGFX::GAL::GetVisibleWorldExtents(), GRAPHICS_IMPORTER_BUFFER::ImportTo(), BOX2< Vec >::Intersects(), MARKER_BASE::MARKER_BASE(), SCH_IO_LTSPICE_PARSER::Parse(), KIGFX::PCB_VIEW::PCB_VIEW(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), KIGFX::SCH_VIEW::ResizeSheetWorkingArea(), KIGFX::SCH_VIEW::SCH_VIEW(), PNS_LOG_VIEWER_FRAME::SetBoard2(), PNS_LOG_VIEWER_FRAME::SetLogFile(), BOX2< Vec >::SetOrigin(), BOX2< Vec >::SetX(), BOX2< Vec >::SetY(), SYMBOL_DIFF_FRAME::SYMBOL_DIFF_FRAME(), SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME(), SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME(), TRANSFORM::TransformCoordinate(), KIGFX::VIEW::VIEW(), DS_PROXY_VIEW_ITEM::ViewBBox(), KIGFX::PREVIEW::SELECTION_AREA::ViewBBox(), EDIT_POINTS::ViewBBox(), and DS_PROXY_VIEW_ITEM::ViewDraw().

◆ SetOrigin() [2/2]

template<class Vec >
constexpr void BOX2< Vec >::SetOrigin ( coord_type  x,
coord_type  y 
)
inlineconstexpr

Definition at line 243 of file box2.h.

References BOX2< Vec >::SetOrigin().

◆ SetSize() [1/2]

◆ SetSize() [2/2]

template<class Vec >
constexpr void BOX2< Vec >::SetSize ( size_type  w,
size_type  h 
)
inlineconstexpr

Definition at line 254 of file box2.h.

References BOX2< Vec >::SetSize().

◆ SetWidth()

◆ SetX()

◆ SetY()

◆ SquaredDiagonal()

template<class Vec >
constexpr ecoord_type BOX2< Vec >::SquaredDiagonal ( ) const
inlineconstexpr

Return the square of the length of the diagonal of the rectangle.

When all you need is a comparison, this is faster than Diagonal().

Definition at line 781 of file box2.h.

References BOX2< Vec >::m_Size, and VECTOR2< T >::SquaredEuclideanNorm().

Referenced by BOOST_AUTO_TEST_CASE().

◆ SquaredDistance() [1/2]

template<class Vec >
constexpr ecoord_type BOX2< Vec >::SquaredDistance ( const BOX2< Vec > &  aBox) const
inlineconstexpr

Return the square of the minimum distance between self and box aBox.

Parameters
aBoxis the other box.
Returns
The distance squared from aBox.

Definition at line 808 of file box2.h.

References BOX2< Vec >::m_Pos, BOX2< Vec >::m_Size, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ SquaredDistance() [2/2]

template<class Vec >
constexpr ecoord_type BOX2< Vec >::SquaredDistance ( const Vec &  aP) const
inlineconstexpr

Member Data Documentation

◆ m_init

◆ m_Pos

◆ m_Size


The documentation for this class was generated from the following file: