Files
solver/OndselSolver/ZRotation.cpp
2025-08-12 20:57:08 -05:00

39 lines
1.2 KiB
C++

/***************************************************************************
* Copyright (c) 2023 Ondsel, Inc. *
* *
* This file is part of OndselSolver. *
* *
* See LICENSE file for details about copyright. *
***************************************************************************/
#include "System.h"
#include "ZRotation.h"
#include "FullColumn.h"
#include "DirectionCosineConstraintIJ.h"
#include "EndFrameqc.h"
#include "EndFrameqct.h"
#include "CREATE.h"
using namespace MbD;
ZRotation::ZRotation() {
}
ZRotation::ZRotation(const std::string& str) : PrescribedMotion(str) {
}
void ZRotation::initializeGlobally()
{
if (constraints->empty()) {
initMotions();
auto dirCosCon = CREATE<DirectionCosineConstraintIqcJqc>::ConstraintWith(frmI, frmJ, 1, 0); //Use Iy and Jx to make sin(theta).
addConstraint(dirCosCon);
this->root()->hasChanged = true;
}
else {
PrescribedMotion::initializeGlobally();
}
}