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

Class for storing an "orientation", or a direction in 2D or 3D space. More...

#include <orientation.h>

Public Member Functions

BASE_EXPORT Orientation2 ()
 Default constructor – defaults to +Y is (0,1), defined by normal.
 
BASE_EXPORT Orientation2 (const DVect2 &dv2)
 
BASE_EXPORT Orientation2 (const double &dip)
 Explicit constructor, orientation defined by dip (in radians).
 
BASE_EXPORT bool operator== (const Orientation2 &o) const
 Equality operator.
 
BASE_EXPORT bool operator!= (const Orientation2 &o) const
 
BASE_EXPORT const DVect2 & getNormal () const
 Returns the unit normal vector of the orientation.
 
BASE_EXPORT const DVect2 & getNormalUser () const
 Returns the normal vector as specified by the user, not necessarily of unit lengths.
 
BASE_EXPORT double getDip () const
 Returns the equivalent dip angle (in radians).
 
BASE_EXPORT bool wasDefinedByNormal () const
 Returs true if the orientation was specific by a normal vector, false if it was specified by dip.
 
BASE_EXPORT double getJointAngle () const
 Returns the joing angle of this orientation, in radians.
 
BASE_EXPORT void setNormal (const DVect2 &norm)
 Sets the orientation by normal. norm need not be a unit vector.
 
BASE_EXPORT void setDip (const double &dip)
 Sets the orientaion by dip (in radians).
 
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.
 

Static Public Member Functions

static BASE_EXPORT DVect2 getNormFromDip (const double &dip)
 Converts from a dip (in radians) to a normal vector.
 
static BASE_EXPORT double getDipFromNorm (const DVect2 &norm)
 Converts from a normal vector (need not be unit) to a dip in radians.
 
static BASE_EXPORT DVect2 getNormFromJointAngle (const double &ja)
 Converts from a joint angle (in radians) to a normal vector.
 
static BASE_EXPORT double getJointAngleFromNorm (const DVect2 &norm)
 Converts from a normal vector (need not be unit) to a joint angle in radians.
 

Detailed Description

Class for storing an "orientation", or a direction in 2D or 3D space.

Orientations can be viewed as defining either a normal direction, or a plane in space normal to that direction.
2D orientations are specified by either a plane dip angle (clockwise from +X) or a normal vector.
3D orientations are specified by a dip angle (clockwise from XY plane) and a dip direction (steepest Z descent line projected onto XY plane, clockwise from +Y).

3D orientation objects remember if they were specified with dip/dd or normal.

The original data specified (non-normalized direction vector, dip/dd outside range) is retained, so that it can be changed/updated by the user on a component basis.

For historical (3DEC) reasons, an orientation has a global Left Handed System mode — which changes the 3D definition of dip and dip direction.

An Orientation can also return a "joint angle", which is defined as the intersection of the plane with the xy plane, measured positive counter-clockwise from x. In 2D the joint angle is the negative of the dip. Note that "joint angle" can not fully specify a normal vector, because it has no concept of a side; thus, a joint angle of 45 is equivalent to a joint angle of 225. Joint angles are always returned in the range 0 to 180.

An "Azimuth" of a 3D normal vector is the clockwise-angle from +Y projected onto the XY plane. In a LHS system, the YZ axes are swapped.
A "Plunge" of a 3D normal vector is the angle between the vector and the XY plane. In a LHS system, the YZ axes are swapped.

Note
Orientation2 relies on the default (compiler supplied) copy contructor and = operator.

Constructor & Destructor Documentation

◆ Orientation2()

BASE_EXPORT Orientation2::Orientation2 ( const DVect2 & dv2)
inlineexplicit

Explicit constructor, defines the normal. dv2 need not be a unit vector.


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