KiCad PCB EDA Suite
Loading...
Searching...
No Matches
TRANSFORM_TRS Class Reference

#include <transform_trs.h>

Public Member Functions

 TRANSFORM_TRS ()
 
 TRANSFORM_TRS (const VECTOR2I &aTranslate, const EDA_ANGLE &aRotate, double aScaleX, double aScaleY)
 
VECTOR2I Apply (const VECTOR2I &aPoint) const
 
VECTOR2D Apply (const VECTOR2D &aPoint) const
 
VECTOR2I InverseApply (const VECTOR2I &aPoint) const
 
VECTOR2D InverseApply (const VECTOR2D &aPoint) const
 
TRANSFORM_TRS Invert () const
 
TRANSFORM_TRS Compose (const TRANSFORM_TRS &aOuter) const
 
TRANSFORM_TRS RescaleAround (const VECTOR2I &aFixedPoint, double aSx, double aSy) const
 
bool IsIdentity () const
 
bool IsUniformScale () const
 
double ApplyLinearScale (double aLength) const
 
const VECTOR2IGetTranslate () const
 
const EDA_ANGLEGetRotate () const
 
double GetScaleX () const
 
double GetScaleY () const
 
void SetTranslate (const VECTOR2I &aT)
 
void SetRotate (const EDA_ANGLE &aR)
 
void SetScale (double aSx, double aSy)
 
bool operator== (const TRANSFORM_TRS &aOther) const
 
bool operator!= (const TRANSFORM_TRS &aOther) const
 

Private Attributes

VECTOR2I m_translate
 
EDA_ANGLE m_rotate
 
double m_scaleX
 
double m_scaleY
 

Detailed Description

Definition at line 30 of file transform_trs.h.

Constructor & Destructor Documentation

◆ TRANSFORM_TRS() [1/2]

TRANSFORM_TRS::TRANSFORM_TRS ( )
inline

Definition at line 33 of file transform_trs.h.

References ANGLE_0, m_rotate, m_scaleX, m_scaleY, and m_translate.

Referenced by Compose(), Invert(), operator!=(), operator==(), and RescaleAround().

◆ TRANSFORM_TRS() [2/2]

TRANSFORM_TRS::TRANSFORM_TRS ( const VECTOR2I & aTranslate,
const EDA_ANGLE & aRotate,
double aScaleX,
double aScaleY )
inline

Definition at line 40 of file transform_trs.h.

References m_rotate, m_scaleX, m_scaleY, and m_translate.

Member Function Documentation

◆ Apply() [1/2]

VECTOR2D TRANSFORM_TRS::Apply ( const VECTOR2D & aPoint) const

◆ Apply() [2/2]

◆ ApplyLinearScale()

double TRANSFORM_TRS::ApplyLinearScale ( double aLength) const

Definition at line 119 of file transform_trs.cpp.

References m_scaleX, and m_scaleY.

Referenced by BOOST_AUTO_TEST_CASE().

◆ Compose()

TRANSFORM_TRS TRANSFORM_TRS::Compose ( const TRANSFORM_TRS & aOuter) const

◆ GetRotate()

const EDA_ANGLE & TRANSFORM_TRS::GetRotate ( ) const
inline

Definition at line 66 of file transform_trs.h.

References m_rotate.

Referenced by PCB_SHAPE::rebakeFromTransform(), and PCB_SHAPE::syncLibCoords().

◆ GetScaleX()

◆ GetScaleY()

◆ GetTranslate()

const VECTOR2I & TRANSFORM_TRS::GetTranslate ( ) const
inline

◆ InverseApply() [1/2]

VECTOR2D TRANSFORM_TRS::InverseApply ( const VECTOR2D & aPoint) const

◆ InverseApply() [2/2]

◆ Invert()

TRANSFORM_TRS TRANSFORM_TRS::Invert ( ) const

◆ IsIdentity()

bool TRANSFORM_TRS::IsIdentity ( ) const

◆ IsUniformScale()

bool TRANSFORM_TRS::IsUniformScale ( ) const

◆ operator!=()

bool TRANSFORM_TRS::operator!= ( const TRANSFORM_TRS & aOther) const
inline

Definition at line 75 of file transform_trs.h.

References TRANSFORM_TRS().

◆ operator==()

bool TRANSFORM_TRS::operator== ( const TRANSFORM_TRS & aOther) const

Definition at line 125 of file transform_trs.cpp.

References m_rotate, m_scaleX, m_scaleY, m_translate, and TRANSFORM_TRS().

◆ RescaleAround()

TRANSFORM_TRS TRANSFORM_TRS::RescaleAround ( const VECTOR2I & aFixedPoint,
double aSx,
double aSy ) const

◆ SetRotate()

void TRANSFORM_TRS::SetRotate ( const EDA_ANGLE & aR)
inline

Definition at line 71 of file transform_trs.h.

References m_rotate.

◆ SetScale()

void TRANSFORM_TRS::SetScale ( double aSx,
double aSy )
inline

Definition at line 72 of file transform_trs.h.

References m_scaleX, and m_scaleY.

Referenced by PCB_SHAPE::RebakeWithScale(), and PCB_SHAPE::syncLibCoords().

◆ SetTranslate()

void TRANSFORM_TRS::SetTranslate ( const VECTOR2I & aT)
inline

Definition at line 70 of file transform_trs.h.

References m_translate.

Member Data Documentation

◆ m_rotate

EDA_ANGLE TRANSFORM_TRS::m_rotate
private

◆ m_scaleX

◆ m_scaleY

◆ m_translate

VECTOR2I TRANSFORM_TRS::m_translate
private

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