Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
blob: d4a7d9b5cbf9537299570ce625cb44f59fe85007 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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__