1 #ifndef DALI_TOOLKIT_PARTICLE_SYSTEM_INTERNAL_PARTICLE_MODIFIER_H
2 #define DALI_TOOLKIT_PARTICLE_SYSTEM_INTERNAL_PARTICLE_MODIFIER_H
4 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #include <dali-toolkit/public-api/particle-system/particle-modifier.h>
21 #include <dali/public-api/object/base-object.h>
23 namespace Dali::Toolkit::ParticleSystem::Internal
26 class ParticleEmitter;
27 class ParticleModifier : public Dali::BaseObject
30 ParticleModifier(std::unique_ptr<ParticleModifierInterface>&& updater);
32 void Update(ParticleSystem::ParticleList& list, uint32_t first, uint32_t count);
34 ParticleModifierInterface& GetUpdater();
37 std::unique_ptr<ParticleModifierInterface> mUpdater;
40 } // namespace Dali::Toolkit::ParticleSystem::Internal
42 namespace Dali::Toolkit::ParticleSystem
44 inline Internal::ParticleModifier& GetImplementation(ParticleSystem::ParticleModifier& source)
46 DALI_ASSERT_ALWAYS(source && "ParticleModifier handle is empty");
48 BaseObject& handle = source.GetBaseObject();
50 return static_cast<Internal::ParticleModifier&>(handle);
53 inline const Internal::ParticleModifier& GetImplementation(const ParticleSystem::ParticleModifier& source)
55 DALI_ASSERT_ALWAYS(source && "ParticleModifier handle is empty");
57 const BaseObject& handle = source.GetBaseObject();
59 return static_cast<const Internal::ParticleModifier&>(handle);
62 } // namespace Dali::Toolkit::ParticleSystem
64 #endif // DALI_TOOLKIT_PARTICLE_SYSTEM_INTERNAL_PARTICLE_MODIFIER_H