PCB Environment 2
Loading...
Searching...
No Matches
geo Namespace Reference

Functions

Real cosine (const Vector_2 &v1, const Vector_2 &v2)
 Compute the cosine of the angle between two 2D vectors.
float distance45 (const Point_2 &A, const Point_2 &B)
Bbox_2 expandBox (const Bbox_2 &box, Real m)
Bbox_2 expandBox_r (const Bbox_2 &box, Real m_rel)
Bbox_2 cropBox (const Bbox_2 &box, const Bbox_2 &crop)
Real bbox_area (const Bbox_2 &box)
Real bbox_diameter (const Bbox_2 &box)
std::string to_string (const Bbox_2 &box)
Point_2 closest_on (const Segment_2 &s, const Point_2 &o)

Function Documentation

◆ bbox_area()

Real geo::bbox_area ( const Bbox_2 & box)
inline

◆ bbox_diameter()

Real geo::bbox_diameter ( const Bbox_2 & box)
inline

◆ closest_on()

Point_2 geo::closest_on ( const Segment_2 & s,
const Point_2 & o )
inline

◆ cosine()

Real geo::cosine ( const Vector_2 & v1,
const Vector_2 & v2 )
inline

Compute the cosine of the angle between two 2D vectors.

◆ cropBox()

Bbox_2 geo::cropBox ( const Bbox_2 & box,
const Bbox_2 & crop )
inline

◆ distance45()

float geo::distance45 ( const Point_2 & A,
const Point_2 & B )
inline

Compute the 45-degree or "Queen's" distance between 2 points. This is analogous to the Manhattan distance but with 45° rather than 90° steps.

◆ expandBox()

Bbox_2 geo::expandBox ( const Bbox_2 & box,
Real m )
inline

◆ expandBox_r()

Bbox_2 geo::expandBox_r ( const Bbox_2 & box,
Real m_rel )
inline

◆ to_string()

std::string geo::to_string ( const Bbox_2 & box)
inline