Itasca C++ Interface
|
Class for specifying a particular 3D cartesian axes system, and converting to and from it. More...
#include <caxes.h>
Public Member Functions | |
BASE_EXPORT | CAxes3D () |
Default constructor, no initialization of data. | |
BASE_EXPORT | CAxes3D (const CAxes3D &a) |
Copy constructor. | |
BASE_EXPORT | CAxes3D (const CAxes2D &a) |
Explicit construction from CAxes2D. e3() = (0,0,1). | |
BASE_EXPORT | CAxes3D (const DVect3 &vx, const DVect3 &vy) |
BASE_EXPORT | CAxes3D (const double &dip, const double &ddir, const double &roll=0.0) |
BASE_EXPORT | CAxes3D (const Orientation3 &o, const double &roll=0.0) |
BASE_EXPORT const CAxes3D & | operator= (const CAxes3D &a) |
Equality operator. | |
BASE_EXPORT bool | operator== (const CAxes3D &a) const |
Comparison operator. | |
BASE_EXPORT bool | operator!= (const CAxes3D &a) const |
Comparison operator. | |
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 & | e1 () const |
The x unit direction. | |
BASE_EXPORT const DVect3 & | e2 () const |
The y unit direction. | |
BASE_EXPORT DVect3 | e3 () const |
The z unit direction. | |
BASE_EXPORT DVect3 & | re1 () |
BASE_EXPORT DVect3 & | re2 () |
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 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 CAxes3D | make (const DVect3 &z, const double &roll=0.0) |
static BASE_EXPORT CAxes3D | makeX (const DVect3 &x, const double &roll=0.0) |
static BASE_EXPORT CAxes3D | make (const Orientation3 &o, const double &roll=0.0) |
static BASE_EXPORT CAxes3D | makeX (const Orientation3 &o, const double &roll=0.0) |
static BASE_EXPORT void | setTolerance (const double &d) |
Class for specifying a particular 3D cartesian axes system, and converting to and from it.
This class is allows one to specify a cartesian coordinate system and convert from "local" (to this CAxes object) to "global" in cartesian space. This class is a 3D version of CAxes, and a 3D one exists as well. This is being introduced so that a coordinate system can exist without the added overhead of storing a center and an extra vector (as in the CAxes2D and 3D classes - the extra vector is obtained on the fly) at the added expense of some computational overhead. The API has basically the same functionality as the Axes API without the access to the center of the coordinate system.
CAxes3D::CAxes3D | ( | const DVect3 & | vx, |
const DVect3 & | vy ) |
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 CAxes3D(const double &dip,const double &ddir,const double &roll) for a defintion of roll.
double CAxes3D::getRoll | ( | ) | const |
Returns the effective roll of the current axes system. See CAxes3D(const double &dip,const double &ddir,const double &roll) for a defintion of roll.
|
static |
Creates an CAxes3D 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 CAxes3D 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(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.
void CAxes3D::setOrientation | ( | const double & | dip, |
const double & | ddir, | ||
const double & | roll = 0.0 ) |
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 CAxes3D(const double &dip,const double &ddir,const double &roll) for a defintion of roll.
void CAxes3D::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 CAxes3D(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.