OpendTect  6.6
Public Member Functions | Public Attributes | List of all members
ParamLine2 Class Reference

A ParamLine2 is a line in space, with the following equations: More...

Public Member Functions

 ParamLine2 (const Coord &, double slope)
 
 ParamLine2 (const Coord &p0, const Coord &p1)
 
 ParamLine2 (double slope=0, double intcpt=0)
 
double closestPoint (const Coord &point) const
 
Coord direction (bool normalized=true) const
 
double distanceToPoint (const Coord &) const
 
Coord getPoint (double t) const
 
bool operator== (const ParamLine2 &) const
 
double sqDistanceToPoint (const Coord &) const
 

Public Attributes

double alpha_
 
double beta_
 
double x0_
 
double y0_
 

Detailed Description

A ParamLine2 is a line in space, with the following equations:

x = x0 + alpha*t y = y0 + beta*t

This class will replace the Line2 in coming versions.

<>

Constructor & Destructor Documentation

◆ ParamLine2() [1/3]

ParamLine2::ParamLine2 ( double  slope = 0,
double  intcpt = 0 
)

◆ ParamLine2() [2/3]

ParamLine2::ParamLine2 ( const Coord ,
double  slope 
)

◆ ParamLine2() [3/3]

ParamLine2::ParamLine2 ( const Coord p0,
const Coord p1 
)

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

Member Function Documentation

◆ closestPoint()

double ParamLine2::closestPoint ( const Coord point) const
Returns
the point on the line that is closest to the given point. If t is given, it will be filled with the t-value of the closest point

◆ direction()

Coord ParamLine2::direction ( bool  normalized = true) const

◆ distanceToPoint()

double ParamLine2::distanceToPoint ( const Coord ) const

◆ getPoint()

Coord ParamLine2::getPoint ( double  t) const

◆ operator==()

bool ParamLine2::operator== ( const ParamLine2 ) const

◆ sqDistanceToPoint()

double ParamLine2::sqDistanceToPoint ( const Coord ) const

Member Data Documentation

◆ alpha_

double ParamLine2::alpha_

◆ beta_

double ParamLine2::beta_

◆ x0_

double ParamLine2::x0_

◆ y0_

double ParamLine2::y0_

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