Program Listing for File SubhingeBase.h

Program Listing for File SubhingeBase.h#

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

namespaceKarana::Dynamics{

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

classHingeBase;
classCoordData;

classSubhingeBase:publicCoordBase{

/*foraccessto_parent_hingemember*/
friendclassHingeOnode;
friendclassPhysicalHinge;

//ForaccesstoisOriented.
friendclassCompoundSubhinge;

public:
enumclassSubhingeType{
LOCKED,
PIN,
LINEAR,
LINEAR3,
SPHERICAL,
SPHERICAL_QUAT,
SCREW,
COMPOUND
};

virtual~SubhingeBase();

std::string_viewtypeString()constnoexcept=0;

virtualSubhingeBase::SubhingeTypesubhingeType()const=0;

staticstd::stringsubhingeTypeString(SubhingeBase::SubhingeTypeshtype);

virtualvoidsetPrescribed(boolflag){_prescribed=flag;}

boolgetPrescribed()const{return_prescribed;}

constkc::ks_ptr<HingeBase>&parentHinge()const{return_parent_hinge;}

virtualkm::Matjacobian(constkf::Frame&target,booloriented)const=0;

protected:
SubhingeBase(std::string_viewnm,kc::id_tid,kc::ks_ptr<HingeBase>hge);

protected:
kc::ks_ptr<HingeBase>_parent_hinge=nullptr;

bool_prescribed=false;
};

}//namespaceKarana::Dynamics