KiCad PCB EDA Suite
VECTOR2< T > Class Template Reference

Class VECTOR2 defines a general 2D-vector/point. More...

#include <vector2d.h>

Public Types

typedef VECTOR2_TRAITS< T >::extended_type extended_type
 
typedef T coord_type
 

Public Member Functions

 VECTOR2 ()
 Construct a 2D-vector with x, y = 0. More...
 
 VECTOR2 (T x, T y)
 Construct a vector with given components x, y. More...
 
template<typename CastingType >
 VECTOR2 (const VECTOR2< CastingType > &aVec)
 Initializes a vector from another specialization. More...
 
template<typename CastedType >
VECTOR2< CastedType > operator() () const
 Casts a vector to another specialized subclass. More...
 
 operator wxPoint () const
 (wxPoint) implements the cast to wxPoint. More...
 
EuclideanNorm () const
 Destructor. More...
 
extended_type SquaredEuclideanNorm () const
 Function Squared Euclidean Norm computes the squared euclidean norm of the vector, which is defined as (x ** 2 + y ** 2). More...
 
VECTOR2< T > Perpendicular () const
 Function Perpendicular computes the perpendicular vector. More...
 
VECTOR2< T > Resize (T aNewLength) const
 Function Resize returns a vector of the same direction, but length specified in aNewLength. More...
 
double Angle () const
 Function Angle computes the angle of the vector. More...
 
VECTOR2< T > Rotate (double aAngle) const
 Function Rotate rotates the vector by a given angle. More...
 
const std::string Format () const
 Function Format returns the vector formatted as a string. More...
 
extended_type Cross (const VECTOR2< T > &aVector) const
 Function Cross() computes cross product of self with aVector. More...
 
extended_type Dot (const VECTOR2< T > &aVector) const
 Function Dot() computes dot product of self with aVector. More...
 
VECTOR2< T > & operator= (const VECTOR2< T > &aVector)
 Assignment operator. More...
 
VECTOR2< T > operator+ (const VECTOR2< T > &aVector) const
 Vector addition operator. More...
 
VECTOR2< T > operator+ (const T &aScalar) const
 Scalar addition operator. More...
 
VECTOR2< T > & operator+= (const VECTOR2< T > &aVector)
 Compound assignment operator. More...
 
VECTOR2< T > & operator+= (const T &aScalar)
 Compound assignment operator. More...
 
VECTOR2< T > operator- (const VECTOR2< T > &aVector) const
 Vector subtraction operator. More...
 
VECTOR2< T > operator- (const T &aScalar) const
 Scalar subtraction operator. More...
 
VECTOR2< T > & operator-= (const VECTOR2< T > &aVector)
 Compound assignment operator. More...
 
VECTOR2< T > & operator-= (const T &aScalar)
 Compound assignment operator. More...
 
VECTOR2< T > operator- ()
 Negate Vector operator. More...
 
extended_type operator* (const VECTOR2< T > &aVector) const
 Scalar product operator. More...
 
VECTOR2< T > operator* (const T &aFactor) const
 Multiplication with a factor. More...
 
VECTOR2< T > operator/ (const T &aFactor) const
 Division with a factor. More...
 
bool operator== (const VECTOR2< T > &aVector) const
 Equality operator. More...
 
bool operator!= (const VECTOR2< T > &aVector) const
 Not equality operator. More...
 
bool operator< (const VECTOR2< T > &aVector) const
 Smaller than operator. More...
 
bool operator<= (const VECTOR2< T > &aVector) const
 
bool operator> (const VECTOR2< T > &aVector) const
 Greater than operator. More...
 
bool operator>= (const VECTOR2< T > &aVector) const
 

Public Attributes

x
 
y
 

Static Public Attributes

static constexpr extended_type ECOORD_MAX = std::numeric_limits<extended_type>::max()
 
static constexpr extended_type ECOORD_MIN = std::numeric_limits<extended_type>::min()
 

Friends

std::ostream & operator (std::ostream &stream, const VECTOR2< T > &vector)
 

Detailed Description

template<class T = int>
class VECTOR2< T >

Class VECTOR2 defines a general 2D-vector/point.

This class uses templates to be universal. Several operators are provided to help easy implementing of linear algebra equations.

Definition at line 61 of file vector2d.h.

Member Typedef Documentation

template<class T = int>
typedef T VECTOR2< T >::coord_type

Definition at line 78 of file vector2d.h.

template<class T = int>
typedef VECTOR2_TRAITS<T>::extended_type VECTOR2< T >::extended_type

Definition at line 77 of file vector2d.h.

Constructor & Destructor Documentation

template<class T >
VECTOR2< T >::VECTOR2 ( )

Construct a 2D-vector with x, y = 0.

Definition at line 262 of file vector2d.h.

263 {
264  x = y = 0.0;
265 }
template<class T>
VECTOR2< T >::VECTOR2 ( x,
y 
)

Construct a vector with given components x, y.

Definition at line 286 of file vector2d.h.

287 {
288  x = aX;
289  y = aY;
290 }
template<class T = int>
template<typename CastingType >
VECTOR2< T >::VECTOR2 ( const VECTOR2< CastingType > &  aVec)
inline

Initializes a vector from another specialization.

Beware of rouding issues.

Definition at line 104 of file vector2d.h.

105  {
106  x = (T) aVec.x;
107  y = (T) aVec.y;
108  }
T
enum T contains all this lexer's tokens.

Member Function Documentation

template<class T >
double VECTOR2< T >::Angle ( ) const

Function Angle computes the angle of the vector.

Returns
vector angle, in radians

Definition at line 308 of file vector2d.h.

Referenced by EC_CIRCLE::Apply(), KIGFX::GERBVIEW_PAINTER::draw(), drawCursorStrings(), KIGFX::OPENGL_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawPolyline(), KIGFX::OPENGL_GAL::DrawSegment(), drawTicksAlongLine(), and POINT_EDITOR::updateItem().

