/* * Copyright 2019 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkParticleAffector_DEFINED #define SkParticleAffector_DEFINED #include "SkReflected.h" #include "SkPoint.h" struct SkColorCurve; struct SkCurve; struct SkParticleState; struct SkParticleUpdateParams; class SkParticleAffector : public SkReflected { public: REFLECTED_ABSTRACT(SkParticleAffector, SkReflected) virtual void apply(SkParticleUpdateParams& params, SkParticleState& ps) = 0; static void RegisterAffectorTypes(); static sk_sp MakeLinearVelocity(const SkCurve& angle, const SkCurve& strength, bool force); static sk_sp MakePointForce(SkPoint point, SkScalar constant, SkScalar invSquare); static sk_sp MakeOrientAlongVelocity(); static sk_sp MakeSize(const SkCurve& curve); static sk_sp MakeFrame(const SkCurve& curve); static sk_sp MakeColor(const SkColorCurve& curve); }; #endif // SkParticleAffector_DEFINED