EndFrameqct done

This commit is contained in:
Aik-Siong Koh
2023-05-12 21:50:11 -06:00
parent 9ddca433a1
commit c147f2a33d
65 changed files with 514 additions and 166 deletions

View File

@@ -5,17 +5,17 @@
using namespace MbD;
System::System() {
time = std::make_unique<Time>();
parts = std::make_unique<std::vector<std::shared_ptr<Part>>>();
jointsMotions = std::make_unique<std::vector<std::shared_ptr<Joint>>>();
systemSolver = std::make_unique<SystemSolver>(this);
time = std::make_shared<Time>();
parts = std::make_shared<std::vector<std::shared_ptr<Part>>>();
jointsMotions = std::make_shared<std::vector<std::shared_ptr<Joint>>>();
systemSolver = std::make_shared<SystemSolver>(this);
}
System::System(const char* str) : Item(str) {
time = std::make_unique<Time>();
parts = std::make_unique<std::vector<std::shared_ptr<Part>>>();
jointsMotions = std::make_unique<std::vector<std::shared_ptr<Joint>>>();
systemSolver = std::make_unique<SystemSolver>(this);
time = std::make_shared<Time>();
parts = std::make_shared<std::vector<std::shared_ptr<Part>>>();
jointsMotions = std::make_shared<std::vector<std::shared_ptr<Joint>>>();
systemSolver = std::make_shared<SystemSolver>(this);
}
void System::addPart(std::shared_ptr<Part> part)
@@ -61,4 +61,7 @@ void System::initializeLocally()
void System::initializeGlobally()
{
std::for_each(parts->begin(), parts->end(), [](const auto& part) { part->initializeGlobally(); });
std::for_each(jointsMotions->begin(), jointsMotions->end(), [](const auto& joint) { joint->initializeGlobally(); });
systemSolver->initializeGlobally();
}