Itasca C++ Interface
|
Class for specifying a particular 3D cartesian axes system, and converting to and from it. More...
#include <axes.h>
Public Member Functions | |
BASE_EXPORT | Axes3D () |
Default constructor, no initialization of data. | |
BASE_EXPORT | Axes3D (const Axes3D &a) |
Copy constructor. | |
BASE_EXPORT | Axes3D (const Axes2D &a) |
Explicit construction from Axes2D. e3() = (0,0,1). | |
BASE_EXPORT | Axes3D (const DVect3 &vx, const DVect3 &vy, const DVect3 &vz, const DVect3 &c=DVect3(0)) |
BASE_EXPORT | Axes3D (const Double &dip, const Double &ddir, const Double &roll=0.0, const DVect3 &c=DVect3(0)) |
BASE_EXPORT | Axes3D (const Orientation3 &o, const Double &roll=0.0, const DVect3 &c=DVect3(0)) |
BASE_EXPORT const Axes3D & | operator= (const Axes3D &a) |
Equality operator. | |
BASE_EXPORT bool | operator== (const Axes3D &a) const |
Comparison operator. | |
BASE_EXPORT bool | operator!= (const Axes3D &a) const |
Comparison operator. | |
BASE_EXPORT void | setOrigin (const DVect3 &c) |
Change the origin of the axes sytem. | |
BASE_EXPORT void | setOrientation (const Double &dip, const Double &ddir, const Double &roll=0.0) |
BASE_EXPORT void | setOrientation (const Orientation3 &o, const Double &roll=0.0) |
BASE_EXPORT const DVect3 & | c () const |
The origin of the axes system. | |
BASE_EXPORT const DVect3 & | e1 () const |
The x unit direction. | |
BASE_EXPORT const DVect3 & | e2 () const |
The y unit direction. | |
BASE_EXPORT const DVect3 & | e3 () const |
The z unit direction. | |
BASE_EXPORT DVect3 & | rc () |
Reference access to the origin of the axes system. | |
BASE_EXPORT DVect3 & | re1 () |
BASE_EXPORT DVect3 & | re2 () |
BASE_EXPORT DVect3 & | re3 () |
BASE_EXPORT DVect3 & | rdof (unsigned dof) |
BASE_EXPORT DVect3 | toLocal (const DVect3 &v) const |
Converts a vector from "global" (cartesian) system to this system. | |
BASE_EXPORT DVect3 | toGlobal (const DVect3 &v) const |
Converts a vector from this system to a "global" system. | |
BASE_EXPORT DVect3 | getDir (unsigned int dof) const |
Return e1, e2, or e3 based on degree-of-freedom (0-2) | |
BASE_EXPORT void | setDir (unsigned int dof, const DVect3 &v) |
BASE_EXPORT void | setDirAuto (unsigned int dof, unsigned int keepDOF=0xFFFFFFFF) |
BASE_EXPORT Orientation3 | getOrientation (unsigned int dof=0) const |
Returns equivalent orientation of e1, e2, or e2 based on degree-of-freedom (0-2) | |
BASE_EXPORT Double | getRoll () const |
Static Public Member Functions | |
static BASE_EXPORT Axes3D | make (const DVect3 &z, const Double &roll=0.0) |
static BASE_EXPORT Axes3D | makeX (const DVect3 &x, const Double &roll=0.0) |
static BASE_EXPORT Axes3D | make (const Orientation3 &o, const Double &roll=0.0) |
static BASE_EXPORT Axes3D | makeX (const Orientation3 &o, const Double &roll=0.0) |
static BASE_EXPORT Axes3D | make (const DVect3 &z, const DVect3 &x) |
static BASE_EXPORT Axes3D | make (const DVect3 &dir, unsigned dof) |
static BASE_EXPORT Axes3D | makeDef () |
static BASE_EXPORT void | setTolerance (const double &d) |
static BASE_EXPORT double | getTolerance () |
Returns the Tolerance used for comparison and detecting "near enough to zero". | |
static BASE_EXPORT Axes3D | global () |
Class for specifying a particular 3D cartesian axes system, and converting to and from it.
This class provides a cartesian coordinate system (3 orthogonal axes plus center), and supports mappings between local and global space. This class is a 3D version of Axes, and a 2D one exists as well. To the extent possible, the API has been made the same for both.
Axes3D::Axes3D | ( | const DVect3 & | vx, |
const DVect3 & | vy, | ||
const DVect3 & | vz, | ||
const DVect3 & | c = DVect3(0) |
||
) |
Explicit construction from three unit vectors.
|
inline |
Explicit construction from dip, dip direction, and roll (all in radians) See Orientation3 for a definition of dip and dip direction. Roll defines the last degree-of-freedom, and is defined as the angle of +y on the xy plane from +z. If the intersection of the xy plane with +z is zero (dip 0 or 180) the angle is from +y.
|
inlineexplicit |
Explicit construction from Orientation3, and roll (all in radians) See Axes3D(const Double &dip,const Double &ddir,const Double &roll) for a defintion of roll.
double Axes3D::getRoll | ( | ) | const |
Returns the effective roll of the current axes system. See Axes3D(const Double &dip,const Double &ddir,const Double &roll) for a defintion of roll.
Creates an Axes3D using vector z in the +z direction (need not be unit). By default, x will be dip of the plane defined using z as a normal, and y will be the strike. Roll defines a rotation about the z axis (clockwise with vector facing towards you).
|
static |
Creates an Axes3D using orientation o in the +z direction. By default, x will be dip of the plane defined using o as a normal, and y will be the strike. Roll defines a rotation about the z axis (clockwise with vector facing towards you).
|
static |
Same as make(z,roll), but instead of using roll to determine the x,y orientation it uses a provided x direction. Note that the X vector will be corrected (made unit and perpendicular to z).
Same as make(const DVect3 &z,const Double &roll=0.0), except given vector is x. By default, then, Y will be dip and Z will be strike.
|
static |
Same as make(const Orientation3 &o,const Double &roll=0.0), except given vector is x. By default, then, Y will be dip and Z will be strike.
|
inline |
Reference access to the x direction.
|
inline |
Reference access to the y direction.
|
inline |
Reference access to the z direction.
Change the orientation of the axes sytem, using dip, dd, and roll (all in radians) See Orientation3 for a definition of dip and dip direction. See Axes3D(const Double &dip,const Double &ddir,const Double &roll) for a defintion of roll.
void Axes3D::setOrientation | ( | const Orientation3 & | o, |
const Double & | roll = 0.0 |
||
) |
Change the orientation of the axes sytem, using dip, dd, and roll (all in radians) See Axes3D(const Double &dip,const Double &ddir,const Double &roll) for a defintion of roll.
|
static |
Tolerance used for comparison and detecting "near enough to zero". Defaults to 1e-6. A single tolerance is used for all 2D and 3D Axes objects.