|
|
|
@ -177,13 +177,13 @@ void AnimationDataTest::construct() { |
|
|
|
|
|
|
|
|
|
|
|
const int state = 5; |
|
|
|
const int state = 5; |
|
|
|
AnimationData data{std::move(buffer), { |
|
|
|
AnimationData data{std::move(buffer), { |
|
|
|
{AnimationTrackTargetType::Translation3D, 42, |
|
|
|
AnimationTrackData{AnimationTrackTargetType::Translation3D, 42, |
|
|
|
Animation::TrackView<const Float, const Vector3>{ |
|
|
|
Animation::TrackView<const Float, const Vector3>{ |
|
|
|
{view, &view[0].time, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].time, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].position, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].position, view.size(), sizeof(Data)}, |
|
|
|
Animation::Interpolation::Constant, |
|
|
|
Animation::Interpolation::Constant, |
|
|
|
animationInterpolatorFor<Vector3>(Animation::Interpolation::Constant)}}, |
|
|
|
animationInterpolatorFor<Vector3>(Animation::Interpolation::Constant)}}, |
|
|
|
{AnimationTrackTargetType::Rotation3D, 1337, |
|
|
|
AnimationTrackData{AnimationTrackTargetType::Rotation3D, 1337, |
|
|
|
Animation::TrackView<const Float, const Quaternion>{ |
|
|
|
Animation::TrackView<const Float, const Quaternion>{ |
|
|
|
{view, &view[0].time, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].time, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].rotation, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].rotation, view.size(), sizeof(Data)}, |
|
|
|
@ -245,12 +245,12 @@ void AnimationDataTest::constructImplicitDuration() { |
|
|
|
|
|
|
|
|
|
|
|
const int state = 5; |
|
|
|
const int state = 5; |
|
|
|
AnimationData data{std::move(buffer), { |
|
|
|
AnimationData data{std::move(buffer), { |
|
|
|
{AnimationTrackTargetType(129), 0, |
|
|
|
AnimationTrackData{AnimationTrackTargetType(129), 0, |
|
|
|
Animation::TrackView<const Float, const bool>{ |
|
|
|
Animation::TrackView<const Float, const bool>{ |
|
|
|
{view, &view[0].time, 2, sizeof(Data)}, |
|
|
|
{view, &view[0].time, 2, sizeof(Data)}, |
|
|
|
{view, &view[0].value, 2, sizeof(Data)}, |
|
|
|
{view, &view[0].value, 2, sizeof(Data)}, |
|
|
|
Animation::Interpolation::Constant}}, |
|
|
|
Animation::Interpolation::Constant}}, |
|
|
|
{AnimationTrackTargetType(130), 1, |
|
|
|
AnimationTrackData{AnimationTrackTargetType(130), 1, |
|
|
|
Animation::TrackView<const Float, const bool>{ |
|
|
|
Animation::TrackView<const Float, const bool>{ |
|
|
|
{view, &view[2].time, 2, sizeof(Data)}, |
|
|
|
{view, &view[2].time, 2, sizeof(Data)}, |
|
|
|
{view, &view[2].value, 2, sizeof(Data)}, |
|
|
|
{view, &view[2].value, 2, sizeof(Data)}, |
|
|
|
@ -313,7 +313,7 @@ void AnimationDataTest::constructNotOwned() { |
|
|
|
|
|
|
|
|
|
|
|
const int state = 5; |
|
|
|
const int state = 5; |
|
|
|
AnimationData data{instanceData.dataFlags, keyframes, { |
|
|
|
AnimationData data{instanceData.dataFlags, keyframes, { |
|
|
|
{AnimationTrackTargetType::Translation3D, 42, |
|
|
|
AnimationTrackData{AnimationTrackTargetType::Translation3D, 42, |
|
|
|
Animation::TrackView<const Float, const Vector3>{ |
|
|
|
Animation::TrackView<const Float, const Vector3>{ |
|
|
|
keyframes, |
|
|
|
keyframes, |
|
|
|
Animation::Interpolation::Constant, |
|
|
|
Animation::Interpolation::Constant, |
|
|
|
@ -361,7 +361,7 @@ void AnimationDataTest::constructImplicitDurationNotOwned() { |
|
|
|
|
|
|
|
|
|
|
|
const int state = 5; |
|
|
|
const int state = 5; |
|
|
|
AnimationData data{instanceData.dataFlags, keyframes, { |
|
|
|
AnimationData data{instanceData.dataFlags, keyframes, { |
|
|
|
{AnimationTrackTargetType(129), 0, |
|
|
|
AnimationTrackData{AnimationTrackTargetType(129), 0, |
|
|
|
Animation::TrackView<const Float, const bool>{keyframes, Animation::Interpolation::Constant}}, |
|
|
|
Animation::TrackView<const Float, const bool>{keyframes, Animation::Interpolation::Constant}}, |
|
|
|
}, &state}; |
|
|
|
}, &state}; |
|
|
|
|
|
|
|
|
|
|
|
@ -433,13 +433,13 @@ void AnimationDataTest::constructMove() { |
|
|
|
|
|
|
|
|
|
|
|
const int state = 5; |
|
|
|
const int state = 5; |
|
|
|
AnimationData a{std::move(buffer), { |
|
|
|
AnimationData a{std::move(buffer), { |
|
|
|
{AnimationTrackTargetType::Translation3D, 42, |
|
|
|
AnimationTrackData{AnimationTrackTargetType::Translation3D, 42, |
|
|
|
Animation::TrackView<const Float, const Vector3>{ |
|
|
|
Animation::TrackView<const Float, const Vector3>{ |
|
|
|
{view, &view[0].time, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].time, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].position, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].position, view.size(), sizeof(Data)}, |
|
|
|
Animation::Interpolation::Constant, |
|
|
|
Animation::Interpolation::Constant, |
|
|
|
animationInterpolatorFor<Vector3>(Animation::Interpolation::Constant)}}, |
|
|
|
animationInterpolatorFor<Vector3>(Animation::Interpolation::Constant)}}, |
|
|
|
{AnimationTrackTargetType::Rotation3D, 1337, |
|
|
|
AnimationTrackData{AnimationTrackTargetType::Rotation3D, 1337, |
|
|
|
Animation::TrackView<const Float, const Quaternion>{ |
|
|
|
Animation::TrackView<const Float, const Quaternion>{ |
|
|
|
{view, &view[0].time, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].time, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].rotation, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].rotation, view.size(), sizeof(Data)}, |
|
|
|
@ -522,7 +522,7 @@ void AnimationDataTest::mutableAccessNotAllowed() { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
AnimationData data{{}, keyframes, { |
|
|
|
AnimationData data{{}, keyframes, { |
|
|
|
{AnimationTrackTargetType(129), 0, |
|
|
|
AnimationTrackData{AnimationTrackTargetType(129), 0, |
|
|
|
Animation::TrackView<const Float, const bool>{keyframes, Animation::Interpolation::Constant}}, |
|
|
|
Animation::TrackView<const Float, const bool>{keyframes, Animation::Interpolation::Constant}}, |
|
|
|
}}; |
|
|
|
}}; |
|
|
|
CORRADE_COMPARE(data.dataFlags(), DataFlags{}); |
|
|
|
CORRADE_COMPARE(data.dataFlags(), DataFlags{}); |
|
|
|
@ -551,7 +551,7 @@ void AnimationDataTest::trackCustomResultType() { |
|
|
|
view[1] = {5.0f, {30, 60, 100}}; |
|
|
|
view[1] = {5.0f, {30, 60, 100}}; |
|
|
|
|
|
|
|
|
|
|
|
AnimationData data{std::move(buffer), { |
|
|
|
AnimationData data{std::move(buffer), { |
|
|
|
{AnimationTrackTargetType::Scaling3D, 0, |
|
|
|
AnimationTrackData{AnimationTrackTargetType::Scaling3D, 0, |
|
|
|
Animation::TrackView<const Float, const Vector3i, Vector3>{ |
|
|
|
Animation::TrackView<const Float, const Vector3i, Vector3>{ |
|
|
|
{view, &view[0].time, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].time, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].position, view.size(), sizeof(Data)}, |
|
|
|
{view, &view[0].position, view.size(), sizeof(Data)}, |
|
|
|
@ -587,7 +587,7 @@ void AnimationDataTest::trackWrongType() { |
|
|
|
Error redirectError{&out}; |
|
|
|
Error redirectError{&out}; |
|
|
|
|
|
|
|
|
|
|
|
AnimationData data{nullptr, { |
|
|
|
AnimationData data{nullptr, { |
|
|
|
{AnimationTrackType::Vector3i, |
|
|
|
AnimationTrackData{AnimationTrackType::Vector3i, |
|
|
|
AnimationTrackType::Vector3, |
|
|
|
AnimationTrackType::Vector3, |
|
|
|
AnimationTrackTargetType::Scaling3D, 0, {}} |
|
|
|
AnimationTrackTargetType::Scaling3D, 0, {}} |
|
|
|
}}; |
|
|
|
}}; |
|
|
|
@ -602,7 +602,7 @@ void AnimationDataTest::trackWrongResultType() { |
|
|
|
Error redirectError{&out}; |
|
|
|
Error redirectError{&out}; |
|
|
|
|
|
|
|
|
|
|
|
AnimationData data{nullptr, { |
|
|
|
AnimationData data{nullptr, { |
|
|
|
{AnimationTrackType::Vector3i, |
|
|
|
AnimationTrackData{AnimationTrackType::Vector3i, |
|
|
|
AnimationTrackType::Vector3, |
|
|
|
AnimationTrackType::Vector3, |
|
|
|
AnimationTrackTargetType::Scaling3D, 0, {}} |
|
|
|
AnimationTrackTargetType::Scaling3D, 0, {}} |
|
|
|
}}; |
|
|
|
}}; |
|
|
|
@ -619,7 +619,7 @@ void AnimationDataTest::release() { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
AnimationData data{{}, keyframes, { |
|
|
|
AnimationData data{{}, keyframes, { |
|
|
|
{AnimationTrackTargetType(129), 0, |
|
|
|
AnimationTrackData{AnimationTrackTargetType(129), 0, |
|
|
|
Animation::TrackView<const Float, const bool>{keyframes, Animation::Interpolation::Constant}}, |
|
|
|
Animation::TrackView<const Float, const bool>{keyframes, Animation::Interpolation::Constant}}, |
|
|
|
}}; |
|
|
|
}}; |
|
|
|
CORRADE_COMPARE(data.trackCount(), 1); |
|
|
|
CORRADE_COMPARE(data.trackCount(), 1); |
|
|
|
|