KiCad PCB EDA Suite
VECTOR2< T > Class Template Reference

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

#include <vector2d.h>

Inheritance diagram for VECTOR2< T >:
VECTOR2_TRAITS< T >

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
 

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 65 of file vector2d.h.

Member Typedef Documentation

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

Definition at line 82 of file vector2d.h.

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

Definition at line 81 of file vector2d.h.

Constructor & Destructor Documentation

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

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

Definition at line 263 of file vector2d.h.

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

Construct a vector with given components x, y.

Definition at line 287 of file vector2d.h.

288 {
289  x = aX;
290  y = aY;
291 }
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 105 of file vector2d.h.

106  {
107  x = (T) aVec.x;
108  y = (T) aVec.y;
109  }
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 309 of file vector2d.h.

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

310 {
311  return atan2( (double) y, (double) x );
312 }
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 480 of file vector2d.h.

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

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

481 {
482  return (extended_type) x * (extended_type) aVector.y -
483  (extended_type) y * (extended_type) aVector.x;
484 }
VECTOR2_TRAITS< T >::extended_type extended_type
Definition: vector2d.h:81
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 488 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().

489 {
490  return (extended_type) x * (extended_type) aVector.x +
491  (extended_type) y * (extended_type) aVector.y;
492 }
VECTOR2_TRAITS< T >::extended_type extended_type
Definition: vector2d.h:81
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 403 of file vector2d.h.

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

404 {
405  std::stringstream ss;
406 
407  ss << "( xy " << x << " " << y << " )";
408 
409  return ss.str();
410 }
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 124 of file vector2d.h.

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

Not equality operator.

Definition at line 531 of file vector2d.h.

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

532 {
533  return ( aVector.x != x ) || ( aVector.y != y );
534 }
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 114 of file vector2d.h.

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

Scalar product operator.

Definition at line 449 of file vector2d.h.

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

450 {
451  return aVector.x * x + aVector.y * y;
452 }
template<class T>
VECTOR2< T > VECTOR2< T >::operator* ( const T &  aFactor) const

Multiplication with a factor.

Definition at line 456 of file vector2d.h.

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

Vector addition operator.

Definition at line 414 of file vector2d.h.

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

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

Scalar addition operator.

Definition at line 421 of file vector2d.h.

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

Compound assignment operator.

Definition at line 333 of file vector2d.h.

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

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

Compound assignment operator.

Definition at line 342 of file vector2d.h.

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

Vector subtraction operator.

Definition at line 428 of file vector2d.h.

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

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

Scalar subtraction operator.

Definition at line 435 of file vector2d.h.

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

Negate Vector operator.

Definition at line 442 of file vector2d.h.

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

Compound assignment operator.

Definition at line 351 of file vector2d.h.

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

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

Compound assignment operator.

Definition at line 360 of file vector2d.h.

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

Division with a factor.

Definition at line 464 of file vector2d.h.

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

Smaller than operator.

Definition at line 496 of file vector2d.h.

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

Definition at line 503 of file vector2d.h.

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

Assignment operator.

Definition at line 324 of file vector2d.h.

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

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

Equality operator.

Definition at line 524 of file vector2d.h.

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

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

Greater than operator.

Definition at line 510 of file vector2d.h.

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

Definition at line 517 of file vector2d.h.

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

Function Perpendicular computes the perpendicular vector.

Returns
Perpendicular vector

Definition at line 316 of file vector2d.h.

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

317 {
318  VECTOR2<T> perpendicular( -y, x );
319  return perpendicular;
320 }
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:65
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 388 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().

389 {
390  if( x == 0 && y == 0 )
391  return VECTOR2<T> ( 0, 0 );
392 
393  extended_type l_sq_current = (extended_type) x * x + (extended_type) y * y;
394  extended_type l_sq_new = (extended_type) aNewLength * aNewLength;
395 
396  return VECTOR2<T> (
397  ( x < 0 ? -1 : 1 ) * sqrt( rescale( l_sq_new, (extended_type) x * x, l_sq_current ) ),
398  ( y < 0 ? -1 : 1 ) * sqrt( rescale( l_sq_new, (extended_type) y * y, l_sq_current ) ) ) * sign( aNewLength );
399 }
VECTOR2_TRAITS< T >::extended_type extended_type
Definition: vector2d.h:81
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:65
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 373 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().

374 {
375  // Avoid 0 radian rotation, case very frequently found
376  if( aAngle == 0.0 )
377  return VECTOR2<T> ( T( x ), T( y ) );
378 
379  double sa = sin( aAngle );
380  double ca = cos( aAngle );
381 
382  return VECTOR2<T> ( T( (double) x * ca - (double) y * sa ),
383  T( (double) x * sa + (double) y * ca ) );
384 }
T
enum T contains all this lexer's tokens.
Class VECTOR2 defines a general 2D-vector/point.
Definition: vector2d.h:65
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 302 of file vector2d.h.

Referenced by Collide().

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

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>
T VECTOR2< T >::x

