Fade2.5D Documentation pages v1.85
Delaunay Features
Segment2 Class Reference

Segment. More...

#include <Segment2.h>

Public Member Functions

 Segment2 (const Point2 &src_, const Point2 &trg_)
 Create a Segment2. More...
 Segment2 ()
Point2 getSrc () const
Point2 getTrg () const
double getSqLen2D () const
void swapSrcTrg ()
bool operator== (const Segment2 &other) const

Protected Attributes

Point2 src
Point2 trg


std::ostream & operator<< (std::ostream &stream, Segment2 seg)

Detailed Description


Constructor & Destructor Documentation

◆ Segment2() [1/2]

Segment2::Segment2 ( const Point2 src_,
const Point2 trg_ 

Create a Segment2.

src_First endpoint (source)
trg_Second endpoint (target)

◆ Segment2() [2/2]

Segment2::Segment2 ( )

Create a Segment2 Default constructor

Member Function Documentation

◆ getSqLen2D()

double Segment2::getSqLen2D ( ) const

Get the squared length

◆ getSrc()

Point2 Segment2::getSrc ( ) const

Get the source point

the source point

◆ getTrg()

Point2 Segment2::getTrg ( ) const

Get the target point

the target point

◆ operator==()

bool Segment2::operator== ( const Segment2 other) const


Undirected equality operator

◆ swapSrcTrg()

void Segment2::swapSrcTrg ( )

Internally swaps the source and target point

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