OpendTect  6.3
Public Member Functions | Static Public Member Functions | List of all members
Line2 Class Reference

A Line2 is a line in the plane, with the following equations: More...

Inheritance diagram for Line2:
[legend]

Public Member Functions

 Line2 ()
 
 Line2 (const Coord &start, const Coord &stop)
 
bool operator== (const Line2 &) const
 
Coord intersection (const Line2 &, bool checkinlimit=true) const
 
void getPerpendicularLine (Line2 &, const Coord &pt) const
 
void getParallelLine (Line2 &line, double dist) const
 
- Public Member Functions inherited from ParamLineBase< Coord >
Coord direction (bool normalized=true) const
 
Coord getPoint (double t) const
 
Coord start () const
 
Coord stop () const
 
double closestParam (const Coord &point) const
 
Coord closestPoint (const Coord &) const
 
double distanceToPoint (const Coord &) const
 
double sqDistanceToPoint (const Coord &) const
 
bool isOnLine (const Coord &pt) const
 

Static Public Member Functions

static Line2 fromPosAndDir (const Coord &, const Coord &)
 

Additional Inherited Members

- Public Attributes inherited from ParamLineBase< Coord >
Coord p0_
 
Coord dir_
 

Detailed Description

A Line2 is a line in the plane, with the following equations:

p(x,y) = p0 + dir * t

Though the line is infinitely long, one can treat the line as having a start when t=0 and a stop when t=1.

Constructor & Destructor Documentation

Line2::Line2 ( )
Line2::Line2 ( const Coord start,
const Coord stop 
)

Normalizes so that t=0 is p0 and t=1 is p1

Member Function Documentation

static Line2 Line2::fromPosAndDir ( const Coord ,
const Coord  
)
static
void Line2::getParallelLine ( Line2 line,
double  dist 
) const
void Line2::getPerpendicularLine ( Line2 ,
const Coord pt 
) const
Coord Line2::intersection ( const Line2 ,
bool  checkinlimit = true 
) const

If checkinlimit is true, Coord::udf() will be returned if the intersection is ouside t=[0,1] on either line.

bool Line2::operator== ( const Line2 ) const

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017