KiCad PCB EDA Suite
|
Represents a point in x,y coordinates. More...
#include <cadstar_archive_parser.h>
Public Types | |
typedef VECTOR2_TRAITS< int32_t >::extended_type | extended_type |
typedef int32_t | coord_type |
Public Member Functions | |
POINT () | |
POINT (int aX, int aY) | |
void | Parse (XNODE *aNode, PARSER_CONTEXT *aContext) override |
VECTOR2< U > | operator() () const |
Cast a vector to another specialized subclass. Beware of rounding issues. | |
int32_t | 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< int32_t > | Perpendicular () const |
Compute the perpendicular vector. | |
VECTOR2< int32_t > | Resize (int32_t 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< int32_t > &aVector) const |
Compute cross product of self with aVector. | |
extended_type | Dot (const VECTOR2< int32_t > &aVector) const |
Compute dot product of self with aVector. | |
double | Distance (const VECTOR2< extended_type > &aVector) const |
Compute the distance between two vectors. | |
VECTOR2< int32_t > & | operator+= (const VECTOR2< int32_t > &aVector) |
Compound assignment operator. | |
VECTOR2< int32_t > & | operator+= (const int32_t &aScalar) |
Compound assignment operator. | |
VECTOR2< int32_t > & | operator*= (const VECTOR2< int32_t > &aVector) |
Compound assignment operator. | |
VECTOR2< int32_t > & | operator*= (const int32_t &aScalar) |
VECTOR2< int32_t > & | operator-= (const VECTOR2< int32_t > &aVector) |
Compound assignment operator. | |
VECTOR2< int32_t > & | operator-= (const int32_t &aScalar) |
Compound assignment operator. | |
VECTOR2< int32_t > | operator- () |
Negate Vector operator. | |
VECTOR2< int32_t > | operator/ (double aFactor) const |
Division with a factor. | |
bool | operator== (const VECTOR2< int32_t > &aVector) const |
Equality operator. | |
bool | operator!= (const VECTOR2< int32_t > &aVector) const |
Not equality operator. | |
bool | operator< (const VECTOR2< int32_t > &aVector) const |
Smaller than operator. | |
bool | operator<= (const VECTOR2< int32_t > &aVector) const |
bool | operator> (const VECTOR2< int32_t > &aVector) const |
Greater than operator. | |
bool | operator>= (const VECTOR2< int32_t > &aVector) const |
Public Attributes | |
int32_t | x |
int32_t | y |
Static Public Attributes | |
static constexpr extended_type | ECOORD_MAX |
static constexpr extended_type | ECOORD_MIN |
Represents a point in x,y coordinates.
Definition at line 405 of file cadstar_archive_parser.h.
|
inherited |
Definition at line 73 of file vector2d.h.
|
inherited |
Definition at line 72 of file vector2d.h.
|
inline |
Definition at line 407 of file cadstar_archive_parser.h.
|
inline |
Definition at line 408 of file cadstar_archive_parser.h.
|
inherited |
Compute cross product of self with aVector.
Definition at line 201 of file vector2d.h.
|
inherited |
Compute the distance between two vectors.
This is a double precision value because the distance is frequently non-integer.
Definition at line 212 of file vector2d.h.
|
inherited |
Compute dot product of self with aVector.
Definition at line 206 of file vector2d.h.
|
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.
Definition at line 164 of file vector2d.h.
|
inherited |
Return the vector formatted as a string.
Definition at line 196 of file vector2d.h.
|
inherited |
Not equality operator.
Definition at line 247 of file vector2d.h.
Cast a vector to another specialized subclass. Beware of rounding issues.
Definition at line 127 of file vector2d.h.
Definition at line 226 of file vector2d.h.
Compound assignment operator.
Definition at line 224 of file vector2d.h.
Compound assignment operator.
Definition at line 229 of file vector2d.h.
Compound assignment operator.
Definition at line 221 of file vector2d.h.
Negate Vector operator.
Definition at line 238 of file vector2d.h.
Compound assignment operator.
Definition at line 235 of file vector2d.h.
Compound assignment operator.
Definition at line 232 of file vector2d.h.
Division with a factor.
Definition at line 241 of file vector2d.h.
Smaller than operator.
Definition at line 250 of file vector2d.h.
Definition at line 251 of file vector2d.h.
Equality operator.
Definition at line 244 of file vector2d.h.
Greater than operator.
Definition at line 254 of file vector2d.h.
Definition at line 255 of file vector2d.h.
|
overridevirtual |
Implements CADSTAR_ARCHIVE_PARSER::PARSER.
Definition at line 405 of file cadstar_archive_parser.cpp.
References CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong().
Referenced by CADSTAR_ARCHIVE_PARSER::ParseAllChildPoints().
Compute the perpendicular vector.
Definition at line 181 of file vector2d.h.
Return a vector of the same direction, but length specified in aNewLength.
aNewLength | is the length of the rescaled vector. |
Definition at line 189 of file vector2d.h.
|
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.
Definition at line 173 of file vector2d.h.
|
staticconstexprinherited |
Definition at line 75 of file vector2d.h.
|
staticconstexprinherited |
Definition at line 76 of file vector2d.h.
|
inherited |
Definition at line 78 of file vector2d.h.
|
inherited |
Definition at line 78 of file vector2d.h.