Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/particlesystemscript.h')
-rw-r--r--src/render/particlesystemscript.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/render/particlesystemscript.h b/src/render/particlesystemscript.h
new file mode 100644
index 0000000..d4a7d9b
--- /dev/null
+++ b/src/render/particlesystemscript.h
@@ -0,0 +1,66 @@
+/*
+ render/particlesystemscript.h
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#ifndef __INCLUDED_RENDER_PARTICLESYSTEMSCRIPT_H__
+#define __INCLUDED_RENDER_PARTICLESYSTEMSCRIPT_H__
+
+#include "math/axis.h"
+#include "math/color.h"
+#include "math/vector3f.h"
+#include "core/entity.h"
+#include "model/tags.h"
+#include "render/particleejectorscript.h"
+
+namespace render
+{
+
+/* ---- class ParticleSystemScript --------------------------------------- */
+
+/**
+ * @brief a ParticleSystemScript holds the definition for a complete particle system.
+ * A script can hold the one ore more ejector definitions, and
+ * all required parameters are read from a .ini file.
+ * */
+class ParticleSystemScript
+{
+public:
+ typedef std::list<ParticleEjectorScript *> Ejectors;
+
+ inline const std::string &label() const {
+ return script_label;
+ }
+
+ ParticleEjectorScript *add_ejector();
+
+ inline const Ejectors &ejectors() const {
+ return script_ejectors;
+ }
+
+ static ParticleSystemScript *load(const std::string &label);
+
+ static ParticleSystemScript *find(const std::string &label);
+
+ static void clear();
+
+ static void list();
+
+private:
+
+ ParticleSystemScript(const std::string & label);
+
+ ~ParticleSystemScript();
+
+ std::string script_label;
+ Ejectors script_ejectors;
+
+ typedef std::map<std::string, ParticleSystemScript *> Registry;
+
+ static Registry script_registry;
+};
+
+} // namespace render
+
+#endif // __INCLUDED_RENDER_PARTICLESYSTEMSCRIPT_H__