13 #ifndef FFA_3D_LOCATION_H
14 #define FFA_3D_LOCATION_H
82 std::array<FaVec3,3>
myL;
153 std::ostream&
print(std::ostream& s,
bool includeNumericalData =
true)
const;
164 #ifdef FFA_INDEXCHECK
166 std::cerr <<
"FFa3DLocation::operator[]: index i="<< i
167 <<
" is out of range [0,2]"<< std::endl;
174 #ifdef FFA_INDEXCHECK
176 std::cerr <<
"FFa3DLocation::operator[]: index i="<< i
177 <<
" is out of range [0,2]"<< std::endl;
Enum variables with text representations.
#define FFaEnumEntryEnd
Defines the end of an enum mapping definition.
Definition: FFaEnum.H:237
#define FFaEnumMapping(EnumType)
Defines the start of an enum mapping definition.
Definition: FFaEnum.H:221
#define FFaEnumEntry(Value, Text)
Adds one entry to the current enum mapping definition.
Definition: FFaEnum.H:234
Point vectors in 3D space.
Class representing an object location in 3D space. This class is used to hold data describing the loc...
Definition: FFa3DLocation.H:34
FFa3DLocation & setPos(PosType p, const FaVec3 &cartPos)
Updates the position in *this.
Definition: FFa3DLocation.C:199
void saveMyNumericalData()
Let this instance save its numerical data.
Definition: FFa3DLocation.H:100
PosType getPosType() const
Returns the positioning type.
Definition: FFa3DLocation.H:113
std::array< FaVec3, 3 > myL
Vectors with position/orientation data.
Definition: FFa3DLocation.H:82
FFa3DLocation & set(PosType p, const FaMat34 &posRelMx, RotType r, const FaMat34 &rotRelMx, const FaMat34 &glbPos)
Updates the location based on the provided parameters.
Definition: FFa3DLocation.C:157
RotType
Enum for orientation representation.
Definition: FFa3DLocation.H:49
@ EUL_Z_Y_X
Euler ZYX-angles. Supposed to be entered [ X, Y, Z].
Definition: FFa3DLocation.H:50
@ PNT_PX_PXY
Point on X-axis and point in XY-plane.
Definition: FFa3DLocation.H:51
@ PNT_PZ_PXZ
Point on Z-axis and point in XZ-plane.
Definition: FFa3DLocation.H:52
@ DIR_EX_EXY
Direction vector along X-axis, direction vector in XY-plane.
Definition: FFa3DLocation.H:53
FaVec3 translation() const
Returns the cartesian position of *this.
Definition: FFa3DLocation.C:282
bool isValid() const
Checks that the current data represent a valid location.
Definition: FFa3DLocation.C:372
const FaVec3 & operator[](int i) const
Indexing operator, for read access.
Definition: FFa3DLocation.H:162
FFa3DLocation & changeRotRefCS(const FaMat34 &newRef, const FaMat34 &oldRef)
Changes the orientation reference CS from oldRef to newRef.
Definition: FFa3DLocation.C:130
std::ostream & print(std::ostream &s, bool includeNumericalData=true) const
Prints the content of *this to the provided output stream.
Definition: FFa3DLocation.C:411
FFa3DLocation & operator=(const FFa3DLocation &m)
Assignment operator.
Definition: FFa3DLocation.C:57
int getNumFields() const
Returns number of numerical fields for defining the orientation.
Definition: FFa3DLocation.H:117
FFa3DLocation()
Default constructor.
Definition: FFa3DLocation.H:88
FaMat33 direction() const
Returns the orientation of *this as a rotation matrix.
Definition: FFa3DLocation.C:319
friend std::ostream & operator<<(std::ostream &s, const FFa3DLocation &m)
Global printing operator.
bool operator==(const FFa3DLocation &m) const
Comparison operator.
Definition: FFa3DLocation.C:73
PosType
Enum for position representation.
Definition: FFa3DLocation.H:38
@ CART_X_Y_Z
Cartesian coordinates.
Definition: FFa3DLocation.H:39
@ CYL_R_YR_X
Cylindric coordinates, angle from Y-axis about X-axis.
Definition: FFa3DLocation.H:40
@ SPH_R_ZR_XY
Spherical coordinates, asimuth angle from Z-axis.
Definition: FFa3DLocation.H:45
@ CYL_R_ZR_Y
Cylindric coordinates, angle from Z-axis about Y-axis.
Definition: FFa3DLocation.H:41
@ SPH_R_XR_YZ
Spherical coordinates, asimuth angle from X-axis.
Definition: FFa3DLocation.H:43
@ CYL_R_XR_Z
Cylindric coordinates, angle from X-axis about Z-axis.
Definition: FFa3DLocation.H:42
@ SPH_R_YR_ZX
Spherical coordinates, asimuth angle from Y-axis.
Definition: FFa3DLocation.H:44
friend std::istream & operator>>(std::istream &s, FFa3DLocation &m)
Global reading operator.
FFa3DLocation(const FFa3DLocation &m)
Copy constructor.
Definition: FFa3DLocation.H:97
PosTypeEnum myPosTyp
Current positioning type.
Definition: FFa3DLocation.H:79
FaMat34 getMatrix() const
Returns a FaMat34 representation of *this.
Definition: FFa3DLocation.C:351
RotTypeEnum myRotTyp
Current orientation type.
Definition: FFa3DLocation.H:80
FFa3DLocation & setRot(RotType r, const FaMat33 &rotMat)
Updates the orientation in *this.
Definition: FFa3DLocation.C:242
bool changeRotType(RotType newType)
Converts the orientation representation in *this to newType.
Definition: FFa3DLocation.C:89
RotType getRotType() const
Returns the orientation type.
Definition: FFa3DLocation.H:115
bool saveNumericalData
If false, only the type enums are stored.
Definition: FFa3DLocation.H:84
FFa3DLocation & changePosRefCS(const FaMat34 &newRef, const FaMat34 &oldRef)
Changes the position reference CS from oldRef to newRef.
Definition: FFa3DLocation.C:104
bool changePosType(PosType newType)
Converts the position representation in *this to newType.
Definition: FFa3DLocation.C:79
Class for point transformations in 3D space.
Definition: FFaMat33.H:27
Class for positions in 3D space.
Definition: FFaMat34.H:32
Class for point vectors in 3D space.
Definition: FFaVec3.H:40
real(dp), dimension(:,:), allocatable m
Definition: inverseModule.f90:38
real(dp), dimension(:), allocatable v0
Definition: inverseModule.f90:26
real(dp), dimension(:), allocatable v1
Definition: inverseModule.f90:27
real(dp), dimension(:), allocatable v2
Definition: inverseModule.f90:28