Program Listing for File RotationVector.h#
↰ Return to documentation for file (include/Karana/Math/RotationVector.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"
namespaceKarana::Math{
usingnamespaceEigen;
classRotationVector{
//Constructors
public:
RotationVector();
RotationVector(constVec3&vec);
//Copyconstructor,moveconstructor,andassignmentoperators
public:
RotationVector(constRotationVector&rv);
RotationVector&operator=(constRotationVector&other);
RotationVector(RotationVector&&rv)noexcept;
RotationVector&operator=(RotationVector&&other)noexcept;
public:
booloperator==(constRotationVector&other)const;
boolisApprox(constRotationVector&other,doubleprec=MATH_EPSILON);
std::string_viewtypeString()const;
doubleangle()const;
Vec3unitAxis()const;
constVec3&toVec3()const;
voidmakeNotReady();
boolisReady()const;
public:
Vec3ratesToOmega(constVec3&rates,booloframe)const;
Vec3omegaToRates(constVec3&omega,booloframe)const;
Mat33ratesToOmegaMap(booloframe)const;
Mat33omegaToRatesMap(booloframe)const;
MatratesToQuatRatesMap()const;
std::stringdumpString(std::string_viewprefix="",
unsignedintprecision=10,
boolexponential=false)const;
private:
Vec3_coeffs;
};
}//namespaceKarana::Math