From f0c88291ec2b6b9d7024e1fca7016df2297ea1e4 Mon Sep 17 00:00:00 2001 From: devZoGok Date: Tue, 16 Mar 2021 19:19:45 +0200 Subject: [PATCH] animation interface --- particleEmitter.cpp | 5 +++++ particleEmitter.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/particleEmitter.cpp b/particleEmitter.cpp index c786086..88ddfb4 100755 --- a/particleEmitter.cpp +++ b/particleEmitter.cpp @@ -199,4 +199,9 @@ namespace vb01{ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glDrawElementsInstanced(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0, numParticles); } + + void ParticleEmitter::animate(float value, KeyframeChannel keyframeChannel){ + switch(keyframeChannel.type){ + } + } } diff --git a/particleEmitter.h b/particleEmitter.h index 3246aeb..5d25d0a 100755 --- a/particleEmitter.h +++ b/particleEmitter.h @@ -3,6 +3,8 @@ #include "vector.h" #include "util.h" +#include "animatable.h" + #include namespace vb01{ @@ -10,7 +12,7 @@ namespace vb01{ class Node; class Material; - class ParticleEmitter{ + class ParticleEmitter : public Animatable{ public: ParticleEmitter(){} ParticleEmitter(int); @@ -46,6 +48,7 @@ namespace vb01{ void setupParticles(Vertex[]); void setupDisplay(Vertex[], u32[]); void render(); + void animate(float, KeyframeChannel); u32 VAO, VBO, EBO, MBO; glm::mat4 *matrices;