 |
OpendTect
6.6
|
Go to the documentation of this file.
41 {
return ! (crd == *
this); }
43 {
return x<crd.
x || (x==crd.
x && y<crd.
y); }
45 {
return x>crd.
x || (x==crd.
x && y>crd.
y); }
62 inline bool isUdf()
const {
return !isDefined(); }
79 :
Coord( xyz.x, xyz.y )
82 :
Coord(x_,y_), z(z_) {}
85 {
return idx ? (idx==1 ? y : z) : x; }
87 {
return idx ? (idx==1 ? y : z) : x; }
93 inline Coord3 operator/(
double)
const;
99 inline Coord3& operator/=(
double);
100 inline Coord3& operator*=(
double);
115 inline Coord3 normalize()
const;
118 inline bool isDefined()
const;
119 inline bool isUdf()
const {
return !isDefined(); }
205 {
return Coord3(
x*factor,
y*factor,
z*factor ); }
209 {
return Coord3(
x/denominator,
y/denominator,
z/denominator ); }
213 {
return Coord3(
x*factor.
x,
y*factor.
y,
z*factor.
z ); }
217 {
return Coord3(
x/denominator.
x,
y/denominator.
y,
z/denominator.
z ); }
222 x += p.
x;
y += p.
y;
z += p.
z;
229 x -= p.
x;
y -= p.
y;
z -= p.
z;
236 x *= factor;
y *= factor;
z *= factor;
243 x /= denominator;
y /= denominator;
z /= denominator;
249 {
return x*b.
x +
y*b.
y +
z*b.
z; }
259 if ( absval < 1e-10 )
262 return *
this / absval;
DistType sqDistTo(const Coord3 &) const
A cartesian coordinate in 3D space.
Definition: coord.h:72
static bool isUdf(Coord3 crd)
Definition: coord.h:160
DistType horDistTo(const Coord &) const
Coord3(const Coord3 &xyz)
Definition: coord.h:78
const Coord & coord() const
Definition: coord.h:102
const char * toPrettyString(int nrdec=2) const
T to(const F &fr)
Definition: convert.h:34
Coord3(OrdType x_, OrdType y_, OrdType z_)
Definition: coord.h:81
static const Coord3 & udf()
#define mIsEqual(x, y, eps)
Definition: commondefs.h:67
const char * toString() const
Pos::Ordinate_Type OrdType
Definition: coord.h:28
OrdType z
Definition: coord.h:124
Coord(const Geom::Point2D< OrdType > &p)
Definition: coord.h:31
static void setUdf(Coord3 &crd)
Definition: coord.h:161
#define mExpClass(module)
Definition: commondefs.h:177
#define mDefEps
Definition: commondefs.h:71
Coord3()
Definition: coord.h:75
Coord3(const Coord &a, OrdType z_)
Definition: coord.h:76
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:81
bool operator==(const Coord &crd) const
Definition: coord.h:37
bool operator!=(const Coord3 &) const
Definition: coord.h:175
Coord3 & operator-=(const Coord3 &)
Definition: coord.h:227
double Distance_Type
Definition: commontypes.h:91
Coord3 & operator+=(const Coord3 &)
Definition: coord.h:220
Coord3 scaleBy(const Coord3 &) const
Definition: coord.h:212
A cartesian coordinate in 2D space.
Definition: coord.h:25
OrdType operator[](int idx) const
Definition: coord.h:86
DistType cosAngle(const Coord &from, const Coord &to) const
saves the expensive acos() call
bool operator==(const Coord3 &) const
Definition: coord.h:167
bool isUdf(const T &t)
Definition: undefval.h:245
static Coord3 val()
Definition: coord.h:158
DistType dot(const Coord3 &) const
Definition: coord.h:248
bool isSameAs(const Coord3 &, const Coord3 &) const
static Coord val()
Definition: coord.h:143
bool isDefined() const
Definition: geometry.h:364
#define mIsZero(x, eps)
Definition: commondefs.h:66
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:90
#define mClass(module)
Definition: commondefs.h:181
Pos::Distance_Type DistType
Definition: coord.h:29
Undefined Coord3.
Definition: coord.h:156
DistType sqHorDistTo(const Coord &) const
saves the expensive sqrt() call
static bool isUdf(Coord crd)
Definition: coord.h:145
bool isDefined() const
Definition: coord.h:180
bool isUdf() const
Definition: coord.h:62
Coord3 operator-() const
Definition: coord.h:198
Coord()
Definition: coord.h:33
Coord3 operator*(double f, const Coord3 &b)
Definition: coord.h:129
bool fromString(const char *)
Coord3 cross(const Coord3 &) const
Definition: coord.h:252
Coord3 normalize() const
Definition: coord.h:256
static void setUdf(Coord &crd)
Definition: coord.h:146
OrdType dot(const Coord &) const
static bool hasUdf()
Definition: coord.h:144
Definition: geometry.h:19
int operator-(const DateInfo &di1, const DateInfo &di2)
Definition: dateinfo.h:128
bool operator!=(const Coord &crd) const
Definition: coord.h:40
bool isUdf() const
Definition: coord.h:119
Coord3 & operator*=(double)
Definition: coord.h:234
DistType angle(const Coord &from, const Coord &to) const
bool operator<(const Coord &crd) const
Definition: coord.h:42
T y
Definition: geometry.h:68
Coord3 operator*(double) const
Definition: coord.h:204
T x
Definition: geometry.h:67
bool operator>(const Coord &crd) const
Definition: coord.h:44
Coord3 & operator/=(double)
Definition: coord.h:241
DistType distTo(const Coord3 &) const
Coord(OrdType cx, OrdType cy)
Definition: coord.h:34
double Ordinate_Type
Definition: commontypes.h:90
Templatized undefined and initialisation (i.e. null) values.
Definition: color.h:113
static const Coord & udf()
const char * toString() const
bool fromString(const char *)
Coord3 operator+(const Coord3 &) const
Definition: coord.h:186
OrdType & operator[](int idx)
Definition: coord.h:84
static bool hasUdf()
Definition: coord.h:159
Coord & coord()
Definition: coord.h:101
Coord3 operator/(double) const
Definition: coord.h:208
Coord3 unScaleBy(const Coord3 &) const
Definition: coord.h:216
Undefined Coord.
Definition: coord.h:141
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021