Program Listing for File CECompoundSubhinge.h

Program Listing for File CECompoundSubhinge.h#

Return to documentation for file (include/Karana/SOADyn/CECompoundSubhinge.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/CompoundSubhinge.h"

namespaceKarana::Dynamics{

namespacekc=Karana::Core;
namespacekm=Karana::Math;

classCompoundHinge;
classCompoundBody;
classPhysicalBody;

classCECompoundSubhinge:publicCompoundSubhinge{

/*foraccessto_setNu()*/
friendclassCECompoundBody;

public:
virtual~CECompoundSubhinge();

voidsetQ(constEigen::Ref<constkm::Vec>&val)override;

voidsetU(constEigen::Ref<constkm::Vec>&val)override;

constkm::Vec&getQ()constoverride;

constkm::Vec&getU()constoverride;

voidsetT(constEigen::Ref<constkm::Vec>&val)override;

constkm::Vec&getT()constoverride;

voidsetUdot(constEigen::Ref<constkm::Vec>&val)override;

constkm::Vec&getUdot()constoverride;

constkm::Vec&getQdot()constoverride;

CECompoundSubhinge(kc::ks_ptr<CompoundHinge>hge,size_tindep_n_u,size_tindep_n_q);

protected:
void_localChartSetQ(constEigen::Ref<constkm::Vec>&val)override;
constkm::Vec&_localChartGetQ()constoverride;

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

km::Vec_getHingeXdotU(PhysicalHinge&hge)constoverride;

constkm::MatatbiCoordMapMatrix()constoverride;

protected:
mutablekm::Mat_dependent_coord_map_matrix;

protected:
size_t_dependents_nU=0;

//needthesebecausethegetQ()etcmethodsneedtoreturnreferences

mutablekm::Vec_getQ_min_cache;

mutablekm::Vec_getQdot_min_cache;

mutablekm::Vec_getU_min_cache;

mutablekm::Vec_getUdot_min_cache;

mutablekm::Vec_getT_min_cache;
};

}//namespaceKarana::Dynamics