#pragma once #include "AnimationTypes.h" #include "Vector3D.h" #include "Animator.h" using namespace ANIMATION_TYPES; namespace TestFrames{ V3D red{255,0,0}; V3D green{0,255,0}; V3D blue{0,0,255}; uint32_t maxValue{std::numeric_limits::max()}; Cell CreateCell(float x_percent, float y_percent, float z_percent, V3D &color){ float continuousMaxValue{static_cast(std::numeric_limits::max())}; Cell cell{ .position = V3D{ static_cast(continuousMaxValue*x_percent), static_cast(continuousMaxValue*y_percent), static_cast(continuousMaxValue*z_percent) }, .color = color }; return cell; } AnimationFrame noFillFrame{ .frame = { CreateCell(0,0,0,red), // CreateCell(0.5,0.5,0,green), CreateCell(1,1,0,blue) }, .fillInterpolation = FillInterpolation::NO_FILL, .frameInterpolation = FrameInterpolation::SNAP, .delay = std::chrono::milliseconds(10000) }; AnimationFrame closestColorFrame{ .frame = { CreateCell(0,0,0,red), // CreateCell(0.5,0.5,0,green), CreateCell(1,1,0,blue) }, .fillInterpolation = FillInterpolation::CLOSEST_COLOR, .frameInterpolation = FrameInterpolation::SNAP, .delay = std::chrono::milliseconds(10000) }; AnimationFrame linearFillFrame{ .frame = { CreateCell(0,0,0,red), // CreateCell(0.5,0.5,0,green), CreateCell(1,1,0,blue) }, .fillInterpolation = FillInterpolation::LINEAR_WEIGHTED_DISTANCE, .frameInterpolation = FrameInterpolation::SNAP, .delay = std::chrono::milliseconds(10000) }; AnimationFrame squareFillFrame{ .frame = { CreateCell(0,0,0,red), // CreateCell(0.5,0.5,0,green), CreateCell(1,1,0,blue) }, .fillInterpolation = FillInterpolation::SQUARE_WEIGHTED_DISTANCE, .frameInterpolation = FrameInterpolation::SNAP, .delay = std::chrono::milliseconds(10000) }; AnimationFrame noFillFadeFrame{ .frame = { CreateCell(0,0,0,red), // CreateCell(0.5,0.5,0,green), CreateCell(1,1,0,blue) }, .fillInterpolation = FillInterpolation::NO_FILL, .frameInterpolation = FrameInterpolation::FADE, .delay = std::chrono::milliseconds(10000) }; AnimationFrame closestColorFadeFrame{ .frame = { CreateCell(0,0,0,red), // CreateCell(0.5,0.5,0,green), CreateCell(1,1,0,blue) }, .fillInterpolation = FillInterpolation::CLOSEST_COLOR, .frameInterpolation = FrameInterpolation::FADE, .delay = std::chrono::milliseconds(10000) }; AnimationFrame linearFillFadeFrame{ .frame = { CreateCell(0,0,0,red), // CreateCell(0.5,0.5,0,green), CreateCell(1,1,0,blue) }, .fillInterpolation = FillInterpolation::LINEAR_WEIGHTED_DISTANCE, .frameInterpolation = FrameInterpolation::FADE, .delay = std::chrono::milliseconds(10000) }; AnimationFrame squareFillFadeFrame{ .frame = { CreateCell(0,0,0,red), // CreateCell(0.5,0.5,0,green), CreateCell(1,1,0,blue) }, .fillInterpolation = FillInterpolation::SQUARE_WEIGHTED_DISTANCE, .frameInterpolation = FrameInterpolation::FADE, .delay = std::chrono::milliseconds(10000) }; std::vector testAnimationSequence2{ noFillFrame, // 0 closestColorFrame, // 1 linearFillFrame, // 2 squareFillFrame, // 3 noFillFadeFrame, // 4 closestColorFadeFrame, // 5 linearFillFadeFrame, // 6 squareFillFadeFrame // 7 }; AnimationFrame noFillFrame2{ .frame = { CreateCell(0,1,0,red), // CreateCell(0.5,0.5,0,green), CreateCell(1,0,0,green) }, .fillInterpolation = FillInterpolation::NO_FILL, .frameInterpolation = FrameInterpolation::SNAP, .delay = std::chrono::milliseconds(10000) }; AnimationFrame noFillFrame3{ .frame = { CreateCell(0.5,0.5,0,red), // CreateCell(0.5,0.5,0,green), CreateCell(0,1,0,blue) }, .fillInterpolation = FillInterpolation::NO_FILL, .frameInterpolation = FrameInterpolation::SNAP, .delay = std::chrono::milliseconds(10000) }; std::vector testAnimationSequence1{ noFillFrame, noFillFrame2, noFillFrame3, noFillFrame3 }; }