Definition at line 84 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(), 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_(), Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(), Convert_shape_line_polygon_to_triangles(), ConvertPolySetToPolyList(), SHAPE_POLY_SET::convertToClipper(), MODULE_EDITOR_TOOLS::CopyItems(), PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToGeneral(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), KIGFX::OPENGL_COMPOSITOR::CreateBuffer(), MICROWAVE_TOOL::createInductorBetween(), VECTOR2< T >::Cross(), PCBNEW_CONTROL::CursorControl(), 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(), 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(), 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(), WORKSHEET_LAYOUT_IO::format(), FractureEdge::FractureEdge(), SHAPE_POLY_SET::fractureSingle(), WORKSHEET_DATAITEM_POLYPOLYGON::GetCornerPosition(), WORKSHEET_DATAITEM_POLYPOLYGON::GetCornerPositionUi(), EDA_DRAW_FRAME::GetCrossHairPosition(), WORKSHEET_DATAITEM::GetEndPos(), WORKSHEET_DATAITEM::GetEndPosUi(), KIGFX::GAL::GetGridPoint(), KIGFX::GAL::GetMinDepth(), EDIT_TOOL::getModificationPoint(), GAL_ARRAY_CREATOR::getRotationCentre(), WORKSHEET_DATAITEM::GetStartPos(), WORKSHEET_DATAITEM::GetStartPosUi(), EDA_TEXT::GetTextBox(), MATRIX3x3< T >::GetTranslation(), EDIT_POINT::GetX(), GraphicTextWidth(), KIGFX::WX_VIEW_CONTROLS::handleAutoPanning(), PNS::hash_value(), ZONE_CONTAINER::Hatch(), highlightNet(), ZONE_CONTAINER::HitTest(), 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(), EDIT_TOOL::Main(), DRAWING_TOOL::make45DegLine(), 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!=(), 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::parsePolyOutline(), PAGE_LAYOUT_READER_PARSER::parseSetup(), MODULE_EDITOR_TOOLS::PasteItems(), HPGL_PLOTTER::PenTo(), PS_PLOTTER::PenTo(), PDF_PLOTTER::PenTo(), SVG_PLOTTER::PenTo(), DXF_PLOTTER::PenTo(), DRAWING_TOOL::PlaceDXF(), PCB_EDITOR_CONTROL::PlaceModule(), MODULE_EDITOR_TOOLS::PlacePad(), 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(), 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(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), PCBNEW_CONTROL::ResetCoords(), RN_POLY::RN_POLY(), KIGFX::OPENGL_GAL::Scale(), KIGFX::CAIRO_GAL::Scale(), SELECTION_TOOL::selectionContains(), 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(), VECTOR2< unsigned int >::VECTOR2(), D_PAD::ViewBBox(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::WX_VIEW_CONTROLS::WarpCursor(), EDIT_POINT::WithinPoint(), COMMON_TOOLS::ZoomFitScreen(), and SELECTION_TOOL::zoomFitSelection().

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

Definition at line 84 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(), 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_(), Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(), Convert_shape_line_polygon_to_triangles(), ConvertPolySetToPolyList(), SHAPE_POLY_SET::convertToClipper(), MODULE_EDITOR_TOOLS::CopyItems(), PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), PROPERTIES_FRAME::CopyPrmsFromPanelToGeneral(), PROPERTIES_FRAME::CopyPrmsFromPanelToItem(), KIGFX::OPENGL_COMPOSITOR::CreateBuffer(), MICROWAVE_TOOL::createInductorBetween(), VECTOR2< T >::Cross(), PCBNEW_CONTROL::CursorControl(), 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(), 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(), 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(), WORKSHEET_LAYOUT_IO::format(), FractureEdge::FractureEdge(), 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(), EDIT_TOOL::getModificationPoint(), GAL_ARRAY_CREATOR::getRotationCentre(), WORKSHEET_DATAITEM::GetStartPos(), WORKSHEET_DATAITEM::GetStartPosUi(), MATRIX3x3< T >::GetTranslation(), EDIT_POINT::GetY(), KIGFX::WX_VIEW_CONTROLS::handleAutoPanning(), PNS::hash_value(), 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(), EDIT_TOOL::Main(), DRAWING_TOOL::make45DegLine(), FractureEdge::matches(), 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!=(), 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::parsePolyOutline(), PAGE_LAYOUT_READER_PARSER::parseSetup(), MODULE_EDITOR_TOOLS::PasteItems(), HPGL_PLOTTER::PenTo(), PS_PLOTTER::PenTo(), PDF_PLOTTER::PenTo(), SVG_PLOTTER::PenTo(), DXF_PLOTTER::PenTo(), DRAWING_TOOL::PlaceDXF(), PCB_EDITOR_CONTROL::PlaceModule(), MODULE_EDITOR_TOOLS::PlacePad(), 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(), 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(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), PCBNEW_CONTROL::ResetCoords(), KIGFX::CAIRO_GAL::RestoreScreen(), RN_POLY::RN_POLY(), KIGFX::CAIRO_GAL::SaveScreen(), KIGFX::OPENGL_GAL::Scale(), KIGFX::CAIRO_GAL::Scale(), SELECTION_TOOL::selectionContains(), 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(), VECTOR2< unsigned int >::VECTOR2(), D_PAD::ViewBBox(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::WX_VIEW_CONTROLS::WarpCursor(), EDIT_POINT::WithinPoint(), COMMON_TOOLS::ZoomFitScreen(), and SELECTION_TOOL::zoomFitSelection().


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