309 {
310  return atan2( (double) y, (double) x );
311 }
template<class T>
VECTOR2< T >::extended_type VECTOR2< T >::Cross ( const VECTOR2< T > &  aVector) const

Function Cross() computes cross product of self with aVector.

Definition at line 479 of file vector2d.h.

References VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PNS::TOPOLOGY::AssembleDiffPair(), SEG::Intersect(), and DIMENSION::UpdateHeight().

480 {
481  return (extended_type) x * (extended_type) aVector.y -
482  (extended_type) y * (extended_type) aVector.x;
483 }
VECTOR2_TRAITS< T >::extended_type extended_type
Definition: vector2d.h:77
template<class T>
VECTOR2< T >::extended_type VECTOR2< T >::Dot ( const VECTOR2< T > &  aVector) const

Function Dot() computes dot product of self with aVector.

Definition at line 487 of file vector2d.h.

References VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PNS::DP_PRIMITIVE_PAIR::CursorOrientation(), SEG::LineProject(), SEG::NearestPoint(), SEG::PointCloserThan(), PNS::MEANDER_SHAPE::reflect(), and SEG::TCoef().

488 {
489  return (extended_type) x * (extended_type) aVector.x +
490  (extended_type) y * (extended_type) aVector.y;
491 }
VECTOR2_TRAITS< T >::extended_type extended_type
Definition: vector2d.h:77
template<class T >
T VECTOR2< T >::EuclideanNorm ( ) const
template<class T >
const std::string VECTOR2< T >::Format ( ) const

Function Format returns the vector formatted as a string.

Returns
the formatted string

Definition at line 402 of file vector2d.h.

Referenced by PNS::JOINT::Dump().

403 {
404  std::stringstream ss;
405 
406  ss << "( xy " << x << " " << y << " )";
407 
408  return ss.str();
409 }
template<class T = int>
VECTOR2< T >::operator wxPoint ( ) const
inlineexplicit

(wxPoint) implements the cast to wxPoint.

Returns
wxPoint - the vector cast to wxPoint.

Definition at line 123 of file vector2d.h.

124  {
125  return wxPoint( x, y );
126  }
template<class T>
bool VECTOR2< T >::operator!= ( const VECTOR2< T > &  aVector) const

Not equality operator.

Definition at line 530 of file vector2d.h.

References VECTOR2< T >::x, and VECTOR2< T >::y.

531 {
532  return ( aVector.x != x ) || ( aVector.y != y );
533 }
template<class T = int>
template<typename CastedType >
VECTOR2<CastedType> VECTOR2< T >::operator() ( ) const
inline

Casts a vector to another specialized subclass.

Beware of rouding issues.

Definition at line 113 of file vector2d.h.

114  {
115  return VECTOR2<CastedType>( (CastedType) x, (CastedType) y );
116  }
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:61
template<class T>
VECTOR2< T >::extended_type VECTOR2< T >::operator* ( const VECTOR2< T > &  aVector) const

Scalar product operator.

Definition at line 448 of file vector2d.h.

References VECTOR2< T >::x, and VECTOR2< T >::y.

449 {
450  return (extended_type)aVector.x * x + (extended_type)aVector.y * y;
451 }
VECTOR2_TRAITS< T >::extended_type extended_type
Definition: vector2d.h:77
template<class T>
VECTOR2< T > VECTOR2< T >::operator* ( const T &  aFactor) const

Multiplication with a factor.

Definition at line 455 of file vector2d.h.

456 {
457  VECTOR2<T> vector( x * aFactor, y * aFactor );
458  return vector;
459 }
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:61
template<class T>
VECTOR2< T > VECTOR2< T >::operator+ ( const VECTOR2< T > &  aVector) const

Vector addition operator.

Definition at line 413 of file vector2d.h.

References VECTOR2< T >::x, and VECTOR2< T >::y.

414 {
415  return VECTOR2<T> ( x + aVector.x, y + aVector.y );
416 }
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:61
template<class T>
VECTOR2< T > VECTOR2< T >::operator+ ( const T &  aScalar) const

Scalar addition operator.

Definition at line 420 of file vector2d.h.

421 {
422  return VECTOR2<T> ( x + aScalar, y + aScalar );
423 }
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:61
template<class T>
VECTOR2< T > & VECTOR2< T >::operator+= ( const VECTOR2< T > &  aVector)

Compound assignment operator.

Definition at line 332 of file vector2d.h.

References VECTOR2< T >::x, and VECTOR2< T >::y.

333 {
334  x += aVector.x;
335  y += aVector.y;
336  return *this;
337 }
template<class T>
VECTOR2< T > & VECTOR2< T >::operator+= ( const T &  aScalar)

Compound assignment operator.

Definition at line 341 of file vector2d.h.

342 {
343  x += aScalar;
344  y += aScalar;
345  return *this;
346 }
template<class T>
VECTOR2< T > VECTOR2< T >::operator- ( const VECTOR2< T > &  aVector) const

Vector subtraction operator.

Definition at line 427 of file vector2d.h.

References VECTOR2< T >::x, and VECTOR2< T >::y.

428 {
429  return VECTOR2<T> ( x - aVector.x, y - aVector.y );
430 }
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:61
template<class T>
VECTOR2< T > VECTOR2< T >::operator- ( const T &  aScalar) const

Scalar subtraction operator.

Definition at line 434 of file vector2d.h.

435 {
436  return VECTOR2<T> ( x - aScalar, y - aScalar );
437 }
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:61
template<class T>
VECTOR2< T > VECTOR2< T >::operator- ( )

Negate Vector operator.

Definition at line 441 of file vector2d.h.

442 {
443  return VECTOR2<T> ( -x, -y );
444 }
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:61
template<class T>
VECTOR2< T > & VECTOR2< T >::operator-= ( const VECTOR2< T > &  aVector)

Compound assignment operator.

