OpendTect-6_4  6.4
Classes | Typedefs | Functions
trigonometry.h File Reference
Include dependency graph for trigonometry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Quaternion
 Quaternion is an extension to complex numbers. More...
 
class  ParamLine2
 A ParamLine2 is a line in space, with the following equations: More...
 
class  Line2
 A Line2 is a line on XY-plane, and it is defined in slope-intercept form y = slope*x + y-intercept; for making operations easier. More...
 
class  Line3
 A Line3 is a line in space, with the following equations: More...
 
class  Plane3
 A Plane3 is a plane in space, with the equation: Ax + By + Cz + D = 0. More...
 
class  Plane3CoordSystem
 Defines a 2D coordinate system on a 3D plane and transforms between the 3D space and the coordinate system. More...
 
class  Sphere
 Represents a point in spherical coordinates. The angle phi lies in the horizontal plane, theta in the vertical plane. More...
 

Typedefs

typedef Coord3 Vector3
 

Functions

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. More...
 
double determinent33 (const double *v)
 Here are some commonly used functions to judge the position relation between point and line, point and triangle, point and circle or sphere. More...
 
double determinent44 (const Coord3 &r0, const Coord3 &r1, const Coord3 &r2, const Coord3 &r3)
 
double determinent44 (const double *r0, const double *r1, const double *r2, const double *r3)
 
bool isInsideCircle (const Coord &pt, const Coord &p1, const Coord &p2, const Coord &p3)
 
bool isInsideCircumSphere (const Coord3 &p, const Coord3 &a, const Coord3 &b, const Coord3 &c, const Coord3 &d)
 
bool sameSide2D (const Coord &p1, const Coord &p2, const Coord &a, const Coord &b, double epsilon)
 
bool sameSide3D (const Coord3 &p1, const Coord3 &p2, const Coord3 &a, const Coord3 &b, double epsilon)
 
bool pointInTriangle2D (const Coord &p, const Coord &a, const Coord &b, const Coord &c, double epsilon)
 
bool pointInTriangle3D (const Coord3 &p, const Coord3 &a, const Coord3 &b, const Coord3 &c, double epsilon, bool useangularmethod)
 
bool pointInTriangle3D (const Coord3 &p, const Coord3 &a, const Coord3 &b, const Coord3 &c, double epsilon)
 
bool pointOnEdge2D (const Coord &p, const Coord &a, const Coord &b, double epsilon)
 
bool pointOnEdge3D (const Coord3 &p, const Coord3 &a, const Coord3 &b, double epsilon)
 
bool pointInPolygon (const Coord3 &pt, const TypeSet< Coord3 > &plgknots, double epsilon)
 
TypeSet< Vector3 > * makeSphereVectorSet (double dangle)
 Divides a sphere in a number of vectors, divided by approximately dangle from each other. dradius is given in radians. More...
 
Coord3 estimateAverageVector (const TypeSet< Coord3 > &, bool normalize, bool checkforundefs)
 Computes an average of a number of vectors using: More...
 
Sphere cartesian2Spherical (const Coord3 &, bool math)
 
Coord3 spherical2Cartesian (const Sphere &, bool math)
 

Typedef Documentation

typedef Coord3 Vector3

Function Documentation

Sphere cartesian2Spherical ( const Coord3 ,
bool  math 
)

math=true: transformation done in math-system math=false: transformation done in geo-system

double determinent33 ( const double *  v)
inline

Here are some commonly used functions to judge the position relation between point and line, point and triangle, point and circle or sphere.

double determinent44 ( const Coord3 r0,
const Coord3 r1,
const Coord3 r2,
const Coord3 r3 
)
inline

Each ri represents a row of 4 elements.

double determinent44 ( const double *  r0,
const double *  r1,
const double *  r2,
const double *  r3 
)
inline

Check the point pt is inside the circumcircle of p1, p2, p3 or not.

Coord3 estimateAverageVector ( const TypeSet< Coord3 > &  ,
bool  normalize,
bool  checkforundefs 
)

Computes an average of a number of vectors using:

  1. Summation
  2. PCA estimation
void interpolateOnTriangle2D ( const Coord  pt,
const Coord  a,
const Coord  b,
const Coord  c,
double &  weight_a,
double &  weight_b,
double &  weight_c 
)
inline

Given a point pt in a triangle ABC, we calculate the interpolation weights for each vertex.

bool isInsideCircle ( const Coord pt,
const Coord p1,
const Coord p2,
const Coord p3 
)
inline

Check the point p is inside the circumsphere of a, b, c, d or not.

bool isInsideCircumSphere ( const Coord3 p,
const Coord3 a,
const Coord3 b,
const Coord3 c,
const Coord3 d 
)
inline
TypeSet<Vector3>* makeSphereVectorSet ( double  dangle)

Divides a sphere in a number of vectors, divided by approximately dangle from each other. dradius is given in radians.

bool pointInPolygon ( const Coord3 pt,
const TypeSet< Coord3 > &  plgknots,
double  epsilon 
)
inline
bool pointInTriangle2D ( const Coord p,
const Coord a,
const Coord b,
const Coord c,
double  epsilon 
)
inline

Only when four points are coplanar.

bool pointInTriangle3D ( const Coord3 p,
const Coord3 a,
const Coord3 b,
const Coord3 c,
double  epsilon,
bool  useangularmethod 
)
inline

Only when four points are coplanar.

bool pointInTriangle3D ( const Coord3 p,
const Coord3 a,
const Coord3 b,
const Coord3 c,
double  epsilon 
)
inline

Check to see if the point P is on the edge AB or not.

bool pointOnEdge2D ( const Coord p,
const Coord a,
const Coord b,
double  epsilon 
)
inline
bool pointOnEdge3D ( const Coord3 p,
const Coord3 a,
const Coord3 b,
double  epsilon 
)
inline

For point and polygon lie on the same plane only. In 2D case, set all zs' to be 0, we also consider the case that the point is exactly on a vertex as inside. Use the check that all the angle sum should be 2 Pi.

bool sameSide2D ( const Coord p1,
const Coord p2,
const Coord a,
const Coord b,
double  epsilon 
)
inline

Check p1, p2 are on the same side of the edge AB or not. Only when four points are coplanar.

bool sameSide3D ( const Coord3 p1,
const Coord3 p2,
const Coord3 a,
const Coord3 b,
double  epsilon 
)
inline

Use this function only when the 4 points are all in a plane.

Coord3 spherical2Cartesian ( const Sphere ,
bool  math 
)

math=true: transformation done in math-system math=false: transformation done in geo-system


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