LibrePCB Developers Documentation
Vertex Class Referencefinal

The Vertex class. More...

#include <vertex.h>

+ Collaboration diagram for Vertex:

Public Member Functions

 Vertex () noexcept
 
 Vertex (const Vertex &other) noexcept
 
 Vertex (const Point &pos, const Angle &angle=Angle::deg0()) noexcept
 
 Vertex (const SExpression &node)
 
 ~Vertex () noexcept
 
const PointgetPos () const noexcept
 
const AnglegetAngle () const noexcept
 
void setPos (const Point &pos) noexcept
 
void setAngle (const Angle &angle) noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node. More...
 
Vertexoperator= (const Vertex &rhs) noexcept
 
bool operator== (const Vertex &rhs) const noexcept
 
bool operator!= (const Vertex &rhs) const noexcept
 
bool operator< (const Vertex &rhs) const noexcept
 The "<" operator to compare two librepcb::Vertex objects. More...
 

Private Attributes

Point mPos
 
Angle mAngle
 

Detailed Description

The Vertex class.

Constructor & Destructor Documentation

◆ Vertex() [1/4]

Vertex ( )
inlinenoexcept

◆ Vertex() [2/4]

Vertex ( const Vertex other)
inlinenoexcept

◆ Vertex() [3/4]

Vertex ( const Point pos,
const Angle angle = Angle::deg0() 
)
inlineexplicitnoexcept

◆ Vertex() [4/4]

Vertex ( const SExpression node)
explicit

◆ ~Vertex()

~Vertex ( )
inlinenoexcept

Member Function Documentation

◆ getPos()

const Point & getPos ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getAngle()

const Angle & getAngle ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ setPos()

void setPos ( const Point pos)
inlinenoexcept
+ Here is the caller graph for this function:

◆ setAngle()

void setAngle ( const Angle angle)
inlinenoexcept
+ Here is the caller graph for this function:

◆ serialize()

void serialize ( SExpression root) const

Serialize into librepcb::SExpression node.

Parameters
rootRoot node to serialize into.
+ Here is the call graph for this function:

◆ operator=()

Vertex & operator= ( const Vertex rhs)
noexcept

◆ operator==()

bool operator== ( const Vertex rhs) const
noexcept

◆ operator!=()

bool operator!= ( const Vertex rhs) const
inlinenoexcept

◆ operator<()

bool operator< ( const Vertex rhs) const
noexcept

The "<" operator to compare two librepcb::Vertex objects.

Useful for sorting vertex lists/sets (e.g. to for canonical order in files), or to store them in a QMap.

Parameters
rhsThe right hand side object.
Returns
true if this vertex is smaller, else false

Member Data Documentation

◆ mPos

Point mPos
private

◆ mAngle

Angle mAngle
private

angle of the line between this vertex and the following vertex


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