Definition at line 350 of file vector2d.h.

References VECTOR2< T >::x, and VECTOR2< T >::y.

351 {
352  x -= aVector.x;
353  y -= aVector.y;
354  return *this;
355 }
template<class T>
VECTOR2< T > & VECTOR2< T >::operator-= ( const T &  aScalar)

Compound assignment operator.

Definition at line 359 of file vector2d.h.

360 {
361  x -= aScalar;
362  y -= aScalar;
363  return *this;
364 }
template<class T>
VECTOR2< T > VECTOR2< T >::operator/ ( const T &  aFactor) const

Division with a factor.

Definition at line 463 of file vector2d.h.

464 {
465  VECTOR2<T> vector( x / aFactor, y / aFactor );
466  return vector;
467 }
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:61
template<class T>
bool VECTOR2< T >::operator< ( const VECTOR2< T > &  aVector) const

Smaller than operator.

Definition at line 495 of file vector2d.h.

496 {
497  return ( *this * *this ) < ( aVector * aVector );
498 }
template<class T>
bool VECTOR2< T >::operator<= ( const VECTOR2< T > &  aVector) const

Definition at line 502 of file vector2d.h.

503 {
504  return ( *this * *this ) <= ( aVector * aVector );
505 }
template<class T>
VECTOR2< T > & VECTOR2< T >::operator= ( const VECTOR2< T > &  aVector)

Assignment operator.

Definition at line 323 of file vector2d.h.

References VECTOR2< T >::x, and VECTOR2< T >::y.

324 {
325  x = aVector.x;
326  y = aVector.y;
327  return *this;
328 }
template<class T>
bool VECTOR2< T >::operator== ( const VECTOR2< T > &  aVector) const

Equality operator.

Definition at line 523 of file vector2d.h.

References VECTOR2< T >::x, and VECTOR2< T >::y.

524 {
525  return ( aVector.x == x ) && ( aVector.y == y );
526 }
template<class T>
bool VECTOR2< T >::operator> ( const VECTOR2< T > &  aVector) const

Greater than operator.

Definition at line 509 of file vector2d.h.

510 {
511  return ( *this * *this ) > ( aVector * aVector );
512 }
template<class T>
bool VECTOR2< T >::operator>= ( const VECTOR2< T > &  aVector) const

Definition at line 516 of file vector2d.h.

517 {
518  return ( *this * *this ) >= ( aVector * aVector );
519 }
template<class T >
VECTOR2< T > VECTOR2< T >::Perpendicular ( ) const

Function Perpendicular computes the perpendicular vector.

Returns
Perpendicular vector

Definition at line 315 of file vector2d.h.

Referenced by EC_LINE::Apply(), PNS::DP_GATEWAYS::BuildGeneric(), PNS::MEANDER_SHAPE::makeMiterShape(), and PNS::SegmentHull().

316 {
317  VECTOR2<T> perpendicular( -y, x );
318  return perpendicular;
319 }
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:61
template<class T>
VECTOR2< T > VECTOR2< T >::Resize ( aNewLength) const

Function Resize returns a vector of the same direction, but length specified in aNewLength.

Parameters
aNewLengthlength of the rescaled vector
Returns
rescaled vector

Definition at line 387 of file vector2d.h.

References rescale(), and sign().

Referenced by Collide(), PNS::DP_PRIMITIVE_PAIR::CursorOrientation(), drawBacksideTicks(), drawTicksAlongLine(), PNS::MEANDER_SHAPE::forward(), PNS::MEANDER_SHAPE::genMeanderShape(), PNS::makeGapVector(), PNS::MEANDER_SHAPE::makeMiterShape(), PNS::MEANDERED_LINE::MeanderSegment(), PNS::MEANDER_SHAPE::miter(), PNS::MoveDiagonal(), SHAPE_LINE_CHAIN::PointAlong(), PNS::VIA::PushoutForce(), PNS::SHOVE::pushVia(), PNS::SegmentHull(), and KIGFX::PREVIEW::RULER_ITEM::ViewDraw().

388 {
389  if( x == 0 && y == 0 )
390  return VECTOR2<T> ( 0, 0 );
391 
392  extended_type l_sq_current = (extended_type) x * x + (extended_type) y * y;
393  extended_type l_sq_new = (extended_type) aNewLength * aNewLength;
394 
395  return VECTOR2<T> (
396  ( x < 0 ? -1 : 1 ) * sqrt( rescale( l_sq_new, (extended_type) x * x, l_sq_current ) ),
397  ( y < 0 ? -1 : 1 ) * sqrt( rescale( l_sq_new, (extended_type) y * y, l_sq_current ) ) ) * sign( aNewLength );
398 }
VECTOR2_TRAITS< T >::extended_type extended_type
Definition: vector2d.h:77
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:61
int rescale(int aNumerator, int aValue, int aDenominator)
Definition: math_util.cpp:32
int sign(T val)
Definition: math_util.h:44
template<class T >
VECTOR2< T > VECTOR2< T >::Rotate ( double  aAngle) const

Function Rotate rotates the vector by a given angle.

Rotate a VECTOR2 by aAngle.

Parameters
aAnglerotation angle in radians
Returns
rotated vector
Parameters
aAngle= rotation angle in radians

Definition at line 372 of file vector2d.h.

Referenced by EC_45DEGREE::Apply(), EC_CIRCLE::Apply(), PNS::OPTIMIZER::circleBreakouts(), drawBacksideTicks(), drawTicksAlongLine(), KIGFX::PREVIEW::ARC_GEOM_MANAGER::GetEndRadiusEnd(), getRectangleAlongCentreLine(), KIGFX::PREVIEW::ARC_GEOM_MANAGER::GetStartRadiusEnd(), PNS::MEANDER_SHAPE::miter(), KIGFX::PREVIEW::TWO_POINT_GEOMETRY_MANAGER::SetEnd(), BASIC_GAL::transform(), and PNS::MEANDER_SHAPE::turn().

