mostly implemented particle emitter

This commit is contained in:
devZoGok
2021-10-18 19:04:49 +03:00
parent 03f65e62f5
commit d1f2f9b152
22 changed files with 444 additions and 31 deletions
+8
View File
@@ -1,6 +1,7 @@
#include"root.h"
#include"node.h"
#include"mesh.h"
#include"particleEmitter.h"
#include"light.h"
#include"material.h"
@@ -18,6 +19,8 @@ namespace vb01{
m->update();
for(Light *l : lights)
l->update();
for(ParticleEmitter *p : emitters)
p->update();
for(Node *c : children)
c->update();
}
@@ -37,6 +40,11 @@ namespace vb01{
mesh->setNode(this);
}
void Node::attachParticleEmitter(ParticleEmitter *emitter){
emitters.push_back(emitter);
emitter->setNode(this);
}
void Node::addLight(Light *light){
lights.push_back(light);
light->setNode(this);