KiCad PCB EDA Suite
Loading...
Searching...
No Matches
mirror.h File Reference

Go to the source code of this file.

Enumerations

enum class  FLIP_DIRECTION { LEFT_RIGHT , TOP_BOTTOM }
 

Functions

template<typename T >
constexpr T MIRRORVAL (T aPoint, T aMirrorRef)
 Returns the mirror of aPoint relative to the aMirrorRef.
 
template<typename T >
constexpr void MIRROR (T &aPoint, const T &aMirrorRef)
 Updates aPoint with the mirror of aPoint relative to the aMirrorRef.
 
template<typename VT >
constexpr void MIRROR (VT &aPoint, const VT &aMirrorRef, FLIP_DIRECTION aFlipDirection)
 Updates aPoint with the mirror of aPoint relative to the aMirrorRef, in the specified direction.
 

Enumeration Type Documentation

◆ FLIP_DIRECTION

enum class FLIP_DIRECTION
strong
Enumerator
LEFT_RIGHT 

Flip left to right (around the Y axis)

TOP_BOTTOM 

Flip top to bottom (around the X axis)

Definition at line 26 of file mirror.h.

Function Documentation

◆ MIRROR() [1/2]

◆ MIRROR() [2/2]

template<typename VT >
constexpr void MIRROR ( VT &  aPoint,
const VT &  aMirrorRef,
FLIP_DIRECTION  aFlipDirection 
)
constexpr

Updates aPoint with the mirror of aPoint relative to the aMirrorRef, in the specified direction.

Definition at line 56 of file mirror.h.

References LEFT_RIGHT, and MIRROR().

◆ MIRRORVAL()

template<typename T >
constexpr T MIRRORVAL ( aPoint,
aMirrorRef 
)
constexpr