26 mesh->createVertex(Eigen::Vector3d::Constant(1.0));
27 mesh->createVertex(Eigen::Vector3d::Constant(2.0));
28 mesh->createVertex(Eigen::Vector3d::Constant(3.0));
29 int targetID = mesh->createData(
"TargetData", 1, 0_dataID)->getID();
30 int sourceID = mesh->createData(
"SourceData", 1, 1_dataID)->getID();
31 mesh->allocateDataValues();
33 PythonAction action(PythonAction::WRITE_MAPPING_POST, path,
"TestAction", mesh, targetID, sourceID);
37 mesh->data(sourceID)->setSampleAtTime(1,
time::Sample{1, v});
38 mesh->data(targetID)->setSampleAtTime(1,
time::Sample{1, Eigen::VectorXd::Zero(mesh->nVertices())});
40 action.performAction();
42 Eigen::VectorXd result(3);
43 result << 1.1, 1.2, 1.3;
45 mesh->data(sourceID)->setSampleAtTime(1,
time::Sample{1, Eigen::VectorXd::Zero(mesh->nVertices())});
47 action.performAction();
49 result << 2.0, 2.0, 2.0;
boost::test_tools::predicate_result equals(const std::vector< float > &VectorA, const std::vector< float > &VectorB, float tolerance)
equals to be used in tests. Compares two std::vectors using a given tolerance. Prints both operands o...