Program Listing for File PhysicalHinge.h

Program Listing for File PhysicalHinge.h#

Return to documentation for file (include/Karana/SOADyn/PhysicalHinge.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/SOADyn/FramePairHinge.h"
#include<vector>

namespaceKarana::Dynamics{

namespacekc=Karana::Core;

classHingeOnode;
classHingePnode;
classPinSubhinge;
classPhysicalBody;

classPhysicalHinge:publicFramePairHinge{

/*foraccessto_oneTimeTeardownand_oneTimeSetupmethods*/
friendclassPhysicalBody;

/*foraccessto_setupATBIDataCaches*/
friendclassMultibody;

/*foraccessto_invdyn_cache*/
friendclassHingePnode;

/*foraccesstoacorPrime*/
friendclassCompoundSubhinge;

public:
staticconstkc::ks_ptr<PhysicalHinge>
create(PhysicalBody&parent,
PhysicalBody&child,
HingeBase::HingeTypehtype,
conststd::vector<SubhingeBase::SubhingeType>&subhinge_types=
std::vector<SubhingeBase::SubhingeType>());

virtual~PhysicalHinge();

PhysicalHinge(PhysicalBody&parent,
PhysicalBody&child,
std::string_viewname,
HingeBase::HingeTypehtype,
conststd::vector<SubhingeBase::SubhingeType>&subhinge_types=
std::vector<SubhingeBase::SubhingeType>());

std::string_viewtypeString()constnoexceptoverride{returnkc::Base::typeString();}

public:
constkc::ks_ptr<HingePnode>&pnode()const;

constkc::ks_ptr<HingeOnode>&onode()const;

std::stringdumpString(std::string_viewprefix,
constKarana::Core::Base::DumpOptions*options)constoverride;

protected:
void_discard(kc::ks_ptr<Base>&base)override;

void_setupATBIDataCaches();

void_teardownATBIDataCaches();

void_setupInvDynDataCaches();

void_teardownInvDynDataCaches();

//Addingsuppression,asCodeCheckercomplainsthismethodhas
//thesamenameasamethodinthebaseversion.Thisisjusta
//CodeCheckerfalsepositive.
//codechecker_suppress[cppcheck-duplInheritedMember]
void_oneTimeTeardown();

void_changeActionT()override;

km::SpatialVector_acorPrime(constkm::Vec&x_dot_u)const;

private:
kc::ks_ptr<HingeOnode>_onode;
kc::ks_ptr<HingePnode>_pnode;
};

}//namespaceKarana::Dynamics