13static constexpr double dPi = 3.141592653589793238462643383279502884197169399;
15static constexpr double dDegrad = 0.01745329251994329576923690768488;
16static constexpr double cosSmallDeg = 9.999999998476913e-01;
17static constexpr double cosHalfDeg = 9.999619230641713e-01;
18static constexpr double cosOneDeg = 9.998476951563913e-01;
19static constexpr double cosTwoDeg = 9.993908270190958e-01;
20static constexpr double cosFiveDeg = 9.961946980917455e-01;
75 BASE_EXPORT void setNormal(
const DVect2 &norm) { normal_ = norm.unit(); normalUser_ = norm; definedByNormal_ =
true; }
93 bool definedByNormal_ =
false;
187 bool definedByNormal_ =
false;
Class for storing an "orientation", or a direction in 2D or 3D space.
Definition orientation.h:50
BASE_EXPORT Orientation2(const double &dip)
Explicit constructor, orientation defined by dip (in radians).
Definition orientation.h:58
BASE_EXPORT void setJointAngle(const double &ja)
Can be used to set a full normal vector, but returned joint angle is still always between 0 and 180.
Definition orientation.h:79
BASE_EXPORT const DVect2 & getNormal() const
Returns the unit normal vector of the orientation.
Definition orientation.h:64
BASE_EXPORT Orientation2()
Default constructor – defaults to +Y is (0,1), defined by normal.
Definition orientation.h:53
BASE_EXPORT Orientation2(const DVect2 &dv2)
Definition orientation.h:56
static BASE_EXPORT DVect2 getNormFromDip(const double &dip)
Converts from a dip (in radians) to a normal vector.
Definition orientation.cpp:6
BASE_EXPORT bool wasDefinedByNormal() const
Returs true if the orientation was specific by a normal vector, false if it was specified by dip.
Definition orientation.h:70
BASE_EXPORT void setNormal(const DVect2 &norm)
Sets the orientation by normal. norm need not be a unit vector.
Definition orientation.h:75
static BASE_EXPORT double getJointAngleFromNorm(const DVect2 &norm)
Converts from a normal vector (need not be unit) to a joint angle in radians.
Definition orientation.cpp:24
static BASE_EXPORT DVect2 getNormFromJointAngle(const double &ja)
Converts from a joint angle (in radians) to a normal vector.
Definition orientation.cpp:20
BASE_EXPORT void setDip(const double &dip)
Sets the orientaion by dip (in radians).
Definition orientation.h:77
static BASE_EXPORT double getDipFromNorm(const DVect2 &norm)
Converts from a normal vector (need not be unit) to a dip in radians.
Definition orientation.cpp:11
BASE_EXPORT const DVect2 & getNormalUser() const
Returns the normal vector as specified by the user, not necessarily of unit lengths.
Definition orientation.h:66
BASE_EXPORT bool operator==(const Orientation2 &o) const
Equality operator.
Definition orientation.h:60
BASE_EXPORT double getJointAngle() const
Returns the joing angle of this orientation, in radians.
Definition orientation.h:72
BASE_EXPORT double getDip() const
Returns the equivalent dip angle (in radians).
Definition orientation.h:68
Class for storing an "orientation", or a direction in 2D or 3D space.
Definition orientation.h:99
BASE_EXPORT const Orientation3 & operator=(const Orientation3 &o)
Equality operator.
Definition orientation.cpp:48
static BASE_EXPORT double getAzimuthFromNorm(const DVect3 &norm)
Definition orientation.cpp:214
BASE_EXPORT DVect2 getDipDD() const
Returns the dip and dip direction (in radians) encoded in a DVect2. x = dip, y = dd.
Definition orientation.h:120
BASE_EXPORT bool operator==(const Orientation3 &o) const
Comparison operator, by normal vector (unit, not user).
Definition orientation.h:112
BASE_EXPORT void setAzimuthPlunge(const double &azimuth, const double &plunge)
Definition orientation.cpp:120
static BASE_EXPORT void setLHS(bool b)
Definition orientation.h:181
static BASE_EXPORT DVect3 getNormFromAzimuthPlunge(const double &azimuth, const double &plunge)
Converts from a dip and dip direction (in radians) to a normal vector.
Definition orientation.cpp:174
BASE_EXPORT void setNormalX(const double &x)
Sets the X-component of the normal user vector, the other components are held constant.
Definition orientation.cpp:63
BASE_EXPORT void setDip(const double &dip)
Sets dip in radians, the dip direction is held constant.
Definition orientation.cpp:90
BASE_EXPORT Orientation3()
Default 3D orientation is +Z normal vector.
Definition orientation.cpp:31
BASE_EXPORT void setNormal(const DVect3 &norm)
Sets the normal vector – this value need not be a unit vector, and it is recoverable in getNormalUser...
Definition orientation.cpp:56
static BASE_EXPORT DVect2 getDipDDFromNorm(const DVect3 &norm)
Definition orientation.cpp:181
BASE_EXPORT void setNormalY(const double &y)
Sets the Y-component of the normal user vector, the other components are held constant.
Definition orientation.cpp:70
BASE_EXPORT double getDipDirection() const
Returns the dip direction in radians.
Definition orientation.h:124
static BASE_EXPORT DVect3 getNormFromDipDD(const double &dip, const double &dd)
Converts from a dip and dip direction (in radians) to a normal vector.
Definition orientation.cpp:157
BASE_EXPORT void setJointAngle(const double &angle)
Definition orientation.cpp:102
BASE_EXPORT double getDip() const
Returns the dip in radians.
Definition orientation.h:122
static BASE_EXPORT double getJointAngleFromNorm(const DVect3 &norm)
Converts a normal vector (need not be unit) to a joint angle in radians.
Definition orientation.cpp:208
BASE_EXPORT void setDipDirection(const double &dd)
Sets the dip direction in radians, the dip is held constant.
Definition orientation.cpp:96
BASE_EXPORT void setDipDD(const double &dip, const double &dd)
Sets the dip and dip direction, in radians.
Definition orientation.cpp:84
static BASE_EXPORT double getPlungeFromNorm(const DVect3 &norm)
Definition orientation.cpp:221
BASE_EXPORT double getPlunge() const
Returns plunge in radians.
Definition orientation.h:133
BASE_EXPORT double getAzimuth() const
Returns azimuth in radians.
Definition orientation.h:131
BASE_EXPORT bool wasDefinedByNormal() const
Definition orientation.h:127
BASE_EXPORT double getJointAngle() const
Returns joint angle in radians.
Definition orientation.h:129
static BASE_EXPORT DVect3 getVectorFromAzimuthPlunge(const double &az, const double &plunge)
Converts from azimuth and plunge (in radians) to the corresponding vector.
Definition orientation.cpp:165
BASE_EXPORT const DVect3 & getNormal() const
Returns the unit normal of this orientation.
Definition orientation.h:116
BASE_EXPORT void setNormalZ(const double &z)
Sets the Z-component of the normal user vector, the other components are held constant.
Definition orientation.cpp:77
static BASE_EXPORT bool getLHS()
Definition orientation.h:180
BASE_EXPORT bool isIn(const DVect3 &normal, const DVect2 &tol) const
Utility class, returns TRUE if normal is within tolerance of this orientation.
Definition orientation.cpp:125
BASE_EXPORT const DVect3 & getNormalUser() const
Returns the normal vector specified by the user, which may not be a unit vector.
Definition orientation.h:118
#define BASE_EXPORT
Definition basedef.h:24
2D and 3D vector utility classes.