Program Listing for File HomTran.h#
↰ Return to documentation for file (include/Karana/Math/HomTran.h)
/*
*Copyright(c)2024-2025KaranaDynamicsPtyLtd.Allrightsreserved.
*
*NOTICETOUSER:
*
*Thissourcecodeand/ordocumentation(the"LicensedMaterials")is
*theconfidentialandproprietaryinformationofKaranaDynamicsInc.
*UseoftheseLicensedMaterialsisgovernedbythetermsandconditions
*ofaseparatesoftwarelicenseagreementbetweenKaranaDynamicsandthe
*Licensee("LicenseAgreement").Unlessexpresslypermittedunderthat
*agreement,anyreproduction,modification,distribution,ordisclosure
*oftheLicensedMaterials,inwholeorinpart,toanythirdparty
*withoutthepriorwrittenconsentofKaranaDynamicsisstrictlyprohibited.
*
*THELICENSEDMATERIALSAREPROVIDED"ASIS"WITHOUTWARRANTYOFANYKIND.
*KARANADYNAMICSDISCLAIMSALLWARRANTIES,EXPRESSORIMPLIED,INCLUDING
*BUTNOTLIMITEDTOWARRANTIESOFMERCHANTABILITY,NON-INFRINGEMENT,AND
*FITNESSFORAPARTICULARPURPOSE.
*
*INNOEVENTSHALLKARANADYNAMICSBELIABLEFORANYDAMAGESWHATSOEVER,
*INCLUDINGBUTNOTLIMITEDTOLOSSOFPROFITS,DATA,ORUSE,EVENIF
*ADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGES,WHETHERINCONTRACT,TORT,
*OROTHERWISEARISINGOUTOFORINCONNECTIONWITHTHELICENSEDMATERIALS.
*
*U.S.GovernmentEndUsers:TheLicensedMaterialsarea"commercialitem"
*asdefinedat48C.F.R.2.101,andareprovidedtotheU.S.Government
*onlyasacommercialenditemunderthetermsofthislicense.
*
*AnyuseoftheLicensedMaterialsinindividualorcommercialsoftwaremust
*include,intheuserdocumentationandinternalsourcecodecomments,
*thisNotice,Disclaimer,andU.S.GovernmentUseProvision.
*/
#pragmaonce
#include"Karana/Math/Defs.h"
#include"Karana/Math/SpatialVector.h"
#include"Karana/Math/UnitQuaternion.h"
namespaceKarana::Math{
usingnamespaceEigen;
classHomTran{
public:
HomTran();
HomTran(constVec3&vec,doubleepsilon=MATH_EPSILON);
HomTran(constUnitQuaternion&q,doubleepsilon=MATH_EPSILON);
HomTran(constUnitQuaternion&q,constVec3&vec,doubleepsilon=MATH_EPSILON);
HomTran(constHomTran&T);
HomTran&operator=(constHomTran&T);
HomTran(HomTran&&T)noexcept;
HomTran&operator=(HomTran&&T)noexcept;
booloperator==(constHomTran&other)const;
boolisApprox(constHomTran&other,doubleprec=MATH_EPSILON)const;
std::string_viewtypeString()const;
voidsetTranslation(constVec3&vec,doubleepsilon=MATH_EPSILON);
voiduninitialize();
boolisInitialized()const;
std::stringdumpString(std::string_viewprefix="",
unsignedintprecision=6,
boolexponential=false)const;
voiddump(std::string_viewprefix="",
unsignedintprecision=10,
boolexponential=false)const;
voidsetUnitQuaternion(constUnitQuaternion&q,doubleepsilon=MATH_EPSILON);
Mat44getMatrix()const;
constVec3&getTranslation()const;
constUnitQuaternion&getUnitQuaternion()const;
Vec6toVector6()const;
voidsetIdentity();
boolisIdentity()const;
boolhasTranslation()const;
boolhasRotation()const;
HomTranoperator*(constHomTran&T)const;
Vec3operator*(constVec3&v)const;
HomTraninverse()const;
SpatialVectorphi(constSpatialVector&V)const;
SpatialVectorphiVec(constVec6&V)const;
Mat6nphiMat(constMat6n&m)const;
Mat66phiSymmetric(constMat66&m)const;
SpatialVectorphiStar(constSpatialVector&V)const;
SpatialVectorphiStarVec(constVec6&V)const;
Mat6nphiStarMat(constMat6n&m)const;
Mat66phiStarSymmetric(constMat66&m)const;
constMat66&phiMatrix()const;
private:
void_updatePhiMatrix()const;
void_checkUnitQuaternion(doubleepsilon=MATH_EPSILON);
void_checkTranslation(doubleepsilon=MATH_EPSILON);
UnitQuaternion_q=UnitQuaternion(0,0,0,1,false,true);
Vec3_vec=Vec3(0,0,0);
bool_has_rotation=false,
_has_translation=false;
mutablebool_cached_phi_matrix_flag=false;
mutableMat66_cached_phi_matrix;
};
}//namespaceKarana::Math