Geom Software - C++ Programming and Geometry Libraries
Fade2D Documentation pages v1.56
GEOM_FADE2D::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
 

Friends

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

Detailed Description

Constructor & Destructor Documentation

◆ Segment2() [1/2]

GEOM_FADE2D::Segment2::Segment2 ( const Point2 src_,
const Point2 trg_ 
)
Parameters
src_First endpoint (source)
trg_Second endpoint (target)

◆ Segment2() [2/2]

GEOM_FADE2D::Segment2::Segment2 ( )

Create a Segment2 Default constructor

Member Function Documentation

◆ getSqLen2D()

double GEOM_FADE2D::Segment2::getSqLen2D ( ) const

Get the squared length

◆ getSrc()

Point2 GEOM_FADE2D::Segment2::getSrc ( ) const

Get the source point

Returns
the source point

◆ getTrg()

Point2 GEOM_FADE2D::Segment2::getTrg ( ) const

Get the target point

Returns
the target point

◆ operator==()

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

operator==

Undirected equality operator

◆ swapSrcTrg()

void GEOM_FADE2D::Segment2::swapSrcTrg ( )

Internally swaps the source and target point


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