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

Class for specifying a particular 2D cartesian axes system, and converting to and from it. More...

#include <caxes.h>

Public Member Functions

BASE_EXPORT CAxes2D ()
 Default construction, no initialization of data.
 
BASE_EXPORT CAxes2D (const CAxes2D &a)
 Copy constructor.
 
BASE_EXPORT CAxes2D (const DVect2 &vx)
 
BASE_EXPORT CAxes2D (const double &dip)
 
BASE_EXPORT CAxes2D (const Orientation2 &o)
 
BASE_EXPORT const CAxes2Doperator= (const CAxes2D &a)
 Equality operator.
 
BASE_EXPORT bool operator== (const CAxes2D &a) const
 Comparison operator.
 
BASE_EXPORT bool operator!= (const CAxes2D &a) const
 Comparison operator.
 
BASE_EXPORT void setOrientation (const double &dip)
 Specifies a new orientation for the axes, by dip (in radians).
 
BASE_EXPORT void setOrientation (const Orientation2 &o)
 Specifies a new orientation for the axes, by orientation.
 
BASE_EXPORT const DVect2 & e1 () const
 The x unit vector.
 
BASE_EXPORT DVect2 e2 () const
 The y unit vector.
 
BASE_EXPORT DVect2 & re1 ()
 
BASE_EXPORT DVect2 toLocal (const DVect2 &v) const
 Convert Dvect2 v from "global" system to this system.
 
BASE_EXPORT const DAVect2 & toLocal (const DAVect2 &v) const
 Convert DAVect2 v from "global" system to this system (identity transformation).
 
BASE_EXPORT DVect2 toGlobal (const DVect2 &v) const
 Convert DVect2 v from this system to a "global" system.
 
BASE_EXPORT const DAVect2 & toGlobal (const DAVect2 &v) const
 Convert DAVect2 v from this system to a "global" system (identity transformation).
 
BASE_EXPORT DVect2 getDir (unsigned int dof) const
 Return e1 or e2 given degree-of-freedom dof (0-1)
 
BASE_EXPORT Orientation2 getOrientation (unsigned int dof=0) const
 Returns the equivalent orientation of degree-of-freedom dof (0-1)
 

Static Public Member Functions

static BASE_EXPORT CAxes2D make (const DVect2 &y)
 Creates an Axes using vector y in the +y direction (need not be unit).
 
static BASE_EXPORT CAxes2D makeX (const DVect2 &x)
 Creates an Axes using vector x in the +x direction (need not be unit).
 
static BASE_EXPORT CAxes2D make (const Orientation2 &o)
 Creates an Axes using orientaion o for the +y direction.
 
static BASE_EXPORT CAxes2D makeX (const Orientation2 &o)
 Creates an Axes using orientaion o for the +x direction.
 
static BASE_EXPORT void setTolerance (const double &d)
 

Detailed Description

Class for specifying a particular 2D 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 2D 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.

Constructor & Destructor Documentation

◆ CAxes2D() [1/3]

CAxes2D::CAxes2D ( const DVect2 & vx)

Explicit constructor from two unit vectors

Parameters
vxThe local x direction

◆ CAxes2D() [2/3]

BASE_EXPORT CAxes2D::CAxes2D ( const double & dip)
inlineexplicit

Explicit contructor from dip

Parameters
dipIn radians. See the Orientation2 class for a defintion of dip.

◆ CAxes2D() [3/3]

BASE_EXPORT CAxes2D::CAxes2D ( const Orientation2 & o)
inlineexplicit

Explicit contructor from Orientation2

Parameters
oOrientation of axes relative to global.

Member Function Documentation

◆ re1()

BASE_EXPORT DVect2 & CAxes2D::re1 ( )
inline

Reference access to the axis x-direction.

Warning
If you use this, no check is made to ensure e1 and e2 are orthonormal!

◆ setTolerance()

void CAxes2D::setTolerance ( const 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 CompactAxes and Axes objects.


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