DEF-3121 - Starting new animation from inside a "animation completed callback" would previously use the wrong animation for one frame. In the test we register a "completion callback", play one animation forward once, then play another animation once the callback is triggered. We test that the root bone is on the expected position after each animation.
| 1922 | // animation once the callback is triggered. We test that the root bone is on the expected position |
| 1923 | // after each animation. |
| 1924 | static void DEF3121_EventCallback(dmRig::RigEventType event_type, void* event_data, void* user_data1, void* user_data2) |
| 1925 | { |
| 1926 | ASSERT_EQ(dmRig::RIG_EVENT_TYPE_COMPLETED, event_type); |
| 1927 | dmRig::HRigInstance instance = *(dmRig::HRigInstance*)user_data1; |
| 1928 | ASSERT_NE((dmRig::HRigInstance)0x0, instance); |
| 1929 | |
| 1930 | ASSERT_EQ(dmRig::RESULT_OK, dmRig::PlayAnimation(instance, dmHashString64("trans_rot"), dmRig::PLAYBACK_ONCE_FORWARD, 0.0f, 0.0f, 1.0f)); |
| 1931 | } |
| 1932 | |
| 1933 | TEST_F(RigContextTest, DEF_3121) |
| 1934 | { |
nothing calls this directly
no test coverage detected