OpendTect  6.3
trigonometry.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Kristofer Tingdahl
8  Date: 23-11-2002
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "algomod.h"
15 #include "coord.h"
16 #include "typeset.h"
17 #include <math.h>
18 class Plane3;
19 
20 
25 inline void interpolateOnTriangle2D( const Coord pt,
26  const Coord a, const Coord b, const Coord c,
27  double& weight_a, double& weight_b, double& weight_c )
28 {
29  const Coord3 ba = Coord3(b-a,0.);
30  const Coord3 ca = Coord3(c-a,0.);
31  const double triarea = ba.cross( ca ).abs<double>()*0.5;
32 
33  const Coord3 pa = Coord3(pt-a,0.);
34  const Coord3 pb = Coord3(pt-b,0.);
35  const Coord3 pc = Coord3(pt-c,0.);
36 
37  if ( mIsZero(triarea,1e-8) )
38  {
39  const double distpa = pa.abs<double>();
40  if ( mIsZero(distpa,1e-8) )
41  {
42  weight_a = 1.; weight_b = 0.; weight_c = 0.;
43  return;
44  }
45 
46  const double distpb = pb.abs<double>();
47  if ( mIsZero(distpb,1e-8) )
48  {
49  weight_a = 0.; weight_b = 1.; weight_c = 0.;
50  return;
51  }
52 
53  const double distpc = pc.abs<double>();
54  if ( mIsZero(distpc,1e-8) )
55  {
56  weight_a = 0.; weight_b = 0.; weight_c = 1.;
57  return;
58  }
59 
60  const double totalinversedist = 1./distpa + 1./distpb + 1./distpc;
61  weight_a = 1./(distpa*totalinversedist);
62  weight_b = 1./(distpb*totalinversedist);
63  weight_c = 1./(distpc*totalinversedist);
64  }
65  else
66  {
67  const double triareapab = pa.cross( pb ).abs<double>()*0.5;
68  const double triareapac = pa.cross( pc ).abs<double>()*0.5;
69  const double triareapcb = pc.cross( pb ).abs<double>()*0.5;
70 
71  weight_a = triareapcb / triarea;
72  weight_b = triareapac / triarea;
73  weight_c = triareapab / triarea;
74  }
75 }
76 
77 
83 /*Calculate a 3x3 matrix's determinent given by v[0]-v[8] with 9 elements. */
84 inline double determinent33( const double* v )
85 {
86  return v[0]*(v[4]*v[8]-v[5]*v[7])+v[1]*(v[5]*v[6]-v[3]*v[8])+
87  v[2]*(v[3]*v[7]-v[4]*v[6]);
88 }
89 
90 
91 /*Calculate a 4x4 matrix's determinent given by rows r0, r1, r2, r3 with the
92  last column 1, 1, 1, 1. */
93 inline double determinent44( const Coord3& r0, const Coord3& r1,
94  const Coord3& r2, const Coord3& r3 )
95 {
96  const double d0[9] = { r1.y_, r1.z_, 1, r2.y_, r2.z_, 1, r3.y_, r3.z_, 1 };
97  const double d1[9] = { r1.x_, r1.z_, 1, r2.x_, r2.z_, 1, r3.x_, r3.z_, 1 };
98  const double d2[9] = { r1.x_, r1.y_, 1, r2.x_, r2.y_, 1, r3.x_, r3.y_, 1 };
99  const double d3[9] = { r1.x_, r1.y_, r1.z_, r2.x_, r2.y_, r2.z_, r3.x_,
100  r3.y_, r3.z_};
101  return r0.x_*determinent33( d0 )-r0.y_*determinent33( d1 )+
102  r0.z_*determinent33( d2 )-determinent33( d3 );
103 }
104 
106 inline double determinent44( const double* r0, const double* r1,
107  const double* r2, const double* r3 )
108 {
109  const double d0[9] = { r1[1], r1[2], r1[3], r2[1], r2[2], r2[3],
110  r3[1], r3[2], r3[3] };
111  const double d1[9] = { r1[0], r1[2], r1[3], r2[0], r2[2], r2[3],
112  r3[0], r3[2], r3[3] };
113  const double d2[9] = { r1[0], r1[1], r1[3], r2[0], r2[1], r2[3],
114  r3[0], r3[1], r3[3] };
115  const double d3[9] = { r1[0], r1[1], r1[2], r2[0], r2[1], r2[2],
116  r3[0], r3[1], r3[2] };
117  return r0[0]*determinent33( d0 )-r0[1]*determinent33( d1 )+
118  r0[2]*determinent33( d2 )-r0[3]*determinent33( d3 );
119 }
120 
122 inline bool isInsideCircle( const Coord& pt,
123  const Coord& p1, const Coord& p2, const Coord& p3 )
124 {
125  Coord center;
126  const Coord d12 = p1-p2;
127  const Coord d13 = p1-p3;
128  const Coord d = p1-pt;
129  const double deter=d13.x_*d12.y_-d13.y_*d12.x_;
130  const double a12 = ( p1.dot(p1)-p2.dot(p2) )/2;
131  const double a13 = ( p1.dot(p1)-p3.dot(p3) )/2;
132  center.x_ = (a13*d12.y_-a12*d13.y_)/deter;
133  center.y_ = (d13.x_*a12-d12.x_*a13)/deter;
134  return pt.sqAbs()-p1.sqAbs()+2*center.dot(d)<0;
135 }
136 
137 
139 inline bool isInsideCircumSphere( const Coord3& p, const Coord3& a,
140  const Coord3& b, const Coord3& c, const Coord3& d )
141 {
142  const Coord3 ab = a-b;
143  const Coord3 ac = a-c;
144  const Coord3 ad = a-d;
145  const double t[9] = { ab.x_, ab.y_, ab.z_, ac.x_, ac.y_, ac.z_, ad.x_,
146  ad.y_, ad.z_};
147  const double deter = determinent33( t );
148 
149  const double sqra = a.x_*a.x_+a.y_*a.y_+a.z_*a.z_;
150  const double d0 = (sqra-(b.x_*b.x_+b.y_*b.y_+b.z_*b.z_))/2;
151  const double d1 = (sqra-(c.x_*c.x_+c.y_*c.y_+c.z_*c.z_))/2;
152  const double d2 = (sqra-(d.x_*d.x_+d.y_*d.y_+d.z_*d.z_))/2;
153  const double t0[9] = { d0, ab.y_, ab.z_, d1, ac.y_, ac.z_, d2, ad.y_,ad.z_};
154  const double t1[9] = { ab.x_, d0, ab.z_, ac.x_, d1, ac.z_, ad.x_, d2,ad.z_};
155  const double t2[9] = { ab.x_, ab.y_, d0, ac.x_, ac.y_, d1, ad.x_, ad.y_,d2};
156  const double centerx = determinent33(t0)/deter;
157  const double centery = determinent33(t1)/deter;
158  const double centerz = determinent33(t2)/deter;
159 
160  return (p.x_*p.x_+p.y_*p.y_+p.z_*p.z_-sqra+
161  2*(centerx*(a.x_-p.x_)+centery*(a.y_-p.y_)+centerz*(a.z_-p.z_)))<0;
162 }
163 
164 
166 inline bool sameSide2D( const Coord& p1, const Coord& p2,
167  const Coord& a, const Coord& b, double epsilon )
168 {
169  double xdiff = b.x_-a.x_;
170  double ydiff = b.y_-a.y_;
171  return ((p1.x_-a.x_)*ydiff-(p1.y_-a.y_)*xdiff)*
172  ((p2.x_-a.x_)*ydiff-(p2.y_-a.y_)*xdiff)>=-epsilon;
173 }
174 
175 
177 inline bool sameSide3D( const Coord3& p1, const Coord3& p2,
178  const Coord3& a, const Coord3& b, double epsilon )
179 {
180  const Coord3 cpp1 = (b-a).cross(p1-a);
181  const Coord3 cpp2 = (b-a).cross(p2-a);
182  return cpp1.dot(cpp2)>=-epsilon;
183 }
184 
185 
187 inline bool pointInTriangle2D( const Coord& p, const Coord& a, const Coord& b,
188  const Coord& c, double epsilon )
189 {
190  if ( (p.x_>a.x_ && p.x_>b.x_ && p.x_>c.x_) ||
191  (p.x_<a.x_ && p.x_<b.x_ && p.x_<c.x_) ||
192  (p.y_>a.y_ && p.y_>b.y_ && p.y_>c.y_) ||
193  (p.y_<a.y_ && p.y_<b.y_ && p.y_<c.y_) )
194  return false;
195 
196  return sameSide2D(p,a,b,c,epsilon) && sameSide2D(p,b,a,c,epsilon) &&
197  sameSide2D(p,c,a,b,epsilon);
198 }
199 
200 
202 inline bool pointInTriangle3D( const Coord3& p, const Coord3& a,
203  const Coord3& b, const Coord3& c, double epsilon,
204  bool useangularmethod=false )
205 {
206  if ( !useangularmethod )
207  {
208  return sameSide3D(p,a,b,c,epsilon) && sameSide3D(p,b,a,c,epsilon) &&
209  sameSide3D(p,c,a,b,epsilon);
210  }
211 
212  Coord3 ap = a - p;
213  ap = ap.normalize();
214  Coord3 bp = b - p;
215  bp = bp.normalize();
216  Coord3 cp = c - p;
217  cp = cp.normalize();
218 
219  const double d1 = ap.dot( bp );
220  const double d2 = bp.dot( cp );
221  const double d3 = cp.dot( ap );
222  const double angle = Math::ACos(d1) + Math::ACos(d2) + Math::ACos(d3);
223 
224  return mIsEqual(angle,M_2PI,epsilon);
225 }
226 
227 
229 inline bool pointOnEdge2D( const Coord& p, const Coord& a, const Coord& b,
230  double epsilon )
231 {
232  const Coord pa = p-a;
233  const Coord ba = b-a;
234  const double t = pa.dot(ba)/ba.sqAbs();
235  if ( t<0 || t>1 )
236  return false;
237 
238  const Coord intersectpt = a+Coord(t*ba.x_, t*ba.y_);
239  const Coord pq = p-intersectpt;
240  return pq.sqAbs()<epsilon*epsilon;
241 }
242 
243 
244 inline bool pointOnEdge3D( const Coord3& p, const Coord3& a, const Coord3& b,
245  double epsilon )
246 {
247  if ( (p.x_<a.x_ && p.x_<b.x_) || (p.x_>a.x_ && p.x_>b.x_) ||
248  (p.y_<a.y_ && p.y_<b.y_) || (p.y_>a.y_ && p.y_>b.y_) ||
249  (p.z_<a.z_ && p.z_<b.z_) || (p.z_>a.z_ && p.z_>b.z_) )
250  return false;
251 
252  const Coord3 pa = p-a;
253  const Coord3 ba = b-a;
254  const double t = pa.dot(ba)/ba.sqAbs();
255  if ( t<0 || t>1 )
256  return false;
257 
258  const Coord3 pq = pa-t*ba;
259  return pq.sqAbs()<epsilon*epsilon;
260 }
261 
262 
266 inline bool pointInPolygon( const Coord3& pt, const TypeSet<Coord3>& plgknots,
267  double epsilon )
268 {
269  const int nrvertices = plgknots.size();
270  if ( nrvertices==2 )
271  {
272  const double newepsilon = plgknots[0].distTo<double>(plgknots[1])*0.001;
273  return pointOnEdge3D( pt, plgknots[0], plgknots[1], newepsilon );
274  }
275  else if ( nrvertices==3 )
276  return pointInTriangle3D( pt, plgknots[0], plgknots[1], plgknots[2],
277  epsilon );
278  else
279  {
280  Coord3 p1, p2;
281  double anglesum = 0, cosangle;
282  for ( int idx=0; idx<nrvertices; idx++ )
283  {
284  p1 = plgknots[idx] - pt;
285  p2 = plgknots[(idx+1)%nrvertices] - pt;
286 
287  const double d1 = p1.abs<double>();
288  const double d2 = p2.abs<double>();
289  if ( d1*d2 <= epsilon*epsilon || d1 <= epsilon || d2 <= epsilon )
290  return true;
291  else
292  cosangle = p1.dot(p2) / (d1*d2);
293 
294  anglesum += acos( cosangle );
295  }
296 
297  return mIsEqual( anglesum, 6.2831853071795862, 1e-4 );
298  }
299 }
300 
301 
302 typedef Coord3 Vector3;
303 
309 TypeSet<Vector3>* makeSphereVectorSet( double dangle );
310 
317 Coord3 estimateAverageVector( const TypeSet<Coord3>&, bool normalize,
318  bool checkforundefs );
319 
320 
330 {
331 public:
332  Quaternion(double s,double x,double y,double z);
333  Quaternion(const Vector3& axis,float angle);
334 
335  void setRotation(const Vector3& axis,float angle);
336  void getRotation(Vector3& axis,float& angle) const;
338  Coord3 rotate(const Coord3&) const;
339 
340  Quaternion operator+(const Quaternion&) const;
341  Quaternion& operator+=(const Quaternion&);
342  Quaternion operator-(const Quaternion&) const;
343  Quaternion& operator-=(const Quaternion&);
344  Quaternion operator*(const Quaternion&) const;
345  Quaternion& operator*=(const Quaternion&);
346 
347  Quaternion inverse() const;
348 
349  double s_;
351 };
352 
353 
360 template <class T>
362 {
363 public:
364 
365  T direction(bool normalized=true) const;
366 
367  T getPoint(double t) const;
368  T start() const { return getPoint(0); }
369  T stop() const { return getPoint(1); }
370  double closestParam(const T& point) const;
374  T closestPoint(const T&) const;
377  double distanceToPoint(const T&) const;
378  double sqDistanceToPoint(const T&) const;
380  bool isOnLine(const T& pt) const;
381 
382 
383  T p0_;
384  T dir_;
385 };
386 
387 
388 
399 {
400 public:
401  Line2();
402  Line2(const Coord& start,const Coord& stop);
405  static Line2 fromPosAndDir(const Coord&, const Coord&);
406 
407  bool operator==(const Line2&) const;
408 
409  Coord intersection(const Line2&,bool checkinlimit=true) const;
413  void getPerpendicularLine(Line2&,const Coord& pt) const;
414  void getParallelLine(Line2& line,double dist) const;
415 };
416 
417 
425 {
426 public:
427  Line3();
428  Line3( double x0, double y0, double z0,
429  double alpha, double beta, double gamma );
430  Line3( const Coord3&, const Coord3& );
431  /*<Create line using point and direction. */
432  static Line3 fromPosAndDir(const Coord3&, const Vector3&);
433 
434  bool intersectWith( const Plane3&, double& t ) const;
438  void closestPointToLine(const Line3& line, double& t_this,
439  double& t_line ) const;
442 };
443 
444 
450 {
451 public:
452  Plane3();
453  Plane3(double, double, double, double);
454  Plane3( const Coord3& vectors, const Coord3&,
455  bool twovectors );
459  Plane3( const Coord3&, const Coord3&, const Coord3& );
460  Plane3( const TypeSet<Coord3>& );
461 
462  void set( const Coord3& vector, const Coord3&,
463  bool twovectors );
467  void set( const Coord3&, const Coord3&, const Coord3& );
468  float set( const TypeSet<Coord3>& );
474  bool operator==(const Plane3&) const;
475  bool operator!=(const Plane3&) const;
476 
477  Coord3 normal() const { return Coord3( A_, B_, C_ ); }
478 
479  double distanceToPoint( const Coord3&,
480  bool wichside=false ) const;
485  bool intersectWith( const Line3&, Coord3& ) const;
488  bool intersectWith( const Plane3&, Line3& ) const;
491  Coord3 getProjection(const Coord3& pos);
492  bool onSameSide(const Coord3& p1,const Coord3& p2);
496  double A_;
497  double B_;
498  double C_;
499  double D_;
500 };
501 
502 
509 {
510 public:
511  Plane3CoordSystem(const Coord3& normal,
512  const Coord3& origin,
513  const Coord3& pt10);
518  virtual ~Plane3CoordSystem() {}
519  bool isOK() const;
523  const Plane3& plane() const { return plane_; }
524 
525  Coord transform(const Coord3&,bool project) const;
530  Coord3 transform(const Coord&) const;
531 
532 protected:
533 
534  const Plane3 plane_;
538  bool isok_;
539 };
540 
541 
548 {
549 public:
550  Sphere(float r=0,float t=0,float p=0)
551  : radius_(r),theta_(t),phi_(p) {}
552 
553  Sphere(const Coord3& crd)
554  : radius_((float) crd.x_),theta_((float) crd.y_)
555  , phi_((float) crd.z_) {}
556  inline bool operator ==(const Sphere&) const;
557  inline bool operator !=( const Sphere& oth ) const
558  { return !(oth == *this); }
559 
560  float radius_;
561  float theta_;
562  float phi_;
563 
564  static const Sphere& nullSphere();
565  bool isNull() const;
566 
567 };
568 
569 
570 mGlobal(Algo) Sphere cartesian2Spherical(const Coord3&,bool math);
573 mGlobal(Algo) Coord3 spherical2Cartesian(const Sphere&,bool math);
577 inline bool Sphere::operator ==( const Sphere& s ) const
578 {
579  const float dr = radius_ - s.radius_;
580  const float dt = theta_ - s.theta_;
581  const float dp = phi_ - s.phi_;
582  return mIsZero(dr,1e-8) && mIsZero(dt,1e-8) && mIsZero(dp,1e-8);
583 }
584 
585 //Implementations of ParamLineBase
586 
587 
588 
589 template <class T> inline
590 double ParamLineBase<T>::sqDistanceToPoint(const T& p) const
591 {
592  const double t = closestParam(p);
593  const T closestpoint = getPoint(t);
594  return closestpoint.sqDistTo(p);
595 }
596 
597 
598 template <class T> inline
599 T ParamLineBase<T>::closestPoint(const T& pt) const
600 {
601  return getPoint(closestParam(pt));
602 }
603 
604 
605 template <class T> inline
606 double ParamLineBase<T>::distanceToPoint(const T& point) const
607 {
608  return Math::Sqrt(sqDistanceToPoint(point));
609 }
610 
611 template <class T> inline
612 T ParamLineBase<T>::getPoint(double t) const
613 {
614  return p0_ + dir_ * t;
615 }
616 
617 
618 template <class T> inline
619 T ParamLineBase<T>::direction(bool normalize) const
620 {
621  return normalize ? dir_.normalize() : dir_;
622 }
623 
624 
625 template <class T> inline
626 double ParamLineBase<T>::closestParam(const T& point) const
627 {
628  const T diff = point - p0_;
629  return diff.dot(dir_) / dir_.sqAbs();
630 }
631 
632 
633 template <class T> inline
634 bool ParamLineBase<T>::isOnLine(const T& pt) const
635 {
636  return sqDistanceToPoint(pt)<0.0001;
637 }
Quaternion is an extension to complex numbers.
Definition: trigonometry.h:329
#define mExpClass(module)
Definition: commondefs.h:157
T dot(const Point3D< T > &) const
Definition: geometry.h:852
double distanceToPoint(const T &) const
Definition: trigonometry.h:606
#define M_2PI
Definition: commondefs.h:72
int operator-(const DateInfo &di1, const DateInfo &di2)
Definition: dateinfo.h:127
double determinent33(const double *v)
Here are some commonly used functions to judge the position relation between point and line...
Definition: trigonometry.h:84
Coord3 vec01_
Definition: trigonometry.h:537
bool pointInPolygon(const Coord3 &pt, const TypeSet< Coord3 > &plgknots, double epsilon)
Definition: trigonometry.h:266
Coord3 Vector3
Definition: trigonometry.h:302
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
T p0_
Definition: trigonometry.h:383
float ACos(float)
#define mGlobal(module)
Definition: commondefs.h:160
#define mIsZero(x, eps)
Definition: commondefs.h:55
T stop() const
Definition: trigonometry.h:369
bool isInsideCircumSphere(const Coord3 &p, const Coord3 &a, const Coord3 &b, const Coord3 &c, const Coord3 &d)
Definition: trigonometry.h:139
const Plane3 & plane() const
Definition: trigonometry.h:523
T start() const
Definition: trigonometry.h:368
bool sameSide2D(const Coord &p1, const Coord &p2, const Coord &a, const Coord &b, double epsilon)
Definition: trigonometry.h:166
Sphere(const Coord3 &crd)
Definition: trigonometry.h:553
FT abs() const
Definition: geometry.h:874
A Plane3 is a plane in space, with the equation: Ax + By + Cz + D = 0.
Definition: trigonometry.h:449
bool isOnLine(const T &pt) const
Definition: trigonometry.h:634
A Line3 is a line in space, with the following equations:
Definition: trigonometry.h:424
float phi_
Definition: trigonometry.h:562
Defines a 2D coordinate system on a 3D plane and transforms between the 3D space and the coordinate s...
Definition: trigonometry.h:508
Point3D< T > normalize() const
Returns vector with length one.
Definition: geometry.h:863
T getPoint(double t) const
Definition: trigonometry.h:612
double sqDistanceToPoint(const T &) const
Definition: trigonometry.h:590
#define mIsEqual(x, y, eps)
Definition: commondefs.h:56
double determinent44(const Coord3 &r0, const Coord3 &r1, const Coord3 &r2, const Coord3 &r3)
Definition: trigonometry.h:93
double B_
Definition: trigonometry.h:497
T sqAbs() const
Squared absolute value.
Definition: geometry.h:624
Point3D< T > cross(const Point3D< T > &) const
Definition: geometry.h:858
3D point or vector
Definition: commontypes.h:57
TypeSet< Vector3 > * makeSphereVectorSet(double dangle)
Divides a sphere in a number of vectors, divided by approximately dangle from each other...
const Plane3 plane_
Definition: trigonometry.h:534
Set of (small) copyable elements.
Definition: commontypes.h:26
double D_
Definition: trigonometry.h:499
Coord3 estimateAverageVector(const TypeSet< Coord3 > &, bool normalize, bool checkforundefs)
Computes an average of a number of vectors using:
double A_
Definition: trigonometry.h:496
bool pointOnEdge2D(const Coord &p, const Coord &a, const Coord &b, double epsilon)
Definition: trigonometry.h:229
T dir_
Definition: trigonometry.h:384
double C_
Definition: trigonometry.h:498
float radius_
Definition: trigonometry.h:560
const Coord3 origin_
Definition: trigonometry.h:535
T direction(bool normalized=true) const
Definition: trigonometry.h:619
void interpolateOnTriangle2D(const Coord pt, const Coord a, const Coord b, const Coord c, double &weight_a, double &weight_b, double &weight_c)
Given a point pt in a triangle ABC, we calculate the interpolation weights for each vertex...
Definition: trigonometry.h:25
T x_
Definition: geometry.h:80
T x_
Definition: geometry.h:166
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:60
Sphere(float r=0, float t=0, float p=0)
Definition: trigonometry.h:550
double closestParam(const T &point) const
Definition: trigonometry.h:626
Coord3d Coord3
Definition: commontypes.h:84
size_type size() const
T dot(const Point2D< T > &) const
Definition: geometry.h:482
bool pointInTriangle2D(const Coord &p, const Coord &a, const Coord &b, const Coord &c, double epsilon)
Definition: trigonometry.h:187
bool sameSide3D(const Coord3 &p1, const Coord3 &p2, const Coord3 &a, const Coord3 &b, double epsilon)
Definition: trigonometry.h:177
T z_
Definition: geometry.h:168
T sqAbs() const
Squared absolute value.
Definition: geometry.h:879
Coord2d Coord
Definition: commontypes.h:83
double s_
Definition: trigonometry.h:349
T closestPoint(const T &) const
Definition: trigonometry.h:599
bool pointInTriangle3D(const Coord3 &p, const Coord3 &a, const Coord3 &b, const Coord3 &c, double epsilon, bool useangularmethod=false)
Definition: trigonometry.h:202
Definition: trigonometry.h:361
bool isInsideCircle(const Coord &pt, const Coord &p1, const Coord &p2, const Coord &p3)
Definition: trigonometry.h:122
Vector3 vec_
Definition: trigonometry.h:350
Represents a point in spherical coordinates. The angle phi lies in the horizontal plane...
Definition: trigonometry.h:547
Coord3 vec10_
Definition: trigonometry.h:536
bool pointOnEdge3D(const Coord3 &p, const Coord3 &a, const Coord3 &b, double epsilon)
Definition: trigonometry.h:244
bool isok_
Definition: trigonometry.h:538
Point2D< T > operator*(int f, const Point2D< T > &b)
Definition: geometry.h:86
Coord3 normal() const
Definition: trigonometry.h:477
Sphere cartesian2Spherical(const Coord3 &, bool math)
2D point or vector class.
Definition: commontypes.h:58
virtual ~Plane3CoordSystem()
Definition: trigonometry.h:518
T y_
Definition: geometry.h:167
T y_
Definition: geometry.h:81
float Sqrt(float)
Coord3 spherical2Cartesian(const Sphere &, bool math)
A Line2 is a line in the plane, with the following equations:
Definition: trigonometry.h:398
float theta_
Definition: trigonometry.h:561

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