#include "Part.h" #include "PartFrame.h" #include "EulerConstraint.h" #include "AbsConstraint.h" #include "MarkerFrame.h" using namespace MbD; PartFrame::PartFrame() { aGeu = std::make_shared("EulerCon"); aGeu->setOwner(this); aGabs = std::make_unique>>(); markerFrames = std::make_unique>>(); } MbD::PartFrame::PartFrame(const char* str) : CartesianFrame(str) { } void MbD::PartFrame::initialize() { } void PartFrame::setqX(FullColDptr x) { qX->copy(x); } FullColDptr PartFrame::getqX() { return qX; } void PartFrame::setqE(FullColDptr x) { qE->copy(x); } FullColDptr PartFrame::getqE() { return qE; } void PartFrame::setPart(Part* x) { part = x; } Part* PartFrame::getPart() { return part; } void PartFrame::addMarkerFrame(std::shared_ptr markerFrame) { markerFrame->setPartFrame(this); markerFrames->push_back(markerFrame); } std::shared_ptr PartFrame::endFrame(std::string name) { auto match = std::find_if(markerFrames->begin(), markerFrames->end(), [&](auto mkr) {return mkr->getName() == name; }); return (*match)->endFrames->at(0); }