32 BASE_EXPORT Axes2D(
const DVect2 &vx,
const DVect2 &vy,
bool normalize,
const DVect2 &
c=DVect2(0));
83 BASE_EXPORT void setDir(uint32 dof,
const DVect2 &v);
84 BASE_EXPORT void setDirAuto(uint32 dof,uint32 keepDOF=0xFFFFFFFF);
107 DVect2 c_ = DVect2(0.0, 0.0);
108 DVect2 d1_ = DVect2(1.0, 0.0);
109 DVect2 d2_ = DVect2(0.0, 1.0);
131 BASE_EXPORT Axes3D(
const DVect3 &vx,
const DVect3 &vy,
const DVect3 &vz,
bool normalize,
const DVect3 &
c=DVect3(0));
180 BASE_EXPORT DVect3 &rdof(uint32 dof) {
if (!dof)
return d1_;
else if (dof==1)
return d2_;
else if (dof==2)
return d3_;
else return c_; }
188 BASE_EXPORT void setDir(uint32 dof,
const DVect3 &v);
189 BASE_EXPORT void setDirAuto(uint32 dof,uint32 keepDOF=0xFFFFFFFF);
226 DVect3 c_ = DVect3(0.0, 0.0, 0.0);
227 DVect3 d1_ = DVect3(1.0, 0.0, 0.0);
228 DVect3 d2_ = DVect3(0.0, 1.0, 0.0);
229 DVect3 d3_ = DVect3(0.0, 0.0, 1.0);
Class for specifying a particular 2D cartesian axes system, and converting to and from it.
Definition axes.h:21
static BASE_EXPORT Axes2D makeX(const Orientation2 &o)
Creates an Axes using orientaion o for the +x direction.
BASE_EXPORT Axes2D(const Orientation2 &o, const DVect2 &c=DVect2(0))
Definition axes.h:40
BASE_EXPORT const DAVect2 & toLocal(const DAVect2 &v) const
Convert DAVect2 v from "global" system to this system (identity transformation).
Definition axes.h:76
BASE_EXPORT DVect2 getDir(uint32 dof) const
Return e1 or e2 given degree-of-freedom dof (0-1)
Definition axes.cpp:47
BASE_EXPORT DVect2 & re2()
Definition axes.h:71
BASE_EXPORT DVect2 toGlobal(const DVect2 &v) const
Convert DVect2 v from this system to a "global" system.
Definition axes.cpp:34
BASE_EXPORT Axes2D(double dip, const DVect2 &c=DVect2(0))
Definition axes.h:36
static BASE_EXPORT void setTolerance(double d)
Definition axes.cpp:95
BASE_EXPORT bool operator!=(const Axes2D &a) const
Comparison operator.
Definition axes.h:47
static BASE_EXPORT double getTolerance()
Returns the tolerance used for comparison and detecting "near enough to zero".
Definition axes.cpp:99
BASE_EXPORT void setOrigin(const DVect2 &c)
Specifies a new origin for the axes system.
Definition axes.h:50
BASE_EXPORT constexpr const Axes2D & operator=(const Axes2D &a)
Equality operator.
Definition axes.h:43
BASE_EXPORT void setOrientation(double dip)
Specifies a new orientation for the axes, by dip (in radians).
Definition axes.cpp:16
BASE_EXPORT Axes2D()
Default construction, no initialization of data.
Definition axes.h:24
static BASE_EXPORT Axes2D make(const DVect2 &y, bool normalize)
Creates an Axes using vector y in the +y direction (need not be unit).
Definition axes.cpp:77
BASE_EXPORT Orientation2 getOrientation(uint32 dof=0) const
Returns the equivalent orientation of degree-of-freedom dof (0-1)
Definition axes.cpp:72
BASE_EXPORT DVect2 & rc()
Reference access to the axes origin.
Definition axes.h:65
BASE_EXPORT DVect2 toLocal(const DVect2 &v) const
Convert Dvect2 v from "global" system to this system.
Definition axes.cpp:28
BASE_EXPORT bool operator==(const Axes2D &a) const
Comparison operator.
Definition axes.cpp:40
BASE_EXPORT Axes2D(const Axes2D &a)
Copy constructor.
Definition axes.h:26
static BASE_EXPORT Axes2D makeX(const DVect2 &x, bool normalize)
Creates an Axes using vector x in the +x direction (need not be unit).
Definition axes.cpp:83
static BASE_EXPORT Axes2D make(const Orientation2 &o)
Creates an Axes using orientaion o for the +y direction.
BASE_EXPORT DVect2 & re1()
Definition axes.h:68
BASE_EXPORT const DVect2 & e2() const
The y unit vector.
Definition axes.h:61
BASE_EXPORT const DVect2 & c() const
The origin of the axes system.
Definition axes.h:57
BASE_EXPORT const DVect2 & e1() const
The x unit vector.
Definition axes.h:59
BASE_EXPORT const DAVect2 & toGlobal(const DAVect2 &v) const
Convert DAVect2 v from this system to a "global" system (identity transformation).
Definition axes.h:80
Class for specifying a particular 3D cartesian axes system, and converting to and from it.
Definition axes.h:121
static BASE_EXPORT double getTolerance()
Returns the Tolerance used for comparison and detecting "near enough to zero".
Definition axes.cpp:299
BASE_EXPORT void setOrigin(const DVect3 &c)
Change the origin of the axes sytem.
Definition axes.h:150
static BASE_EXPORT Axes3D make(const DVect3 &z, bool normalize, double roll=0.0)
Definition axes.cpp:253
BASE_EXPORT DVect3 & re3()
Definition axes.h:179
BASE_EXPORT DVect3 & re2()
Definition axes.h:176
BASE_EXPORT Orientation3 getOrientation(uint32 dof=0) const
Returns equivalent orientation of e1, e2, or e2 based on degree-of-freedom (0-2)
Definition axes.cpp:237
BASE_EXPORT Axes3D(const Axes2D &a)
Explicit construction from Axes2D. e3() = (0,0,1).
Definition axes.h:128
BASE_EXPORT DVect3 & rc()
Reference access to the origin of the axes system.
Definition axes.h:170
BASE_EXPORT Axes3D(const Axes3D &a)
Copy constructor.
Definition axes.h:126
static BASE_EXPORT Axes3D makeX(const DVect3 &x, bool normalize, double roll=0.0)
Definition axes.cpp:257
static BASE_EXPORT void setTolerance(double d)
Definition axes.cpp:295
BASE_EXPORT const DVect3 & c() const
The origin of the axes system.
Definition axes.h:161
BASE_EXPORT void setOrientation(double dip, double ddir, double roll)
Definition axes.cpp:141
BASE_EXPORT bool operator==(const Axes3D &a) const
Comparison operator.
Definition axes.cpp:167
BASE_EXPORT const DVect3 & e1() const
The x unit direction.
Definition axes.h:163
BASE_EXPORT bool operator!=(const Axes3D &a) const
Comparison operator.
Definition axes.h:147
BASE_EXPORT Axes3D(const Orientation3 &o, double roll=0.0, const DVect3 &c=DVect3(0))
Definition axes.h:140
BASE_EXPORT Axes3D()
Default constructor, no initialization of data.
Definition axes.h:124
BASE_EXPORT DVect3 toGlobal(const DVect3 &v) const
Converts a vector from this system to a "global" system.
Definition axes.cpp:160
BASE_EXPORT const DVect3 & e2() const
The y unit direction.
Definition axes.h:165
BASE_EXPORT double getRoll() const
Definition axes.cpp:242
BASE_EXPORT const DVect3 & e3() const
The z unit direction.
Definition axes.h:167
BASE_EXPORT constexpr const Axes3D & operator=(const Axes3D &a)
Equality operator.
Definition axes.h:143
BASE_EXPORT DVect3 toLocal(const DVect3 &v) const
Converts a vector from "global" (cartesian) system to this system.
Definition axes.cpp:154
BASE_EXPORT DVect3 & re1()
Definition axes.h:173
BASE_EXPORT DVect3 getDir(uint32 dof) const
Return e1, e2, or e3 based on degree-of-freedom (0-2)
Definition axes.cpp:179
BASE_EXPORT Axes3D(double dip, double ddir, double roll=0.0, const DVect3 &c=DVect3(0))
Definition axes.h:137
Class for storing an "orientation", or a direction in 2D or 3D space.
Definition orientation.h:50
Class for storing an "orientation", or a direction in 2D or 3D space.
Definition orientation.h:99
constexpr Vector3< T > toVect3(const Vector2< T > &v, const T &t=0)
Conversion between vectors of different dimension.
Definition vect.h:341
#define BASE_EXPORT
Definition basedef.h:24
Class for storing an "orientation", or a direction in 2D or 3D space.
2D and 3D vector utility classes.