mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
mostly implemented particle emitter
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user