373 {
374  // Avoid 0 radian rotation, case very frequently found
375  if( aAngle == 0.0 )
376  return VECTOR2<T> ( T( x ), T( y ) );
377 
378  double sa = sin( aAngle );
379  double ca = cos( aAngle );
380 
381  return VECTOR2<T> ( T( (double) x * ca - (double) y * sa ),
382  T( (double) x * sa + (double) y * ca ) );
383 }
T
enum T contains all this lexer's tokens.
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:61
template<class T >
VECTOR2< T >::extended_type VECTOR2< T >::SquaredEuclideanNorm ( ) const

Function Squared Euclidean Norm computes the squared euclidean norm of the vector, which is defined as (x ** 2 + y ** 2).

It is used to calculate the length of the vector.

Returns
Scalar, the euclidean norm

Definition at line 301 of file vector2d.h.

Referenced by Collide().

302 {
303  return (extended_type) x * x + (extended_type) y * y;
304 }
VECTOR2_TRAITS< T >::extended_type extended_type
Definition: vector2d.h:77

Friends And Related Function Documentation

template<class T = int>
std::ostream& operator ( std::ostream &  stream,
const VECTOR2< T > &  vector 
)
friend

Member Data Documentation

template<class T = int>
constexpr extended_type VECTOR2< T >::ECOORD_MAX = std::numeric_limits<extended_type>::max()
static

Definition at line 80 of file vector2d.h.

template<class T = int>
constexpr extended_type VECTOR2< T >::ECOORD_MIN = std::numeric_limits<extended_type>::min()
static

Definition at line 81 of file vector2d.h.

template<class T = int>
T VECTOR2< T >::x

Definition at line 83 of file vector2d.h.

