qadmesh affine transform parenting
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user