KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CADSTAR_ARCHIVE_PARSER::POINT Struct Reference

Represents a point in x,y coordinates. More...

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::POINT:
VECTOR2< int > CADSTAR_ARCHIVE_PARSER::PARSER

Public Types

typedef VECTOR2_TRAITS< int >::extended_type extended_type
 
typedef int coord_type
 

Public Member Functions

 POINT ()
 
 POINT (int aX, int aY)
 
void Parse (XNODE *aNode, PARSER_CONTEXT *aContext) override
 
VECTOR2< CastedType > operator() () const
 Cast a vector to another specialized subclass. Beware of rounding issues.
 
int EuclideanNorm () const
 Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
 
extended_type SquaredEuclideanNorm () const
 Compute the squared euclidean norm of the vector, which is defined as (x ** 2 + y ** 2).
 
VECTOR2< int > Perpendicular () const
 Compute the perpendicular vector.
 
VECTOR2< int > Resize (int aNewLength) const
 Return a vector of the same direction, but length specified in aNewLength.
 
const std::string Format () const
 Return the vector formatted as a string.
 
extended_type Cross (const VECTOR2< int > &aVector) const
 Compute cross product of self with aVector.
 
extended_type Dot (const VECTOR2< int > &aVector) const
 Compute dot product of self with aVector.
 
VECTOR2< int > operator+ (const VECTOR2< int > &aVector) const
 Vector addition operator.
 
VECTOR2< int > operator+ (const int &aScalar) const
 Scalar addition operator.
 
VECTOR2< int > & operator+= (const VECTOR2< int > &aVector)
 Compound assignment operator.
 
VECTOR2< int > & operator+= (const int &aScalar)
 Compound assignment operator.
 
VECTOR2< int > & operator*= (const VECTOR2< int > &aVector)
 Compound assignment operator.
 
VECTOR2< int > & operator*= (const int &aScalar)
 
VECTOR2< int > operator- (const VECTOR2< int > &aVector) const
 Vector subtraction operator.
 
VECTOR2< int > operator- (const int &aScalar) const
 Scalar subtraction operator.
 
VECTOR2< int > operator- ()
 Negate Vector operator.
 
VECTOR2< int > & operator-= (const VECTOR2< int > &aVector)
 Compound assignment operator.
 
VECTOR2< int > & operator-= (const int &aScalar)
 Compound assignment operator.
 
extended_type operator* (const VECTOR2< int > &aVector) const
 Scalar product operator.
 
VECTOR2< int > operator* (const int &aFactor) const
 Multiplication with a factor.
 
VECTOR2< int > operator/ (double aFactor) const
 Division with a factor.
 
bool operator== (const VECTOR2< int > &aVector) const
 Equality operator.
 
bool operator!= (const VECTOR2< int > &aVector) const
 Not equality operator.
 
bool operator< (const VECTOR2< int > &aVector) const
 Smaller than operator.
 
bool operator<= (const VECTOR2< int > &aVector) const
 
bool operator> (const VECTOR2< int > &aVector) const
 Greater than operator.
 
bool operator>= (const VECTOR2< int > &aVector) const
 

Public Attributes

int x
 
int y
 

Static Public Attributes

static constexpr extended_type ECOORD_MAX
 
static constexpr extended_type ECOORD_MIN
 

Detailed Description

Represents a point in x,y coordinates.

Definition at line 405 of file cadstar_archive_parser.h.

Member Typedef Documentation

◆ coord_type

typedef int VECTOR2< int >::coord_type
inherited

Definition at line 73 of file vector2d.h.

◆ extended_type

typedef VECTOR2_TRAITS<int >::extended_type VECTOR2< int >::extended_type
inherited

Definition at line 72 of file vector2d.h.

Constructor & Destructor Documentation

◆ POINT() [1/2]

CADSTAR_ARCHIVE_PARSER::POINT::POINT ( )
inline

Definition at line 407 of file cadstar_archive_parser.h.

◆ POINT() [2/2]

CADSTAR_ARCHIVE_PARSER::POINT::POINT ( int  aX,
int  aY 
)
inline

Definition at line 408 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Cross()

VECTOR2< int >::extended_type VECTOR2< int >::Cross ( const VECTOR2< int > &  aVector) const
inherited

Compute cross product of self with aVector.

Definition at line 176 of file vector2d.h.

◆ Dot()

VECTOR2< int >::extended_type VECTOR2< int >::Dot ( const VECTOR2< int > &  aVector) const
inherited

Compute dot product of self with aVector.

Definition at line 181 of file vector2d.h.

◆ EuclideanNorm()

int VECTOR2< int >::EuclideanNorm
inherited

Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).

It is used to calculate the length of the vector.

Returns
Scalar, the euclidean norm

Definition at line 139 of file vector2d.h.

◆ Format()

const std::string VECTOR2< int >::Format
inherited

Return the vector formatted as a string.

Returns
the formatted string

Definition at line 171 of file vector2d.h.

◆ operator!=()

bool VECTOR2< int >::operator!= ( const VECTOR2< int > &  aVector) const
inherited

Not equality operator.

Definition at line 234 of file vector2d.h.

◆ operator()()

VECTOR2< CastedType > VECTOR2< int >::operator() ( ) const
inlineinherited