Referenced by PNS_PCBNEW_DEBUG_DECORATOR::AddBox(), PNS_KICAD_IFACE::AddItem(), CINFO3D_VISU::AddSolidAreasShapesToContainer(), CLAYER_TRIANGLES::AddToMiddleContourns(), EDA_DRAW_FRAME::AdjustScrollBars(), GRID_HELPER::Align(), GRID_HELPER::AlignToSegment(), KIGFX::CAIRO_GAL::allocateBitmaps(), SHAPE_POLY_SET::Append(), EC_VERTICAL::Apply(), SEG::ApproxCollinear(), SEG::ApproxParallel(), HPGL_PLOTTER::Arc(), PS_PLOTTER::Arc(), PDF_PLOTTER::Arc(), SVG_PLOTTER::Arc(), GERBER_PLOTTER::Arc(), DXF_PLOTTER::Arc(), SHAPE_RECT::BBox(), KIGFX::OPENGL_GAL::BeginDrawing(), GRID_HELPER::BestSnapAnchor(), PCB_BASE_FRAME::BestZoom(), KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), BuildConvexHull(), PNS::DP_GATEWAYS::BuildForCursor(), DIRECTION_45::BuildInitialTrace(), CINFO3D_VISU::buildPadShapeThickOutlineAsPolygon(), CINFO3D_VISU::buildPadShapeThickOutlineAsSegments(), WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(), SEG::CanonicalCoefs(), SEG::ccw(), SHAPE_CONVEX::CDPoint(), KIGFX::WX_VIEW_CONTROLS::CenterOnCursor(), SHAPE_POLY_SET::chamferFilletPolygon(), POLY_GRID_PARTITION::checkClearance(), PNS::DP_GATEWAYS::checkDiagonalAlignment(), PS_PLOTTER::Circle(), PDF_PLOTTER::Circle(), SVG_PLOTTER::Circle(), DXF_PLOTTER::Circle(), KIGFX::CAIRO_GAL::ClearScreen(), Collide(), SHAPE_RECT::Collide(), SEG::Collinear(), PNS::commonParallelProjection(), GRID_HELPER::computeAnchors(), KIGFX::OPENGL_GAL::computeBitmapTextSize(), KIGFX::STROKE_FONT::computeBoundingBox(), KIGFX::STROKE_FONT::ComputeStringBoundaryLimits(), PSLIKE_PLOTTER::computeTextParameters(), DIRECTION_45::construct_(), POLY_GRID_PARTITION::containsPoint(), Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(), Convert_shape_line_polygon_to_triangles(), ConvertPolySetToPolyList(), SHAPE_POLY_SET::convertToClipper(), PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToGeneral(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), KIGFX::OPENGL_COMPOSITOR::CreateBuffer(), MICROWAVE_TOOL::createInductorBetween(), CreatePadsShapesSection(), VECTOR2< T >::Cross(), PCBNEW_CONTROL::CursorControl(), D_PAD::CustomShapeAsPolygonToBoardPosition(), DRC::doEdgeZoneDrc(), DRC::doFootprintOverlappingDrc(), PCB_TOOL::doInteractiveItemPlacement(), VECTOR2< T >::Dot(), KIGFX::PCB_PAINTER::draw(), KIGFX::CAIRO_GAL::DrawArc(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::CAIRO_GAL::DrawCircle(), KIGFX::OPENGL_GAL::DrawCircle(), KIGFX::CAIRO_GAL::DrawCurve(), DRAWING_TOOL::DrawDimension(), ZONE_CONTAINER::DrawFilledArea(), KIGFX::OPENGL_GAL::drawFilledSemiCircle(), D_CODE::DrawFlashedPolygon(), GERBER_DRAW_ITEM::DrawGbrPoly(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::GAL::DrawGrid(), KIGFX::CAIRO_GAL::drawGridLine(), KIGFX::CAIRO_GAL::DrawLine(), BASIC_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawLineQuad(), KIGFX::CAIRO_GAL::drawPoly(), KIGFX::OPENGL_GAL::DrawPolygon(), BASIC_GAL::DrawPolyline(), KIGFX::CAIRO_GAL::DrawRectangle(), KIGFX::OPENGL_GAL::DrawRectangle(), KIGFX::CAIRO_GAL::DrawSegment(), DRAWING_TOOL::drawSegment(), KIGFX::STROKE_FONT::drawSingleLineText(), KIGFX::OPENGL_GAL::drawStrokedSemiCircle(), KIGFX::PREVIEW::DrawTextNextToCursor(), ZONE_CONTAINER::DrawWhileCreateOutline(), PNS::DP_PRIMITIVE_PAIR::dump(), PNS::LOGGER::dumpShape(), GERBER_PLOTTER::emitDcode(), KIGFX::CAIRO_GAL::EndDrawing(), MODULE_EDITOR_TOOLS::EnumeratePads(), export_vrml_board(), export_vrml_zones(), DSN::SPECCTRA_DB::fillBOUNDARY(), fillPolygonWithHorizontalSegments(), ZONE_CONTAINER::FillZoneAreasWithSegments(), CN_LIST::FindNearby(), HPGL_PLOTTER::FlashPadCircle(), HPGL_PLOTTER::FlashPadCustom(), PSLIKE_PLOTTER::FlashPadCustom(), GERBER_PLOTTER::FlashPadCustom(), DXF_PLOTTER::FlashPadCustom(), HPGL_PLOTTER::FlashPadRoundRect(), PSLIKE_PLOTTER::FlashPadRoundRect(), GERBER_PLOTTER::FlashPadRoundRect(), DXF_PLOTTER::FlashPadRoundRect(), BOARD_ITEM::Flip(), WORKSHEET_LAYOUT_IO::format(), WORKSHEET_LAYOUT_IO::formatCoordinate(), WORKSHEET_LAYOUT_IO::formatRepeatParameters(), FractureEdge::FractureEdge(), SHAPE_POLY_SET::fractureSingle(), GERBER_DRAW_ITEM::GetABPosition(), getAnchorPoint(), D_PAD::GetBestAnchorPosition(), D_PAD::GetBoundingBox(), WORKSHEET_DATAITEM_POLYPOLYGON::GetCornerPosition(), WORKSHEET_DATAITEM_POLYPOLYGON::GetCornerPositionUi(), EDA_DRAW_FRAME::GetCrossHairPosition(), WORKSHEET_DATAITEM::GetEndPos(), WORKSHEET_DATAITEM::GetEndPosUi(), KIGFX::GAL::GetGridPoint(), KIGFX::GAL::GetMinDepth(), GAL_ARRAY_CREATOR::getRotationCentre(), WORKSHEET_DATAITEM::GetStartPos(), WORKSHEET_DATAITEM::GetStartPosUi(), EDA_TEXT::GetTextBox(), MATRIX3x3< T >::GetTranslation(), EDIT_POINT::GetX(), GraphicTextWidth(), POLY_GRID_PARTITION::grid2poly(), POLY_GRID_PARTITION::grid2polyX(), KIGFX::WX_VIEW_CONTROLS::handleAutoPanning(), ZONE_CONTAINER::Hatch(), highlightNet(), DIALOG_NEW_DATAITEM::initDlg(), KIGFX::OPENGL_COMPOSITOR::Initialize(), SEG::Intersect(), PNS::LINE::Is45Degree(), WORKSHEET_DATAITEM::IsInsidePage(), WORKSHEET_DATAITEM_POLYPOLYGON::IsInsidePage(), EDA_TEXT::LenSize(), LexicographicalCompare(), LexicographicalMax(), LexicographicalMin(), SEG::LineDistance(), SEG::LineProject(), KIGFX::STROKE_FONT::LoadNewStrokeFont(), PNS::LOGGER::Log(), DRAWING_TOOL::make45DegLine(), BOARD_ITEM::Move(), WORKSHEET_DATAITEM::MoveEndPointTo(), WORKSHEET_DATAITEM::MoveEndPointToUi(), EDIT_TOOL::MoveExact(), WORKSHEET_DATAITEM::MoveStartPointTo(), WORKSHEET_DATAITEM::MoveStartPointToUi(), WORKSHEET_DATAITEM::MoveToUi(), SEG::NearestPoint(), PNS::OctagonalHull(), DIALOG_NEW_DATAITEM::OnOKClick(), KIGFX::WX_VIEW_CONTROLS::onScroll(), KIGFX::WX_VIEW_CONTROLS::onTimer(), KIGFX::WX_VIEW_CONTROLS::onWheel(), VECTOR2< T >::operator!=(), PNS::JOINT::JOINT_TAG_HASH::operator()(), POLY_GRID_PARTITION::segHash::operator()(), operator*(), VECTOR2< T >::operator*(), VECTOR2< T >::operator+(), VECTOR2< T >::operator+=(), VECTOR2< T >::operator-(), VECTOR2< T >::operator-=(), VECTOR2< T >::operator=(), VECTOR2< T >::operator==(), SHAPE_RECT::Outline(), PCBNEW_CONTROL::PanControl(), SHAPE_POLY_SET::Parse(), PAGE_LAYOUT_READER_PARSER::parseBitmap(), PAGE_LAYOUT_READER_PARSER::parseCoordinate(), PAGE_LAYOUT_READER_PARSER::parseGraphic(), PAGE_LAYOUT_READER_PARSER::parsePolygon(), PAGE_LAYOUT_READER_PARSER::parsePolyOutline(), PAGE_LAYOUT_READER_PARSER::parseSetup(), PAGE_LAYOUT_READER_PARSER::parseText(), HPGL_PLOTTER::PenTo(), PS_PLOTTER::PenTo(), PDF_PLOTTER::PenTo(), SVG_PLOTTER::PenTo(), DXF_PLOTTER::PenTo(), DRAWING_TOOL::PlaceDXF(), PCB_EDITOR_CONTROL::PlaceModule(), PCB_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), PS_PLOTTER::PlotImage(), PDF_PLOTTER::PlotImage(), PlotLayerOutlines(), PS_PLOTTER::PlotPoly(), PDF_PLOTTER::PlotPoly(), SVG_PLOTTER::PlotPoly(), DXF_PLOTTER::PlotPoly(), SEG::PointCloserThan(), SHAPE_POLY_SET::pointInPolygon(), POLY_GRID_PARTITION::poly2grid(), POLY_GRID_PARTITION::poly2gridX(), Polygon_Calc_BBox_3DU(), polygon_Convert(), processEdge(), PNS::SHOVE::pushVia(), HPGL_PLOTTER::Rect(), PS_PLOTTER::Rect(), PDF_PLOTTER::Rect(), PNS::OPTIMIZER::rectBreakouts(), DIALOG_PAD_PROPERTIES::redraw(), PNS::MEANDER_SHAPE::reflect(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), PCBNEW_CONTROL::ResetCoords(), BOARD_ITEM::Rotate(), RotatePoint(), CLIPBOARD_IO::SaveSelection(), KIGFX::OPENGL_GAL::Scale(), KIGFX::CAIRO_GAL::Scale(), POLY_GRID_PARTITION::scanCell(), GERBVIEW_SELECTION_TOOL::selectionContains(), SELECTION_TOOL::selectionContains(), GERBVIEW_SELECTION_TOOL::selectMultiple(), SELECTION_TOOL::selectMultiple(), GERBVIEW_SELECTION_TOOL::selectPoint(), SELECTION_TOOL::selectPoint(), ZOOM_TOOL::selectRegion(), DRAWING_TOOL::SetAnchor(), WORKSHEET_DATAITEM_POLYPOLYGON::SetBoundingBox(), KIGFX::VIEW::SetCenter(), KIGFX::CAIRO_GAL::setCompositor(), WORKSHEET_DATAITEM_TEXT::SetConstrainedTextSize(), ZONE_CONTAINER::SetCornerPosition(), setDrillOrigin(), WORKSHEET_DATAITEM::SetEnd(), KIGFX::GAL::SetGridOrigin(), KIGFX::GAL::SetGridSize(), KIGFX::GAL::SetLayerDepth(), setOrigin(), MATRIX3x3< T >::SetScale(), WORKSHEET_DATAITEM::SetStart(), MATRIX3x3< T >::SetTranslation(), KIGFX::VIEW::SetViewport(), sortEndsByDescendingX(), PNS_KICAD_IFACE::syncPad(), BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines(), PS_PLOTTER::Text(), PDF_PLOTTER::Text(), DXF_PLOTTER::Text(), KIGFX::VIEW::ToScreen(), KIGFX::VIEW::ToWorld(), TransformRoundedEndsSegmentToPolygon(), ZONE_CONTAINER::TransformSolidAreasShapesToPolygonSet(), KIGFX::OPENGL_GAL::Translate(), KIGFX::CAIRO_GAL::Translate(), POINT_EDITOR::updateItem(), KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars(), PL_EDITOR_FRAME::UpdateStatusBar(), EDA_DRAW_FRAME::UseGalCanvas(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::Validate(), VECTOR2< unsigned int >::VECTOR2(), D_PAD::ViewBBox(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), KIGFX::WX_VIEW_CONTROLS::WarpCursor(), EDIT_POINT::WithinPoint(), COMMON_TOOLS::ZoomFitScreen(), GERBVIEW_SELECTION_TOOL::zoomFitSelection(), and SELECTION_TOOL::zoomFitSelection().

template<class T = int>
T VECTOR2< T >::y

Definition at line 83 of file vector2d.h.

Referenced by PNS_PCBNEW_DEBUG_DECORATOR::AddBox(), PNS_KICAD_IFACE::AddItem(), CINFO3D_VISU::AddSolidAreasShapesToContainer(), CLAYER_TRIANGLES::AddToMiddleContourns(), EDA_DRAW_FRAME::AdjustScrollBars(), GRID_HELPER::Align(), GRID_HELPER::AlignToSegment(), KIGFX::CAIRO_GAL::allocateBitmaps(), SHAPE_POLY_SET::Append(), EC_HORIZONTAL::Apply(), SEG::ApproxCollinear(), SEG::ApproxParallel(), HPGL_PLOTTER::Arc(), PS_PLOTTER::Arc(), PDF_PLOTTER::Arc(), SVG_PLOTTER::Arc(), GERBER_PLOTTER::Arc(), DXF_PLOTTER::Arc(), SHAPE_RECT::BBox(), KIGFX::OPENGL_GAL::BeginDrawing(), GRID_HELPER::BestSnapAnchor(), PCB_BASE_FRAME::BestZoom(), KIGFX::OPENGL_GAL::BitmapText(), KIGFX::OPENGL_GAL::blitCursor(), BuildConvexHull(), PNS::DP_GATEWAYS::BuildForCursor(), DIRECTION_45::BuildInitialTrace(), CINFO3D_VISU::buildPadShapeThickOutlineAsPolygon(), CINFO3D_VISU::buildPadShapeThickOutlineAsSegments(), WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(), SEG::CanonicalCoefs(), SEG::ccw(), SHAPE_CONVEX::CDPoint(), KIGFX::WX_VIEW_CONTROLS::CenterOnCursor(), POLY_GRID_PARTITION::checkClearance(), PNS::DP_GATEWAYS::checkDiagonalAlignment(), PS_PLOTTER::Circle(), PDF_PLOTTER::Circle(), SVG_PLOTTER::Circle(), DXF_PLOTTER::Circle(), KIGFX::CAIRO_GAL::ClearScreen(), Collide(), SHAPE_RECT::Collide(), SEG::Collinear(), PNS::commonParallelProjection(), GRID_HELPER::computeAnchors(), KIGFX::OPENGL_GAL::computeBitmapTextSize(), KIGFX::STROKE_FONT::computeBoundingBox(), KIGFX::STROKE_FONT::computeOverbarVerticalPosition(), KIGFX::STROKE_FONT::ComputeStringBoundaryLimits(), PSLIKE_PLOTTER::computeTextParameters(), DIRECTION_45::construct_(), POLY_GRID_PARTITION::containsPoint(), Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(), Convert_shape_line_polygon_to_triangles(), ConvertPolySetToPolyList(), SHAPE_POLY_SET::convertToClipper(), PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToGeneral(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), KIGFX::OPENGL_COMPOSITOR::CreateBuffer(), MICROWAVE_TOOL::createInductorBetween(), CreatePadsShapesSection(), VECTOR2< T >::Cross(), PCBNEW_CONTROL::CursorControl(), D_PAD::CustomShapeAsPolygonToBoardPosition(), DRC::doEdgeZoneDrc(), DRC::doFootprintOverlappingDrc(), PCB_TOOL::doInteractiveItemPlacement(), VECTOR2< T >::Dot(), KIGFX::STROKE_FONT::Draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::CAIRO_GAL::DrawArc(), KIGFX::OPENGL_GAL::DrawArc(), KIGFX::CAIRO_GAL::DrawArcSegment(), KIGFX::OPENGL_GAL::DrawArcSegment(), KIGFX::CAIRO_GAL::DrawCircle(), KIGFX::OPENGL_GAL::DrawCircle(), KIGFX::CAIRO_GAL::DrawCurve(), DRAWING_TOOL::DrawDimension(), ZONE_CONTAINER::DrawFilledArea(), KIGFX::OPENGL_GAL::drawFilledSemiCircle(), D_CODE::DrawFlashedPolygon(), GERBER_DRAW_ITEM::DrawGbrPoly(), KIGFX::OPENGL_GAL::DrawGrid(), KIGFX::GAL::DrawGrid(), KIGFX::CAIRO_GAL::drawGridLine(), KIGFX::CAIRO_GAL::DrawLine(), BASIC_GAL::DrawLine(), KIGFX::OPENGL_GAL::drawLineQuad(), KIGFX::CAIRO_GAL::drawPoly(), KIGFX::OPENGL_GAL::DrawPolygon(), BASIC_GAL::DrawPolyline(), KIGFX::CAIRO_GAL::DrawRectangle(), KIGFX::OPENGL_GAL::DrawRectangle(), KIGFX::CAIRO_GAL::DrawSegment(), DRAWING_TOOL::drawSegment(), KIGFX::STROKE_FONT::drawSingleLineText(), KIGFX::OPENGL_GAL::drawStrokedSemiCircle(), KIGFX::PREVIEW::DrawTextNextToCursor(), ZONE_CONTAINER::DrawWhileCreateOutline(), PNS::DP_PRIMITIVE_PAIR::dump(), PNS::LOGGER::dumpShape(), GERBER_PLOTTER::emitDcode(), KIGFX::CAIRO_GAL::EndDrawing(), MODULE_EDITOR_TOOLS::EnumeratePads(), export_vrml_board(), export_vrml_zones(), DSN::SPECCTRA_DB::fillBOUNDARY(), fillPolygonWithHorizontalSegments(), ZONE_CONTAINER::FillZoneAreasWithSegments(), CN_LIST::FindNearby(), HPGL_PLOTTER::FlashPadCircle(), HPGL_PLOTTER::FlashPadCustom(), PSLIKE_PLOTTER::FlashPadCustom(), GERBER_PLOTTER::FlashPadCustom(), DXF_PLOTTER::FlashPadCustom(), HPGL_PLOTTER::FlashPadRoundRect(), PSLIKE_PLOTTER::FlashPadRoundRect(), GERBER_PLOTTER::FlashPadRoundRect(), DXF_PLOTTER::FlashPadRoundRect(), BOARD_ITEM::Flip(), D_PAD::FlipPrimitives(), WORKSHEET_LAYOUT_IO::format(), WORKSHEET_LAYOUT_IO::formatCoordinate(), WORKSHEET_LAYOUT_IO::formatRepeatParameters(), FractureEdge::FractureEdge(), GERBER_DRAW_ITEM::GetABPosition(), getAnchorPoint(), D_PAD::GetBestAnchorPosition(), D_PAD::GetBoundingBox(), WORKSHEET_DATAITEM_POLYPOLYGON::GetCornerPosition(), WORKSHEET_DATAITEM_POLYPOLYGON::GetCornerPositionUi(), EDA_DRAW_FRAME::GetCrossHairPosition(), WORKSHEET_DATAITEM::GetEndPos(), WORKSHEET_DATAITEM::GetEndPosUi(), KIGFX::GAL::GetGridPoint(), KIGFX::STROKE_FONT::getInterline(), KIGFX::GAL::GetMaxDepth(), GAL_ARRAY_CREATOR::getRotationCentre(), WORKSHEET_DATAITEM::GetStartPos(), WORKSHEET_DATAITEM::GetStartPosUi(), MATRIX3x3< T >::GetTranslation(), EDIT_POINT::GetY(), POLY_GRID_PARTITION::grid2poly(), POLY_GRID_PARTITION::grid2polyY(), KIGFX::WX_VIEW_CONTROLS::handleAutoPanning(), ZONE_CONTAINER::Hatch(), highlightNet(), DIALOG_NEW_DATAITEM::initDlg(), KIGFX::OPENGL_COMPOSITOR::Initialize(), KIGFX::CAIRO_GAL::initSurface(), SEG::Intersect(), PNS::LINE::Is45Degree(), WORKSHEET_DATAITEM::IsInsidePage(), WORKSHEET_DATAITEM_POLYPOLYGON::IsInsidePage(), LexicographicalCompare(), LexicographicalMax(), LexicographicalMin(), SEG::LineDistance(), SEG::LineProject(), KIGFX::STROKE_FONT::LoadNewStrokeFont(), PNS::LOGGER::Log(), DRAWING_TOOL::make45DegLine(), FractureEdge::matches(), BOARD_ITEM::Move(), WORKSHEET_DATAITEM::MoveEndPointTo(), WORKSHEET_DATAITEM::MoveEndPointToUi(), EDIT_TOOL::MoveExact(), WORKSHEET_DATAITEM::MoveStartPointTo(), WORKSHEET_DATAITEM::MoveStartPointToUi(), WORKSHEET_DATAITEM::MoveToUi(), SEG::NearestPoint(), PNS::OctagonalHull(), DIALOG_NEW_DATAITEM::OnOKClick(), KIGFX::WX_VIEW_CONTROLS::onScroll(), KIGFX::WX_VIEW_CONTROLS::onTimer(), KIGFX::WX_VIEW_CONTROLS::onWheel(), VECTOR2< T >::operator!=(), PNS::JOINT::JOINT_TAG_HASH::operator()(), POLY_GRID_PARTITION::segHash::operator()(), VECTOR2< unsigned int >::operator()(), operator*(), VECTOR2< T >::operator*(), VECTOR2< T >::operator+(), VECTOR2< T >::operator+=(), VECTOR2< T >::operator-(), VECTOR2< T >::operator-=(), VECTOR2< T >::operator=(), VECTOR2< T >::operator==(), SHAPE_RECT::Outline(), PCBNEW_CONTROL::PanControl(), SHAPE_POLY_SET::Parse(), PAGE_LAYOUT_READER_PARSER::parseBitmap(), PAGE_LAYOUT_READER_PARSER::parseCoordinate(), PAGE_LAYOUT_READER_PARSER::parseGraphic(), PAGE_LAYOUT_READER_PARSER::parsePolygon(), PAGE_LAYOUT_READER_PARSER::parsePolyOutline(), PAGE_LAYOUT_READER_PARSER::parseSetup(), PAGE_LAYOUT_READER_PARSER::parseText(), HPGL_PLOTTER::PenTo(), PS_PLOTTER::PenTo(), PDF_PLOTTER::PenTo(), SVG_PLOTTER::PenTo(), DXF_PLOTTER::PenTo(), DRAWING_TOOL::PlaceDXF(), PCB_EDITOR_CONTROL::PlaceModule(), PCB_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), PS_PLOTTER::PlotImage(), PDF_PLOTTER::PlotImage(), PlotLayerOutlines(), PS_PLOTTER::PlotPoly(), PDF_PLOTTER::PlotPoly(), SVG_PLOTTER::PlotPoly(), DXF_PLOTTER::PlotPoly(), SEG::PointCloserThan(), SHAPE_POLY_SET::pointInPolygon(), POLY_GRID_PARTITION::poly2grid(), POLY_GRID_PARTITION::poly2gridY(), Polygon_Calc_BBox_3DU(), polygon_Convert(), processEdge(), PNS::SHOVE::pushVia(), HPGL_PLOTTER::Rect(), PS_PLOTTER::Rect(), PDF_PLOTTER::Rect(), PNS::OPTIMIZER::rectBreakouts(), DIALOG_PAD_PROPERTIES::redraw(), PNS::MEANDER_SHAPE::reflect(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), PCBNEW_CONTROL::ResetCoords(), KIGFX::CAIRO_GAL::RestoreScreen(), BOARD_ITEM::Rotate(), RotatePoint(), KIGFX::CAIRO_GAL::SaveScreen(), CLIPBOARD_IO::SaveSelection(), KIGFX::OPENGL_GAL::Scale(), KIGFX::CAIRO_GAL::Scale(), POLY_GRID_PARTITION::scanCell(), GERBVIEW_SELECTION_TOOL::selectionContains(), SELECTION_TOOL::selectionContains(), GERBVIEW_SELECTION_TOOL::selectMultiple(), SELECTION_TOOL::selectMultiple(), GERBVIEW_SELECTION_TOOL::selectPoint(), SELECTION_TOOL::selectPoint(), ZOOM_TOOL::selectRegion(), DRAWING_TOOL::SetAnchor(), WORKSHEET_DATAITEM_POLYPOLYGON::SetBoundingBox(), KIGFX::VIEW::SetCenter(), KIGFX::CAIRO_GAL::setCompositor(), WORKSHEET_DATAITEM_TEXT::SetConstrainedTextSize(), ZONE_CONTAINER::SetCornerPosition(), setDrillOrigin(), WORKSHEET_DATAITEM::SetEnd(), KIGFX::GAL::SetGridOrigin(), KIGFX::GAL::SetGridSize(), KIGFX::GAL::SetLayerDepth(), setOrigin(), MATRIX3x3< T >::SetScale(), WORKSHEET_DATAITEM::SetStart(), MATRIX3x3< T >::SetTranslation(), KIGFX::VIEW::SetViewport(), PNS_KICAD_IFACE::syncPad(), BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines(), PS_PLOTTER::Text(), PDF_PLOTTER::Text(), DXF_PLOTTER::Text(), KIGFX::VIEW::ToScreen(), KIGFX::VIEW::ToWorld(), TransformRoundedEndsSegmentToPolygon(), ZONE_CONTAINER::TransformSolidAreasShapesToPolygonSet(), KIGFX::OPENGL_GAL::Translate(), KIGFX::CAIRO_GAL::Translate(), POINT_EDITOR::updateItem(), KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars(), PL_EDITOR_FRAME::UpdateStatusBar(), EDA_DRAW_FRAME::UseGalCanvas(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::Validate(), VECTOR2< unsigned int >::VECTOR2(), D_PAD::ViewBBox(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::WX_VIEW_CONTROLS::WarpCursor(), EDIT_POINT::WithinPoint(), COMMON_TOOLS::ZoomFitScreen(), GERBVIEW_SELECTION_TOOL::zoomFitSelection(), and SELECTION_TOOL::zoomFitSelection().


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