PCB Environment 2
Loading...
Searching...
No Matches
Segment_25 Class Reference

#include <Geometry.hpp>

Public Member Functions

 Segment_25 (const Segment_2 &s, int layer=0)
 Segment_25 (const ::Point_2 &p, const ::Point_2 &q, int layer=0)
const Segment_2 & s2 () const
int z () const
void setLayer (int z)
Point_25 source () const
Point_25 target () const
const Point_2 & source_2 () const
const Point_2 & target_2 () const
Real squared_length () const
Real length () const
bool is_horizontal () const
bool is_vertical () const
::Vector_2 getDirection (Real s=1.0) const
::Vector_2 getPerpendicularCCW (Real s=1.0) const
int angle45 () const
Real anglePi2 () const
Segment_25rectify (Real angleTolerance)
int majorAxis () const
Segment_25 opposite () const
bool isXOrdered () const
bool isYOrdered () const
Segment_25 orderedX () const
Segment_25 orderedY () const
bool operator< (const Segment_25 &s) const
bool operator== (const Segment_25 &s) const
int equals (const Segment_25 &s) const
Real maxNorm () const
Real angleWith (const Segment_25 &) const

Detailed Description

Segment_2 with integer layer coordinate.

Member Function Documentation

◆ equals()

int Segment_25::equals ( const Segment_25 & s) const
inline
Returns
1 if the segments are equal, -1 if they have swapped source/target, 0 otherwise.

◆ getDirection()

Vector_2 Segment_25::getDirection ( Real s = 1.0) const
inline
Returns
A Vector_2 in the direction of this segment with length s.

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