Cast a vector to another specialized subclass. Beware of rounding issues.

Definition at line 114 of file vector2d.h.

◆ operator*() [1/2]

VECTOR2< int > VECTOR2< int >::operator* ( const int &  aFactor) const
inherited

Multiplication with a factor.

Definition at line 225 of file vector2d.h.

◆ operator*() [2/2]

VECTOR2< int >::extended_type VECTOR2< int >::operator* ( const VECTOR2< int > &  aVector) const
inherited

Scalar product operator.

Definition at line 222 of file vector2d.h.

◆ operator*=() [1/2]

VECTOR2< int > & VECTOR2< int >::operator*= ( const int &  aScalar)
inherited

Definition at line 201 of file vector2d.h.

◆ operator*=() [2/2]

VECTOR2< int > & VECTOR2< int >::operator*= ( const VECTOR2< int > &  aVector)
inherited

Compound assignment operator.

Definition at line 199 of file vector2d.h.

◆ operator+() [1/2]

VECTOR2< int > VECTOR2< int >::operator+ ( const int &  aScalar) const
inherited

Scalar addition operator.

Definition at line 193 of file vector2d.h.

◆ operator+() [2/2]

VECTOR2< int > VECTOR2< int >::operator+ ( const VECTOR2< int > &  aVector) const
inherited

Vector addition operator.

Definition at line 190 of file vector2d.h.

◆ operator+=() [1/2]

VECTOR2< int > & VECTOR2< int >::operator+= ( const int &  aScalar)
inherited

Compound assignment operator.

Definition at line 204 of file vector2d.h.

◆ operator+=() [2/2]

VECTOR2< int > & VECTOR2< int >::operator+= ( const VECTOR2< int > &  aVector)
inherited

Compound assignment operator.

Definition at line 196 of file vector2d.h.

◆ operator-() [1/3]

VECTOR2< int > VECTOR2< int >::operator-
inherited

Negate Vector operator.

Definition at line 219 of file vector2d.h.

◆ operator-() [2/3]

VECTOR2< int > VECTOR2< int >::operator- ( const int &  aScalar) const
inherited

Scalar subtraction operator.

Definition at line 210 of file vector2d.h.

◆ operator-() [3/3]

VECTOR2< int > VECTOR2< int >::operator- ( const VECTOR2< int > &  aVector) const
inherited

Vector subtraction operator.

Definition at line 207 of file vector2d.h.

◆ operator-=() [1/2]

VECTOR2< int > & VECTOR2< int >::operator-= ( const int &  aScalar)
inherited

Compound assignment operator.

Definition at line 216 of file vector2d.h.

◆ operator-=() [2/2]

VECTOR2< int > & VECTOR2< int >::operator-= ( const VECTOR2< int > &  aVector)
inherited

Compound assignment operator.

Definition at line 213 of file vector2d.h.

◆ operator/()

VECTOR2< int > VECTOR2< int >::operator/ ( double  aFactor) const
inherited

Division with a factor.

Definition at line 228 of file vector2d.h.

◆ operator<()

bool VECTOR2< int >::operator< ( const VECTOR2< int > &  aVector) const
inherited

Smaller than operator.

Definition at line 237 of file vector2d.h.

◆ operator<=()

bool VECTOR2< int >::operator<= ( const VECTOR2< int > &  aVector) const
inherited

Definition at line 238 of file vector2d.h.

◆ operator==()

bool VECTOR2< int >::operator== ( const VECTOR2< int > &  aVector) const
inherited

Equality operator.

Definition at line 231 of file vector2d.h.

◆ operator>()

bool VECTOR2< int >::operator> ( const VECTOR2< int > &  aVector) const
inherited

Greater than operator.

Definition at line 241 of file vector2d.h.

◆ operator>=()

bool VECTOR2< int >::operator>= ( const VECTOR2< int > &  aVector) const
inherited

Definition at line 242 of file vector2d.h.

◆ Parse()

void CADSTAR_ARCHIVE_PARSER::POINT::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

◆ Perpendicular()

VECTOR2< int > VECTOR2< int >::Perpendicular
inherited

Compute the perpendicular vector.

Returns
Perpendicular vector

Definition at line 156 of file vector2d.h.

◆ Resize()

VECTOR2< int > VECTOR2< int >::Resize ( int  aNewLength) const
inherited

Return a vector of the same direction, but length specified in aNewLength.

Parameters
aNewLengthis the length of the rescaled vector.
Returns
the rescaled vector.

Definition at line 164 of file vector2d.h.

◆ SquaredEuclideanNorm()

VECTOR2< int >::extended_type VECTOR2< int >::SquaredEuclideanNorm
inherited

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

Member Data Documentation

◆ ECOORD_MAX

constexpr extended_type VECTOR2< int >::ECOORD_MAX
staticconstexprinherited

Definition at line 75 of file vector2d.h.

◆ ECOORD_MIN

constexpr extended_type VECTOR2< int >::ECOORD_MIN
staticconstexprinherited

Definition at line 76 of file vector2d.h.

◆ x

int VECTOR2< int >::x
inherited

Definition at line 78 of file vector2d.h.

◆ y

int VECTOR2< int >::y
inherited

Definition at line 78 of file vector2d.h.


The documentation for this struct was generated from the following files: