FEDEM Solver  R8.0
Source code of the dynamics solver
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
FFa3DLocation Class Reference

#include <FFa3DLocation.H>

Collaboration diagram for FFa3DLocation:
Collaboration graph
[legend]

Public Types

enum  PosType {
  CART_X_Y_Z , CYL_R_YR_X , CYL_R_ZR_Y , CYL_R_XR_Z ,
  SPH_R_XR_YZ , SPH_R_YR_ZX , SPH_R_ZR_XY
}
 
enum  RotType { EUL_Z_Y_X , PNT_PX_PXY , PNT_PZ_PXZ , DIR_EX_EXY }
 

Public Member Functions

 FFa3DLocation (bool saveNumericalData=true)
 
 FFa3DLocation (PosType t, const FaVec3 &v0, RotType r, const FaVec3 &v1, const FaVec3 &v2)
 
 FFa3DLocation (PosType t, const FaVec3 &v0, RotType r, const FaVec3 &v1)
 
 FFa3DLocation (const FFa3DLocation &m)
 
 FFa3DLocation (const FaMat34 &m)
 
void setSaveNumericalData (bool doSave)
 
FFa3DLocationoperator= (const FFa3DLocation &m)
 
FFa3DLocationoperator= (const FaMat34 &m)
 
bool operator== (const FFa3DLocation &m) const
 
bool operator!= (const FFa3DLocation &m) const
 
bool isCoincident (const FFa3DLocation &m, double tolerance=1.0e-7) const
 
const FaVec3operator[] (int i) const
 
FaVec3operator[] (int i)
 
PosType getPosType () const
 
RotType getRotType () const
 
int getNumFields () const
 
FFa3DLocationchangePosType (PosType newType)
 
FFa3DLocationchangeRotType (RotType newType)
 
FFa3DLocationchangePosRefCS (const FaMat34 &newRef, const FaMat34 &oldRef)
 
FFa3DLocationchangeRotRefCS (const FaMat34 &newRef, const FaMat34 &oldRef)
 
FFa3DLocationset (PosType p, const FaMat34 &posRelMx, RotType r, const FaMat34 &rotRelMx, const FaMat34 &glbPos)
 
FFa3DLocationset (PosType p, RotType r, const FaMat34 &glbPos)
 
FFa3DLocationsetPos (PosType p, const FaVec3 &cartPos)
 
FFa3DLocationsetRot (RotType r, const FaMat33 &rotMat)
 
FaVec3 translation () const
 
FaMat33 direction () const
 
FaMat34 getMatrix () const
 
FaMat34 getMatrix (const FaMat34 &posRelMx, const FaMat34 &rotRelMx) const
 
FFa3DLocationsetIdentity ()
 
bool isValid () const
 

Private Member Functions

 FFaEnumMapping (PosType)
 
 FFaEnumMapping (RotType)
 

Private Attributes

bool saveMyNumericalData
 If false, only the type enums are saved. More...
 
FaVec3 myL [3]
 
PosTypeEnum myPosTyp
 
RotTypeEnum myRotTyp
 

Friends

std::ostream & operator<< (std::ostream &s, const FFa3DLocation &m)
 
std::istream & operator>> (std::istream &s, FFa3DLocation &m)
 

Member Enumeration Documentation

◆ PosType

Enumerator
CART_X_Y_Z 

Cartesian coordinates.

CYL_R_YR_X 

Cylindric coordinates, angle from Y-axis about X-axis.

CYL_R_ZR_Y 

Cylindric coordinates, angle from Z-axis about Y-axis.

CYL_R_XR_Z 

Cylindric coordinates, angle from X-axis about Z-axis.

SPH_R_XR_YZ 

Spherical coordinates, asimuth angle from X-axis.

SPH_R_YR_ZX 

Spherical coordinates, asimuth angle from Y-axis.

SPH_R_ZR_XY 

Spherical coordinates, asimuth angle from Z-axis.

◆ RotType

Enumerator
EUL_Z_Y_X 

Euler ZYX-angles. Supposed to be entered [ X, Y, Z].

PNT_PX_PXY 

Point on X-axis and point in XY-plane.

PNT_PZ_PXZ 

Point on Z-axis and point in XZ-plane.

DIR_EX_EXY 

Direction vector along X-axis, direction vector in XY-plane.

Constructor & Destructor Documentation

◆ FFa3DLocation() [1/5]

FFa3DLocation::FFa3DLocation ( bool  saveNumericalData = true)

Constructors.

◆ FFa3DLocation() [2/5]

FFa3DLocation::FFa3DLocation ( PosType  t,
const FaVec3 v0,
RotType  r,
const FaVec3 v1,
const FaVec3 v2 
)

◆ FFa3DLocation() [3/5]

FFa3DLocation::FFa3DLocation ( PosType  t,
const FaVec3 v0,
RotType  r,
const FaVec3 v1 
)

◆ FFa3DLocation() [4/5]

FFa3DLocation::FFa3DLocation ( const FFa3DLocation m)
inline

◆ FFa3DLocation() [5/5]

FFa3DLocation::FFa3DLocation ( const FaMat34 m)

Member Function Documentation

◆ changePosRefCS()

FFa3DLocation & FFa3DLocation::changePosRefCS ( const FaMat34 newRef,
const FaMat34 oldRef 
)

Changes the imaginary reference CS for the translation numbers stored in this 3DLocation to newRef from oldRef. It is only a convenience method.

◆ changePosType()

FFa3DLocation & FFa3DLocation::changePosType ( PosType  newType)

Converts the position representation in *this to the provided type.

◆ changeRotRefCS()

FFa3DLocation & FFa3DLocation::changeRotRefCS ( const FaMat34 newRef,
const FaMat34 oldRef 
)

Changes the imaginary reference CS for the rotation numbers stored in this 3DLocation to newRef from oldRef. It is only a convenience method.

◆ changeRotType()

FFa3DLocation & FFa3DLocation::changeRotType ( RotType  newType)

Converts the rotational representation in *this to the provided type.

◆ direction()

FaMat33 FFa3DLocation::direction ( ) const

Returns the rotation of this 3DLocation as a rotation matrix.

◆ FFaEnumMapping() [1/2]

FFa3DLocation::FFaEnumMapping ( PosType  )
inlineprivate

◆ FFaEnumMapping() [2/2]

FFa3DLocation::FFaEnumMapping ( RotType  )
inlineprivate

◆ getMatrix() [1/2]

FaMat34 FFa3DLocation::getMatrix ( ) const

Get a FaMat34 representation of the 3DLocation.

◆ getMatrix() [2/2]

FaMat34 FFa3DLocation::getMatrix ( const FaMat34 posRelMx,
const FaMat34 rotRelMx 
) const

Utility method that returns a FaMat34 that represents the global position of this 3DLocation data if this is placed relative to the two matrices provided.

return FaMat34([rotRelMx * 3DLoc.rotation], [posRelMx * 3DLoc.pos])

◆ getNumFields()

int FFa3DLocation::getNumFields ( ) const

Returns the number of active fields in this 3DLocation. Depends on the rotation type set.

◆ getPosType()

PosType FFa3DLocation::getPosType ( ) const
inline

◆ getRotType()

RotType FFa3DLocation::getRotType ( ) const
inline

◆ isCoincident()

bool FFa3DLocation::isCoincident ( const FFa3DLocation m,
double  tolerance = 1.0e-7 
) const

◆ isValid()

bool FFa3DLocation::isValid ( ) const

Check that the current data represent a valid location.

◆ operator!=()

bool FFa3DLocation::operator!= ( const FFa3DLocation m) const
inline

◆ operator=() [1/2]

FFa3DLocation & FFa3DLocation::operator= ( const FaMat34 m)

◆ operator=() [2/2]

FFa3DLocation & FFa3DLocation::operator= ( const FFa3DLocation m)

Local operators.

◆ operator==()

bool FFa3DLocation::operator== ( const FFa3DLocation m) const
inline

◆ operator[]() [1/2]

FaVec3 & FFa3DLocation::operator[] ( int  i)
inline

◆ operator[]() [2/2]

const FaVec3 & FFa3DLocation::operator[] ( int  i) const
inline

◆ set() [1/2]

FFa3DLocation & FFa3DLocation::set ( PosType  p,
const FaMat34 posRelMx,
RotType  r,
const FaMat34 rotRelMx,
const FaMat34 globalPosition 
)

Sets this to contain the position of globalPosition relative to posRelMx stored as type p, and the rotation of globalPosition relative to rotRelMx stored as type r.

◆ set() [2/2]

FFa3DLocation & FFa3DLocation::set ( PosType  p,
RotType  r,
const FaMat34 mx 
)

Sets this to be positioned and rotated as the provided matrix mx, converting it to the provided storage types as needed.

◆ setIdentity()

FFa3DLocation& FFa3DLocation::setIdentity ( )
inline

◆ setPos()

FFa3DLocation & FFa3DLocation::setPos ( PosType  p,
const FaVec3 cartPos 
)

Sets translaton of this to the provided cartesian position cartPos, converting it to PosType p way of storing it.

◆ setRot()

FFa3DLocation & FFa3DLocation::setRot ( RotType  r,
const FaMat33 rotMat 
)

Sets rotation of this to the provided matrix rotation rotMat, converting it to RotType r way of storing it. The translation of the matrix is ignored. When needed, the current position is fetched by calling this->translation().

◆ setSaveNumericalData()

void FFa3DLocation::setSaveNumericalData ( bool  doSave)
inline

◆ translation()

FaVec3 FFa3DLocation::translation ( ) const

Returns the cartesian position of this 3DLocation.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  s,
const FFa3DLocation m 
)
friend

◆ operator>>

std::istream& operator>> ( std::istream &  s,
FFa3DLocation m 
)
friend

Member Data Documentation

◆ myL

FaVec3 FFa3DLocation::myL[3]
private

◆ myPosTyp

PosTypeEnum FFa3DLocation::myPosTyp
private

◆ myRotTyp

RotTypeEnum FFa3DLocation::myRotTyp
private

◆ saveMyNumericalData

bool FFa3DLocation::saveMyNumericalData
private

If false, only the type enums are saved.


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