second good build. Joints
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "Part.h"
|
||||
#include "PartFrame.h"
|
||||
#include "EulerConstraint.h"
|
||||
#include "AbsConstraint.h"
|
||||
#include "MarkerFrame.h"
|
||||
|
||||
@@ -7,9 +8,16 @@ using namespace MbD;
|
||||
|
||||
PartFrame::PartFrame()
|
||||
{
|
||||
aGeu = std::make_shared<EulerConstraint>();
|
||||
aGabs = std::vector<std::shared_ptr<AbsConstraint>>();
|
||||
markerFrames = std::vector<std::shared_ptr<MarkerFrame>>();
|
||||
aGeu = std::make_shared<EulerConstraint>("EulerCon");
|
||||
aGeu->setOwner(this);
|
||||
aGabs = std::make_unique<std::vector<std::shared_ptr<AbsConstraint>>>();
|
||||
markerFrames = std::make_unique<std::vector<std::shared_ptr<MarkerFrame>>>();
|
||||
}
|
||||
MbD::PartFrame::PartFrame(const char* str) : CartesianFrame(str)
|
||||
{
|
||||
}
|
||||
void MbD::PartFrame::initialize()
|
||||
{
|
||||
}
|
||||
void PartFrame::setqX(FullColDptr x) {
|
||||
qX->copy(x);
|
||||
@@ -23,15 +31,21 @@ void PartFrame::setqE(FullColDptr x) {
|
||||
FullColDptr PartFrame::getqE() {
|
||||
return qE;
|
||||
}
|
||||
void PartFrame::setPart(std::shared_ptr<Part> x) {
|
||||
void PartFrame::setPart(Part* x) {
|
||||
part = x;
|
||||
}
|
||||
std::shared_ptr<Part> PartFrame::getPart() {
|
||||
return part.lock();
|
||||
Part* PartFrame::getPart() {
|
||||
return part;
|
||||
}
|
||||
|
||||
void MbD::PartFrame::addMarkerFrame(std::shared_ptr<MarkerFrame> markerFrame)
|
||||
void PartFrame::addMarkerFrame(std::shared_ptr<MarkerFrame> markerFrame)
|
||||
{
|
||||
markerFrame->setPartFrame(this);
|
||||
markerFrames.push_back(markerFrame);
|
||||
markerFrames->push_back(markerFrame);
|
||||
}
|
||||
|
||||
std::shared_ptr<EndFramec> 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user