Skip to content

Commit

Permalink
add a simple tranformmanager unit test
Browse files Browse the repository at this point in the history
this was to test issue #7827
  • Loading branch information
pixelflinger committed May 9, 2024
1 parent 1b38cda commit d87f9b6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions filament/test/filament_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,23 @@ TEST(FilamentTest, SkinningMath) {
}
}

TEST(FilamentTest, TransformManagerSimple) {
filament::FTransformManager tcm;
EntityManager& em = EntityManager::get();
Entity root = em.create();
tcm.create(root);

auto ti = tcm.getInstance(root);

auto t = mat4f::translation(float3{ 1, 2, 3 });
auto prev = tcm.getWorldTransform(ti);
tcm.setTransform(ti, t);
auto updated = tcm.getWorldTransform(ti);

EXPECT_NE(prev, t);
EXPECT_EQ(updated, t);
}

TEST(FilamentTest, TransformManager) {
filament::FTransformManager tcm;
tcm.setAccurateTranslationsEnabled(true);
Expand Down

0 comments on commit d87f9b6

Please sign in to comment.