OpendTect-6_4  6.4
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 (double slope=0, double intcpt=0)
 
 ParamLine2 (const Coord &, double slope)
 
 ParamLine2 (const Coord &p0, const Coord &p1)
 
bool operator== (const ParamLine2 &) const
 
Coord direction (bool normalized=true) const
 
Coord getPoint (double t) const
 
double closestPoint (const Coord &point) const
 
double distanceToPoint (const Coord &) const
 
double sqDistanceToPoint (const Coord &) const
 

Public Attributes

double x0_
 
double y0_
 
double alpha_
 
double beta_
 

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::ParamLine2 ( double  slope = 0,
double  intcpt = 0 
)
ParamLine2::ParamLine2 ( const Coord ,
double  slope 
)
ParamLine2::ParamLine2 ( const Coord p0,
const Coord p1 
)

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

Member Function Documentation

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
Coord ParamLine2::direction ( bool  normalized = true) const
double ParamLine2::distanceToPoint ( const Coord ) const
Coord ParamLine2::getPoint ( double  t) const
bool ParamLine2::operator== ( const ParamLine2 ) const
double ParamLine2::sqDistanceToPoint ( const Coord ) const

Member Data Documentation

double ParamLine2::alpha_
double ParamLine2::beta_
double ParamLine2::x0_
double ParamLine2::y0_

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