qadmesh affine transform parenting

This commit is contained in:
AndreaRigoni
2026-03-19 12:54:31 +00:00
parent 887b3b36f0
commit 4cb4560921
9 changed files with 103 additions and 33 deletions

View File

@@ -47,5 +47,17 @@ int main() {
ASSERT_EQ(mesh.Points().size(), 4);
ASSERT_EQ(mesh.Quads().size(), 1);
// Test transformation
mesh.Translate(Vector3f(10, 20, 30));
Vector3f p0 = mesh.GetPoint(0);
TEST1( (p0 - Vector3f(10, 20, 30)).norm() < 1e-6 );
// Test AddPoint during transformation
mesh.AddPoint(Vector3f(11, 21, 31)); // Should be stored as (1, 1, 1) locally
Id_t lastId = mesh.Points().size() - 1;
TEST1( (mesh.Points().at(lastId) - Vector3f(1, 1, 1)).norm() < 1e-5 );
mesh.PrintSelf(std::cout);
END_TESTING;
}