Files
solver/OndselSolver/RotationLimitIJ.cpp
2024-04-03 08:56:40 +02:00

26 lines
570 B
C++

#include "RotationLimitIJ.h"
#include "AngleZConstraintIJ.h"
#include "System.h"
using namespace MbD;
std::shared_ptr<RotationLimitIJ> MbD::RotationLimitIJ::With()
{
auto rotationLimit = std::make_shared<RotationLimitIJ>();
rotationLimit->initialize();
return rotationLimit;
}
void MbD::RotationLimitIJ::initializeGlobally()
{
if (constraints->empty()) {
auto angleZConIJ = AngleZConstraintIJ::With(frmI, frmJ);
angleZConIJ->setConstant(limit);
addConstraint(angleZConIJ);
this->root()->hasChanged = true;
}
else {
LimitIJ::initializeGlobally();
}
}