KiCad PCB EDA Suite
Loading...
Searching...
No Matches
box2.h File Reference
#include <algorithm>
#include <limits>
#include <optional>
#include <math/vector2d.h>
#include <geometry/eda_angle.h>
#include <core/kicad_algo.h>
#include <trigo.h>

Go to the source code of this file.

Classes

class  BOX2< Vec >
 A 2D bounding box built on top of an origin point and size vector. More...
 

Typedefs

typedef BOX2< VECTOR2IBOX2I
 
typedef BOX2< VECTOR2DBOX2D
 
typedef std::optional< BOX2IOPT_BOX2I
 

Functions

BOX2I BOX2ISafe (const BOX2D &aInput)
 
BOX2I BOX2ISafe (const VECTOR2D &aPos, const VECTOR2D &aSize)
 
template<typename S , std::enable_if_t< std::is_integral< S >::value, int > = 0>
BOX2I BOX2ISafe (const VECTOR2I &aPos, const VECTOR2< S > &aSize)
 

Typedef Documentation

◆ BOX2D

typedef BOX2<VECTOR2D> BOX2D

Definition at line 888 of file box2.h.

◆ BOX2I

typedef BOX2<VECTOR2I> BOX2I

Definition at line 887 of file box2.h.

◆ OPT_BOX2I

typedef std::optional<BOX2I> OPT_BOX2I

Definition at line 890 of file box2.h.

Function Documentation

◆ BOX2ISafe() [1/3]

◆ BOX2ISafe() [2/3]

BOX2I BOX2ISafe ( const VECTOR2D aPos,
const VECTOR2D aSize 
)
inline

Definition at line 908 of file box2.h.

References left, right, VECTOR2< T >::x, and VECTOR2< T >::y.

◆ BOX2ISafe() [3/3]

template<typename S , std::enable_if_t< std::is_integral< S >::value, int > = 0>
BOX2I BOX2ISafe ( const VECTOR2I aPos,
const VECTOR2< S > &  aSize 
)
inline

Definition at line 924 of file box2.h.

References right, VECTOR2< T >::x, and VECTOR2< T >::y.