18#ifndef HEADER_CPU_PARTICLE_MANAGER_HPP
19#define HEADER_CPU_PARTICLE_MANAGER_HPP
23#include "graphics/gl_headers.hpp"
24#include "utils/constants.hpp"
25#include "mini_glm.hpp"
26#include "utils/no_copy.hpp"
29#include <dimension2d.h>
30#include <IBillboardSceneNode.h>
37#include <unordered_map>
38#include <unordered_set>
45 core::vector3df m_position;
46 video::SColor m_color_lifetime;
50 const core::vector3df& color_from,
51 const core::vector3df& color_to,
float lf_time,
float size);
73 glDeleteVertexArrays(1, &m_vao);
74 glDeleteBuffers(1, &m_vbo);
78 std::unordered_map<std::string, std::vector<STKParticle*> >
81 std::unordered_map<std::string, std::vector<scene::IBillboardSceneNode*> >
84 std::unordered_map<std::string, std::vector<CPUParticle> >
85 m_particles_generated;
87 std::unordered_map<std::string, std::unique_ptr<GLParticle> >
90 std::unordered_map<std::string, Material*> m_material_map;
92 std::unordered_set<std::string> m_flips_material, m_sky_material;
94 static GLuint m_particle_quad;
97 bool isFlipsMaterial(
const std::string& name)
98 {
return m_flips_material.find(name) != m_flips_material.end(); }
106 glDeleteBuffers(1, &m_particle_quad);
112 void addBillboardNode(scene::IBillboardSceneNode* node);
122 for (
auto& p : m_particles_queue)
126 for (
auto& p : m_billboards_queue)
130 for (
auto& p : m_particles_generated)
136 void cleanMaterialMap()
138 m_material_map.clear();
139 m_flips_material.clear();
140 m_sky_material.clear();
Definition: cpu_particle_manager.hpp:61
Definition: material.hpp:48
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
Definition: stk_particle.hpp:39
Definition: singleton.hpp:87
Definition: cpu_particle_manager.hpp:64
Definition: cpu_particle_manager.hpp:44