ToyEngine/Exp3/ParticleWorld.h

26 lines
837 B
C++

#pragma once
#include <World.h>
class ParticleWorld : public World
{
public:
ParticleWorld();
void logicalTick(float deltaTime) override;
void rendererTick(float deltaTime) override;
virtual void cursorPosCallback(GLFWwindow* window, double xpos, double ypos) override;
virtual void mouseButtonCallback(GLFWwindow* window, int button, int action, int mods) override;
virtual void scrollCallback(GLFWwindow* window, double xoffset, double yoffset) override;
virtual void processInput(GLFWwindow* window, float deltaTime) override;
private:
std::vector<std::shared_ptr<Particle>> particles;
std::shared_ptr<Particle> planet;
float G = 1;
glm::vec3 lightColor = glm::normalize(glm::vec3(0.7529, 0.7450, 0.6784));
float lightYaw = glm::radians(80.f);
float lightPitch = glm::radians(105.f);
bool addNewParticle = false;
};