Program Listing for File RotationMatrix.h#
↰ Return to documentation for file (include/Karana/Math/RotationMatrix.h)
/*
*Copyright(c)2024-2026KaranaDynamicsPtyLtd.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<csignal>
namespaceKarana::Math{
usingnamespaceEigen;
classRotationVector;
classRotationMatrix:publicMat33{
//Constructors
public:
RotationMatrix();
RotationMatrix(constMat33&mat,
boolorthogonalize=false,
boolskip_values_check=false);
RotationMatrix(constRotationVector&rotvec);
//Copyconstructor,moveconstructor,andassignmentoperators
public:
RotationMatrix(constRotationMatrix&rv);
RotationMatrix&operator=(constRotationMatrix&other);
RotationMatrix(RotationMatrix&&rv)noexcept;
RotationMatrix&operator=(RotationMatrix&&other)noexcept;
public:
booloperator==(constRotationMatrix&other);
boolisApprox(constRotationMatrix&other,doubleprec=MATH_EPSILON);
std::stringtypeString()const;
void
setValues(constMat33&mat,boolorthogonalize=false,boolskip_values_check=false);
private:
void_setValues(boolorthogonalize=false,boolskip_values_check=false);
void_isOrthogonal(doubleepsilon=MATH_EPSILON)const;
void_orthogonalize();
};
}//namespaceKarana::Math