File indexing completed on 2025-02-02 04:11:09

0001 /*
0002  * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #pragma once
0008 
0009 #include "path_modifier.hpp"
0010 
0011 namespace glaxnimate::model {
0012 
0013 class ZigZag : public StaticOverrides<ZigZag, PathModifier>
0014 {
0015     GLAXNIMATE_OBJECT(ZigZag)
0016     GLAXNIMATE_ANIMATABLE(float, amplitude, 10)
0017     GLAXNIMATE_ANIMATABLE(float, frequency, 10, {}, 0)
0018 public:
0019     enum Style
0020     {
0021         Saw = 1,
0022         Wave = 2
0023     };
0024 
0025     Q_ENUM(Style)
0026     GLAXNIMATE_PROPERTY(Style, style, Saw, nullptr, nullptr, PropertyTraits::Visual)
0027 
0028 public:
0029     using Ctor::Ctor;
0030 
0031     static QIcon static_tree_icon();
0032     static QString static_type_name_human();
0033 
0034     math::bezier::MultiBezier process(FrameTime t, const math::bezier::MultiBezier& mbez) const override;
0035 
0036 protected:
0037     bool process_collected() const override;
0038 
0039 };
0040 
0041 } // namespace glaxnimate::model
0042