OpendTect  7.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Coord Class Reference

A cartesian coordinate in 2D space. More...

Inheritance diagram for Coord:
[legend]

Public Types

typedef Pos::Distance_Type DistType
 
typedef Pos::Ordinate_Type OrdType
 

Public Member Functions

 Coord ()
 
 Coord (const Geom::Point2D< OrdType > &p)
 
 Coord (OrdType cx, OrdType cy)
 
DistType angle (const Coord &from, const Coord &to) const
 
DistType cosAngle (const Coord &from, const Coord &to) const
 saves the expensive acos() call More...
 
OrdType dot (const Coord &) const
 
bool fromString (const char *)
 
DistType horDistTo (const Coord &) const
 
bool isUdf () const
 
Coord normalize () const
 
bool operator!= (const Coord &crd) const
 
bool operator< (const Coord &crd) const
 
bool operator== (const Coord &crd) const
 
bool operator> (const Coord &crd) const
 
DistType sqHorDistTo (const Coord &) const
 saves the expensive sqrt call More...
 
const char * toPrettyString (int nrdec=2) const
 
const char * toString () const
 
- Public Member Functions inherited from Geom::Point2D< Pos::Ordinate_Type >
 Point2D (Pos::Ordinate_Type xx=0, Pos::Ordinate_Type yy=0)
 
double abs () const
 
double distTo (const Point2D< Pos::Ordinate_Type > &) const
 
bool isDefined () const
 
bool operator!= (const Point2D< Pos::Ordinate_Type > &) const
 
Point2D< Pos::Ordinate_Typeoperator* (const Pos::Ordinate_Type factor) const
 
Point2D< Pos::Ordinate_Type > & operator*= (Pos::Ordinate_Type factor)
 
Point2D< Pos::Ordinate_Typeoperator+ (const Point2D< Pos::Ordinate_Type > &) const
 
Point2D< Pos::Ordinate_Type > & operator+= (const Point2D< Pos::Ordinate_Type > &)
 
Point2D< Pos::Ordinate_Type > & operator+= (Pos::Ordinate_Type dist)
 
Point2D< Pos::Ordinate_Typeoperator- ()
 
Point2D< Pos::Ordinate_Typeoperator- (const Point2D< Pos::Ordinate_Type > &) const
 
Point2D< Pos::Ordinate_Type > & operator-= (const Point2D< Pos::Ordinate_Type > &)
 
Point2D< Pos::Ordinate_Typeoperator/ (const Pos::Ordinate_Type den) const
 
Point2D< Pos::Ordinate_Type > & operator/= (Pos::Ordinate_Type den)
 
bool operator== (const Point2D< Pos::Ordinate_Type > &) const
 
Pos::Ordinate_Typeoperator[] (int idx)
 
Pos::Ordinate_Type operator[] (int idx) const
 
Point2D< Pos::Ordinate_Typescale (TT xx, TT yy) const
 
Point2D< Pos::Ordinate_Type > & setFrom (const Point2D< TT > &)
 
void setXY (Pos::Ordinate_Type xx, Pos::Ordinate_Type yy)
 
void setXY (TT xx, TT yy)
 
Pos::Ordinate_Type sqAbs () const
 
Pos::Ordinate_Type sqDistTo (const Point2D< Pos::Ordinate_Type > &) const
 
void swapXY ()
 
Point2D< Pos::Ordinate_Type > & zero ()
 

Static Public Member Functions

static const Coordudf ()
 
- Static Public Member Functions inherited from Geom::Point2D< Pos::Ordinate_Type >
static Point2D< Pos::Ordinate_Typeudf ()
 

Additional Inherited Members

- Public Attributes inherited from Geom::Point2D< Pos::Ordinate_Type >
Pos::Ordinate_Type x
 
Pos::Ordinate_Type y
 

Detailed Description

A cartesian coordinate in 2D space.

<>

Member Typedef Documentation

◆ DistType

◆ OrdType

Constructor & Destructor Documentation

◆ Coord() [1/3]

Coord::Coord ( const Geom::Point2D< OrdType > &  p)
inline

◆ Coord() [2/3]

Coord::Coord ( )
inline

◆ Coord() [3/3]

Coord::Coord ( OrdType  cx,
OrdType  cy 
)
inline

Member Function Documentation

◆ angle()

DistType Coord::angle ( const Coord from,
const Coord to 
) const

◆ cosAngle()

DistType Coord::cosAngle ( const Coord from,
const Coord to 
) const

saves the expensive acos() call

◆ dot()

OrdType Coord::dot ( const Coord ) const

◆ fromString()

bool Coord::fromString ( const char *  )

◆ horDistTo()

DistType Coord::horDistTo ( const Coord ) const

◆ isUdf()

bool Coord::isUdf ( ) const
inline

◆ normalize()

Coord Coord::normalize ( ) const

◆ operator!=()

bool Coord::operator!= ( const Coord crd) const
inline

◆ operator<()

bool Coord::operator< ( const Coord crd) const
inline

◆ operator==()

bool Coord::operator== ( const Coord crd) const
inline

◆ operator>()

bool Coord::operator> ( const Coord crd) const
inline

◆ sqHorDistTo()

DistType Coord::sqHorDistTo ( const Coord ) const

saves the expensive sqrt call

◆ toPrettyString()

const char* Coord::toPrettyString ( int  nrdec = 2) const

◆ toString()

const char* Coord::toString ( ) const

◆ udf()

static const Coord& Coord::udf ( )
static

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