Files
solver/OndselSolver/CylSphJoint.cpp
aiksiongkoh de8759384c Mb dyn half sine and cosine (#42)
* (int) added

* size_t count

* add files

* MBDyn new joints, sine, cosine

* CompoundJoints debugged
2023-12-13 15:52:16 +01:00

37 lines
1.0 KiB
C++

/***************************************************************************
* Copyright (c) 2023 Ondsel, Inc. *
* *
* This file is part of OndselSolver. *
* *
* See LICENSE file for details about copyright. *
***************************************************************************/
#include "CylSphJoint.h"
#include "CREATE.h"
#include "DistancexyConstraintIJ.h"
#include "System.h"
using namespace MbD;
MbD::CylSphJoint::CylSphJoint()
{
}
MbD::CylSphJoint::CylSphJoint(const char* str) : CompoundJoint(str)
{
}
void MbD::CylSphJoint::initializeGlobally()
{
if (constraints->empty())
{
auto distxyIJ = DistancexyConstraintIJ::With(frmI, frmJ);
distxyIJ->setConstant(distanceIJ);
addConstraint(distxyIJ);
this->root()->hasChanged = true;
}
else {
CompoundJoint::initializeGlobally();
}
}