mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-21 01:25:32 -04:00
a8559bfbbc
* Update all CMakeLists of extensions to use clang-format * Run clang-format on all Extensions * Update GDCore CMakeLists.txt to add clang-format * Run clang-format on GDCore files * Update GDJS and GDCpp CMakeLists.txt to add clang-format * Run clang-format on GDCpp and GDJS files
66 lines
1.4 KiB
C++
66 lines
1.4 KiB
C++
/**
|
|
|
|
GDevelop - Particle System Extension
|
|
Copyright (c) 2010-2016 Florian Rival (Florian.Rival@gmail.com)
|
|
This project is released under the MIT License.
|
|
*/
|
|
|
|
#ifndef PARTICLESYSTEMWRAPPER_H
|
|
#define PARTICLESYSTEMWRAPPER_H
|
|
|
|
#include <memory>
|
|
class SFMLTextureWrapper;
|
|
|
|
namespace SPK {
|
|
class System;
|
|
class Model;
|
|
class SphericEmitter;
|
|
class Sphere;
|
|
class Group;
|
|
namespace GL {
|
|
class GLRenderer;
|
|
}
|
|
} // namespace SPK
|
|
|
|
/**
|
|
* Wrapper around SPARK related stuff.
|
|
* This class gives direct access to these stuff,
|
|
* it only manages the destruction and automatize the copy behaviour.
|
|
*/
|
|
class GD_EXTENSION_API ParticleSystemWrapper {
|
|
public:
|
|
ParticleSystemWrapper();
|
|
virtual ~ParticleSystemWrapper();
|
|
ParticleSystemWrapper(
|
|
const ParticleSystemWrapper& other) // What a bad design
|
|
{
|
|
particleSystem = NULL;
|
|
particleModel = NULL;
|
|
emitter = NULL;
|
|
zone = NULL;
|
|
group = NULL;
|
|
renderer = NULL;
|
|
Init(other);
|
|
};
|
|
ParticleSystemWrapper& operator=(const ParticleSystemWrapper& other) {
|
|
if (&other != this) Init(other);
|
|
|
|
return *this;
|
|
}
|
|
|
|
SPK::System* particleSystem;
|
|
SPK::Model* particleModel;
|
|
SPK::SphericEmitter* emitter;
|
|
SPK::Sphere* zone;
|
|
SPK::Group* group;
|
|
SPK::GL::GLRenderer* renderer;
|
|
std::shared_ptr<SFMLTextureWrapper> textureParticle;
|
|
|
|
private:
|
|
void Init(const ParticleSystemWrapper& other);
|
|
|
|
static bool SPKinitialized;
|
|
};
|
|
|
|
#endif // PARTICLESYSTEMWRAPPER_H
|