Itasca C++ Interface
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Axes3D Class Reference

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, bool normalize, const DVect3 &c=DVect3(0))
 
BASE_EXPORT Axes3D (double dip, double ddir, double roll=0.0, const DVect3 &c=DVect3(0))
 
BASE_EXPORT Axes3D (const Orientation3 &o, double roll=0.0, const DVect3 &c=DVect3(0))
 
BASE_EXPORT constexpr const Axes3Doperator= (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 (double dip, double ddir, double roll)
 
BASE_EXPORT void setOrientation (const Orientation3 &o, double roll)
 
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 (uint32 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 (uint32 dof) const
 Return e1, e2, or e3 based on degree-of-freedom (0-2)
 
BASE_EXPORT void setDir (uint32 dof, const DVect3 &v)
 
BASE_EXPORT void setDirAuto (uint32 dof, uint32 keepDOF=0xFFFFFFFF)
 
BASE_EXPORT Orientation3 getOrientation (uint32 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, bool normalize, double roll=0.0)
 
static BASE_EXPORT Axes3D makeX (const DVect3 &x, bool normalize, double roll=0.0)
 
static BASE_EXPORT Axes3D make (const Orientation3 &o, double roll=0.0)
 
static BASE_EXPORT Axes3D makeX (const Orientation3 &o, double roll=0.0)
 
static BASE_EXPORT Axes3D make (const DVect3 &z, const DVect3 &x, bool normalize)
 
static BASE_EXPORT Axes3D make (const DVect3 &dir, uint32 dof, bool normalize)
 
static BASE_EXPORT Axes3D makeDef ()
 
static BASE_EXPORT void setTolerance (double d)
 
static BASE_EXPORT double getTolerance ()
 Returns the Tolerance used for comparison and detecting "near enough to zero".
 
static BASE_EXPORT Axes3D global ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Axes3D() [1/3]

Axes3D::Axes3D ( const DVect3 & vx,
const DVect3 & vy,
const DVect3 & vz,
bool normalize,
const DVect3 & c = DVect3(0) )

Explicit construction from three unit vectors.

Warning
No checking is done to ensure vx,vy,vz form an orthonormal basis!

◆ Axes3D() [2/3]

BASE_EXPORT Axes3D::Axes3D ( double dip,
double ddir,
double roll = 0.0,
const DVect3 & c = DVect3(0) )
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.

◆ Axes3D() [3/3]

BASE_EXPORT Axes3D::Axes3D ( const Orientation3 & o,
double roll = 0.0,
const DVect3 & c = DVect3(0) )
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.

Member Function Documentation

◆ getRoll()

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.

◆ make() [1/3]

Axes3D Axes3D::make ( const DVect3 & z,
bool normalize,
double roll = 0.0 )
static

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).

◆ make() [2/3]

Axes3D Axes3D::make ( const DVect3 & z,
const DVect3 & x,
bool normalize )
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).

◆ make() [3/3]

Axes3D Axes3D::make ( const Orientation3 & o,
double roll = 0.0 )
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).

◆ makeX() [1/2]

Axes3D Axes3D::makeX ( const DVect3 & x,
bool normalize,
double roll = 0.0 )
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.

◆ makeX() [2/2]

Axes3D Axes3D::makeX ( const Orientation3 & o,
double roll = 0.0 )
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.

◆ re1()

BASE_EXPORT DVect3 & Axes3D::re1 ( )
inline

Reference access to the x direction.

Warning
If you use these - no checks are made to ensure the system remains orthonormal!

◆ re2()

BASE_EXPORT DVect3 & Axes3D::re2 ( )
inline

Reference access to the y direction.

Warning
If you use these - no checks are made to ensure the system remains orthonormal!

◆ re3()

BASE_EXPORT DVect3 & Axes3D::re3 ( )
inline

Reference access to the z direction.

Warning
If you use these - no checks are made to ensure the system remains orthonormal!

◆ setOrientation() [1/2]

void Axes3D::setOrientation ( const Orientation3 & o,
double roll )

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.

◆ setOrientation() [2/2]

void Axes3D::setOrientation ( double dip,
double ddir,
double roll )

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.

◆ setTolerance()

void Axes3D::setTolerance ( double d)
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.


The documentation for this class was generated from the following files: