We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node property is updated by LogicEngine::update() call even after it has been unlinked.
The last EXPECT_EQ in the test below fails.
std::vector<float> get_node_translation(ramses::Node* node) { float x, y, z; node->getTranslation(x, y, z); return {x, y, z}; } TEST(ramses_logic, linkUnlink_nodeBinding_single) { rlogic::LogicEngine logicEngine; ramses::RamsesFramework ramsesFramework; ramses::RamsesClient& client = *ramsesFramework.createClient("example client"); ramses::Scene* scene = client.createScene(ramses::sceneId_t(123u), ramses::SceneConfig(), "some scene"); ramses::Node* node = scene->createNode("some node"); auto* outScript = logicEngine.createLuaScriptFromSource(R"( function interface() IN.in_float = FLOAT OUT.out_vec3f = VEC3F end function run() OUT.out_vec3f = { IN.in_float, 0.0, 0.0 } end )"); auto* binding = logicEngine.createRamsesNodeBinding("some node binding"); binding->setRamsesNode(node); const rlogic::Property* nodeTranslation{binding->getInputs()->getChild("translation")}; ASSERT_TRUE(nodeTranslation != nullptr); const rlogic::Property* scriptOutVec3f{outScript->getOutputs()->getChild("out_vec3f")}; ASSERT_TRUE(scriptOutVec3f != nullptr); ASSERT_TRUE(logicEngine.link(*scriptOutVec3f, *nodeTranslation)); outScript->getInputs()->getChild("in_float")->set(1.0f); ASSERT_TRUE(logicEngine.update()); EXPECT_EQ(get_node_translation(node), std::vector<float>({1.0, 0.0, 0.0})); ASSERT_TRUE(logicEngine.unlink(*scriptOutVec3f, *nodeTranslation)); node->setTranslation(2.0, 3.0, 4.0); EXPECT_EQ(get_node_translation(node), std::vector<float>({2.0, 3.0, 4.0})); ASSERT_TRUE(logicEngine.update()); EXPECT_EQ(get_node_translation(node), std::vector<float>({2.0, 3.0, 4.0})); }
The text was updated successfully, but these errors were encountered:
Should be fixed since v0.4.2
Sorry, something went wrong.
No branches or pull requests
Node property is updated by LogicEngine::update() call even after it has been unlinked.
The last EXPECT_EQ in the test below fails.
The text was updated successfully, but these errors were encountered: